Changeset 2238 for draft-ietf-httpbis/latest
- Timestamp:
- 07/05/13 06:33:20 (10 years ago)
- Location:
- draft-ietf-httpbis/latest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p6-cache.html
r2237 r2238 590 590 <li><a href="#rfc.section.3.1">3.1</a> <a href="#incomplete.responses">Storing Incomplete Responses</a></li> 591 591 <li><a href="#rfc.section.3.2">3.2</a> <a href="#caching.authenticated.responses">Storing Responses to Authenticated Requests</a></li> 592 <li><a href="#rfc.section.3.3">3.3</a> <a href="#combining.responses">Combining Partial Content</a></li> 592 593 </ul> 593 594 </li> … … 601 602 </li> 602 603 <li><a href="#rfc.section.4.2">4.2</a> <a href="#validation.model">Validation</a><ul> 603 <li><a href="#rfc.section.4.2.1">4.2.1</a> <a href="#freshening.responses">Freshening Responses with 304 Not Modified</a></li>604 <li><a href="#rfc.section.4.2.1">4.2.1</a> <a href="#freshening.responses">Freshening Stored Responses upon Validation</a></li> 604 605 </ul> 605 606 </li> 606 607 <li><a href="#rfc.section.4.3">4.3</a> <a href="#caching.negotiated.responses">Calculating Secondary Keys with Vary</a></li> 607 <li><a href="#rfc.section.4.4">4.4</a> <a href="#combining.responses">Combining Partial Content</a></li>608 608 </ul> 609 609 </li> … … 845 845 (OK)</a> cache entry. However, a cache <em class="bcp14">MUST NOT</em> store incomplete or partial content responses if it does not support the <a href="p5-range.html#header.range" class="smpl">Range</a> and <a href="p5-range.html#header.content-range" class="smpl">Content-Range</a> header fields or if it does not understand the range units used in those fields. 846 846 </p> 847 <p id="rfc.section.3.1.p.2">A cache <em class="bcp14">MAY</em> complete a stored incomplete response by making a subsequent range request (<a href="#Part5" id="rfc.xref.Part5.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[Part5]</cite></a>) and combining the successful response with the stored entry, as defined in <a href="#combining.responses" title="Combining Partial Content">Section 4.4</a>. A cache <em class="bcp14">MUST NOT</em> use an incomplete response to answer requests unless the response has been made complete or the request is partial and specifies847 <p id="rfc.section.3.1.p.2">A cache <em class="bcp14">MAY</em> complete a stored incomplete response by making a subsequent range request (<a href="#Part5" id="rfc.xref.Part5.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[Part5]</cite></a>) and combining the successful response with the stored entry, as defined in <a href="#combining.responses" title="Combining Partial Content">Section 3.3</a>. A cache <em class="bcp14">MUST NOT</em> use an incomplete response to answer requests unless the response has been made complete or the request is partial and specifies 848 848 a range that is wholly within the incomplete response. A cache <em class="bcp14">MUST NOT</em> send a partial response to a client without explicitly marking it as such using the <a href="p5-range.html#status.206" class="smpl">206 (Partial Content)</a> status code. 849 849 </p> … … 857 857 a subsequent request without revalidating it on the origin server. 858 858 </p> 859 <h2 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a> <a id="combining.responses" href="#combining.responses">Combining Partial Content</a></h2> 860 <p id="rfc.section.3.3.p.1">A response might transfer only a partial representation if the connection closed prematurely or if the request used one or 861 more Range specifiers (<a href="#Part5" id="rfc.xref.Part5.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[Part5]</cite></a>). After several such transfers, a cache might have received several ranges of the same representation. A cache <em class="bcp14">MAY</em> combine these ranges into a single stored response, and reuse that response to satisfy later requests, if they all share the 862 same strong validator and the cache complies with the client requirements in <a href="p5-range.html#combining.byte.ranges" title="Combining Ranges">Section 4.3</a> of <a href="#Part5" id="rfc.xref.Part5.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[Part5]</cite></a>. 863 </p> 864 <p id="rfc.section.3.3.p.2">When combining the new response with one or more stored responses, a cache <em class="bcp14">MUST</em>: 865 </p> 866 <ul> 867 <li>delete any <a href="#header.warning" class="smpl">Warning</a> header fields in the stored response with warn-code 1xx (see <a href="#header.warning" id="rfc.xref.header.warning.1" title="Warning">Section 7.5</a>); 868 </li> 869 <li>retain any <a href="#header.warning" class="smpl">Warning</a> header fields in the stored response with warn-code 2xx; and, 870 </li> 871 <li>use other header fields provided in the new response, aside from <a href="p5-range.html#header.content-range" class="smpl">Content-Range</a>, to replace all instances of the corresponding header fields in the stored response. 872 </li> 873 </ul> 859 874 <h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a> <a id="constructing.responses.from.caches" href="#constructing.responses.from.caches">Constructing Responses from Caches</a></h1> 860 875 <p id="rfc.section.4.p.1">When presented with a request, a cache <em class="bcp14">MUST NOT</em> reuse a stored response, unless: … … 1038 1053 or doing so is explicitly allowed (e.g., by the max-stale request directive; see <a href="#cache-request-directive" title="Request Cache-Control Directives">Section 7.2.1</a>). 1039 1054 </p> 1040 <p id="rfc.section.4.1.4.p.4">A cache <em class="bcp14">SHOULD</em> append a <a href="#header.warning" class="smpl">Warning</a> header field with the 110 warn-code (see <a href="#header.warning" id="rfc.xref.header.warning. 1" title="Warning">Section 7.5</a>) to stale responses. Likewise, a cache <em class="bcp14">SHOULD</em> add the 112 warn-code to stale responses if the cache is disconnected.1055 <p id="rfc.section.4.1.4.p.4">A cache <em class="bcp14">SHOULD</em> append a <a href="#header.warning" class="smpl">Warning</a> header field with the 110 warn-code (see <a href="#header.warning" id="rfc.xref.header.warning.2" title="Warning">Section 7.5</a>) to stale responses. Likewise, a cache <em class="bcp14">SHOULD</em> add the 112 warn-code to stale responses if the cache is disconnected. 1041 1056 </p> 1042 1057 <p id="rfc.section.4.1.4.p.5">note that if a cache receives a first-hand response (either an entire response, or a <a href="p4-conditional.html#status.304" class="smpl">304 (Not Modified)</a> response) that it would normally forward to the requesting client, and the received response is no longer fresh, the cache … … 1058 1073 <p id="rfc.section.4.2.p.5"> </p> 1059 1074 <ul> 1060 <li>A <a href="p4-conditional.html#status.304" class="smpl">304 (Not Modified)</a> response status code indicates that the stored response can be updated and reused; see <a href="#freshening.responses" title="Freshening Responses with 304 Not Modified">Section 4.2.1</a>.1075 <li>A <a href="p4-conditional.html#status.304" class="smpl">304 (Not Modified)</a> response status code indicates that the stored response can be updated and reused; see <a href="#freshening.responses" title="Freshening Stored Responses upon Validation">Section 4.2.1</a>. 1061 1076 </li> 1062 1077 <li>A full response (i.e., one with a payload body) indicates that none of the stored responses nominated in the conditional request … … 1067 1082 </li> 1068 1083 </ul> 1069 <h3 id="rfc.section.4.2.1"><a href="#rfc.section.4.2.1">4.2.1</a> <a id="freshening.responses" href="#freshening.responses">Freshening Responses with 304 Not Modified</a></h3>1084 <h3 id="rfc.section.4.2.1"><a href="#rfc.section.4.2.1">4.2.1</a> <a id="freshening.responses" href="#freshening.responses">Freshening Stored Responses upon Validation</a></h3> 1070 1085 <p id="rfc.section.4.2.1.p.1">When a cache receives a <a href="p4-conditional.html#status.304" class="smpl">304 (Not Modified)</a> response and already has one or more stored <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> responses for the same cache key, the cache needs to identify which of the stored responses are updated by this new response 1071 1086 and then update the stored response(s) with the new information provided in the <a href="p4-conditional.html#status.304" class="smpl">304</a> response. … … 1088 1103 </p> 1089 1104 <ul> 1090 <li>delete any <a href="#header.warning" class="smpl">Warning</a> header fields in the stored response with warn-code 1xx (see <a href="#header.warning" id="rfc.xref.header.warning. 2" title="Warning">Section 7.5</a>);1105 <li>delete any <a href="#header.warning" class="smpl">Warning</a> header fields in the stored response with warn-code 1xx (see <a href="#header.warning" id="rfc.xref.header.warning.3" title="Warning">Section 7.5</a>); 1091 1106 </li> 1092 1107 <li>retain any <a href="#header.warning" class="smpl">Warning</a> header fields in the stored response with warn-code 2xx; and, … … 1122 1137 server in a (possibly conditional; see <a href="#validation.model" title="Validation">Section 4.2</a>) request. 1123 1138 </p> 1124 <h2 id="rfc.section.4.4"><a href="#rfc.section.4.4">4.4</a> <a id="combining.responses" href="#combining.responses">Combining Partial Content</a></h2>1125 <p id="rfc.section.4.4.p.1">A response might transfer only a partial representation if the connection closed prematurely or if the request used one or1126 more Range specifiers (<a href="#Part5" id="rfc.xref.Part5.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[Part5]</cite></a>). After several such transfers, a cache might have received several ranges of the same representation. A cache <em class="bcp14">MAY</em> combine these ranges into a single stored response, and reuse that response to satisfy later requests, if they all share the1127 same strong validator and the cache complies with the client requirements in <a href="p5-range.html#combining.byte.ranges" title="Combining Ranges">Section 4.3</a> of <a href="#Part5" id="rfc.xref.Part5.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[Part5]</cite></a>.1128 </p>1129 <p id="rfc.section.4.4.p.2">When combining the new response with one or more stored responses, a cache <em class="bcp14">MUST</em>:1130 </p>1131 <ul>1132 <li>delete any <a href="#header.warning" class="smpl">Warning</a> header fields in the stored response with warn-code 1xx (see <a href="#header.warning" id="rfc.xref.header.warning.3" title="Warning">Section 7.5</a>);1133 </li>1134 <li>retain any <a href="#header.warning" class="smpl">Warning</a> header fields in the stored response with warn-code 2xx; and,1135 </li>1136 <li>use other header fields provided in the new response, aside from <a href="p5-range.html#header.content-range" class="smpl">Content-Range</a>, to replace all instances of the corresponding header fields in the stored response.1137 </li>1138 </ul>1139 1139 <h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a> <a id="head.effects" href="#head.effects">Updating Caches with HEAD Responses</a></h1> 1140 1140 <p id="rfc.section.5.p.1">A response to the HEAD method is identical to what an equivalent request made with a GET would have been, except it lacks … … 2169 2169 </ul> 2170 2170 </li> 2171 <li><em>Part5</em> <a href="#rfc.xref.Part5.1">3.1</a>, <a href="#rfc.xref.Part5.2"> 4.4</a>, <a href="#rfc.xref.Part5.3">4.4</a>, <a href="#Part5"><b>12.1</b></a><ul>2172 <li><em>Section 4.3</em> <a href="#rfc.xref.Part5.3"> 4.4</a></li>2171 <li><em>Part5</em> <a href="#rfc.xref.Part5.1">3.1</a>, <a href="#rfc.xref.Part5.2">3.3</a>, <a href="#rfc.xref.Part5.3">3.3</a>, <a href="#Part5"><b>12.1</b></a><ul> 2172 <li><em>Section 4.3</em> <a href="#rfc.xref.Part5.3">3.3</a></li> 2173 2173 </ul> 2174 2174 </li> … … 2222 2222 </li> 2223 2223 <li><a id="rfc.index.W" href="#rfc.index.W"><b>W</b></a><ul> 2224 <li>Warning header field <a href="#rfc.xref.header.warning.1"> 4.1.4</a>, <a href="#rfc.xref.header.warning.2">4.2.1</a>, <a href="#rfc.xref.header.warning.3">4.4</a>, <a href="#rfc.xref.header.warning.4">5</a>, <a href="#rfc.iref.w.1"><b>7.5</b></a>, <a href="#rfc.xref.header.warning.5">9.3</a>, <a href="#rfc.xref.header.warning.6">A</a>, <a href="#rfc.xref.header.warning.7">A</a></li>2224 <li>Warning header field <a href="#rfc.xref.header.warning.1">3.3</a>, <a href="#rfc.xref.header.warning.2">4.1.4</a>, <a href="#rfc.xref.header.warning.3">4.2.1</a>, <a href="#rfc.xref.header.warning.4">5</a>, <a href="#rfc.iref.w.1"><b>7.5</b></a>, <a href="#rfc.xref.header.warning.5">9.3</a>, <a href="#rfc.xref.header.warning.6">A</a>, <a href="#rfc.xref.header.warning.7">A</a></li> 2225 2225 </ul> 2226 2226 </li> -
draft-ietf-httpbis/latest/p6-cache.xml
r2237 r2238 465 465 </t> 466 466 </section> 467 468 <section anchor="combining.responses" title="Combining Partial Content"> 469 <t> 470 A response might transfer only a partial representation if the 471 connection closed prematurely or if the request used one or more Range 472 specifiers (&partial;). After several such transfers, a cache might have 473 received several ranges of the same representation. A cache &MAY; combine 474 these ranges into a single stored response, and reuse that response to 475 satisfy later requests, if they all share the same strong validator and 476 the cache complies with the client requirements in &combining-byte-ranges;. 477 </t> 478 <t> 479 When combining the new response with one or more stored responses, a 480 cache &MUST;: 481 <list style="symbols"> 482 <t>delete any <x:ref>Warning</x:ref> header fields in the stored response 483 with warn-code 1xx (see <xref target="header.warning" />);</t> 484 <t>retain any <x:ref>Warning</x:ref> header fields in the stored response 485 with warn-code 2xx; and,</t> 486 <t>use other header fields provided in the new response, aside 487 from <x:ref>Content-Range</x:ref>, to replace all instances of the 488 corresponding header fields in the stored response.</t> 489 </list> 490 </t> 491 </section> 492 467 493 </section> 468 494 … … 875 901 </t> 876 902 877 <section anchor="freshening.responses" title="Freshening Responses with 304 Not Modified">903 <section anchor="freshening.responses" title="Freshening Stored Responses upon Validation"> 878 904 <t> 879 905 When a cache receives a <x:ref>304 (Not Modified)</x:ref> response and … … 981 1007 </section> 982 1008 983 984 <section anchor="combining.responses" title="Combining Partial Content">985 <t>986 A response might transfer only a partial representation if the987 connection closed prematurely or if the request used one or more Range988 specifiers (&partial;). After several such transfers, a cache might have989 received several ranges of the same representation. A cache &MAY; combine990 these ranges into a single stored response, and reuse that response to991 satisfy later requests, if they all share the same strong validator and992 the cache complies with the client requirements in &combining-byte-ranges;.993 </t>994 <t>995 When combining the new response with one or more stored responses, a996 cache &MUST;:997 <list style="symbols">998 <t>delete any <x:ref>Warning</x:ref> header fields in the stored response999 with warn-code 1xx (see <xref target="header.warning" />);</t>1000 <t>retain any <x:ref>Warning</x:ref> header fields in the stored response1001 with warn-code 2xx; and,</t>1002 <t>use other header fields provided in the new response, aside1003 from <x:ref>Content-Range</x:ref>, to replace all instances of the1004 corresponding header fields in the stored response.</t>1005 </list>1006 </t>1007 </section>1008 1009 </section> 1009 1010
Note: See TracChangeset
for help on using the changeset viewer.