Changeset 2408


Ignore:
Timestamp:
Sep 23, 2013, 5:36:40 PM (6 years ago)
Author:
fielding@…
Message:

The changes in [2361] and [2372] to address #479 had the unfortunate effect of making most caches noncompliant; this change removes the need for caches to process If-Match and If-Unmodified-Since and reduces the precondition evaluation to checking the stored response already selected by the cache

Location:
draft-ietf-httpbis/latest
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • draft-ietf-httpbis/latest/p4-conditional.html

    r2403 r2408  
    446446  }
    447447  @bottom-center {
    448        content: "Expires March 19, 2014";
     448       content: "Expires March 27, 2014";
    449449  }
    450450  @bottom-right {
     
    489489      <meta name="dct.creator" content="Reschke, J. F.">
    490490      <meta name="dct.identifier" content="urn:ietf:id:draft-ietf-httpbis-p4-conditional-latest">
    491       <meta name="dct.issued" scheme="ISO8601" content="2013-09-15">
     491      <meta name="dct.issued" scheme="ISO8601" content="2013-09-23">
    492492      <meta name="dct.replaces" content="urn:ietf:rfc:2616">
    493493      <meta name="dct.abstract" content="The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypertext information systems. This document defines HTTP/1.1 conditional requests, including metadata header fields for indicating state changes, request header fields for making preconditions on such state, and rules for constructing the responses to a conditional request when one or more preconditions evaluate to false.">
     
    515515            </tr>
    516516            <tr>
    517                <td class="left">Expires: March 19, 2014</td>
    518                <td class="right">September 15, 2013</td>
     517               <td class="left">Expires: March 27, 2014</td>
     518               <td class="right">September 23, 2013</td>
    519519            </tr>
    520520         </tbody>
     
    543543         in progress”.
    544544      </p>
    545       <p>This Internet-Draft will expire on March 19, 2014.</p>
     545      <p>This Internet-Draft will expire on March 27, 2014.</p>
    546546      <h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1>
    547547      <p>Copyright © 2013 IETF Trust and the persons identified as the document authors. All rights reserved.</p>
     
    933933      <p id="rfc.section.3.p.1">This section defines the syntax and semantics of HTTP/1.1 header fields for applying preconditions on requests. <a href="#evaluation" title="Evaluation">Section&nbsp;5</a> defines when the preconditions are applied. <a href="#precedence" title="Precedence">Section&nbsp;6</a> defines the order of evaluation when more than one precondition is present.
    934934      </p>
    935       <p id="rfc.section.3.p.2">Requirements on a cache when handling a received conditional request are defined in <a href="p6-cache.html#validation.received" title="Handling a Received Validation Request">Section 4.3.2</a> of <a href="#Part6" id="rfc.xref.Part6.4"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>.
    936       </p>
    937935      <div id="rfc.iref.i.1"></div>
    938936      <h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a>&nbsp;<a id="header.if-match" href="#header.if-match">If-Match</a></h2>
    939       <p id="rfc.section.3.1.p.1">The "If-Match" header field makes the request method conditional on the recipient cache or origin server either having at
    940          least one current representation of the target resource, when the field-value is "*", or having a current representation of
    941          the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value.
    942       </p>
    943       <p id="rfc.section.3.1.p.2">A recipient <em class="bcp14">MUST</em> use the strong comparison function when comparing entity-tags for If-Match (<a href="#entity.tag.comparison" title="Comparison">Section&nbsp;2.3.2</a>), since the client intends this precondition to prevent the method from being applied if there have been any changes to the
     937      <p id="rfc.section.3.1.p.1">The "If-Match" header field makes the request method conditional on the recipient origin server either having at least one
     938         current representation of the target resource, when the field-value is "*", or having a current representation of the target
     939         resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value.
     940      </p>
     941      <p id="rfc.section.3.1.p.2">An origin server <em class="bcp14">MUST</em> use the strong comparison function when comparing entity-tags for If-Match (<a href="#entity.tag.comparison" title="Comparison">Section&nbsp;2.3.2</a>), since the client intends this precondition to prevent the method from being applied if there have been any changes to the
    944942         representation data.
    945943      </p>
     
    963961         change made by the same user agent.
    964962      </p>
     963      <p id="rfc.section.3.1.p.9">The If-Match header field can be ignored by caches and intermediaries because it is not applicable to a stored response.</p>
    965964      <div id="rfc.iref.i.2"></div>
    966965      <h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a>&nbsp;<a id="header.if-none-match" href="#header.if-none-match">If-None-Match</a></h2>
    967       <p id="rfc.section.3.2.p.1">The "If-None-Match" header field makes the request method conditional on the recipient cache or origin server either not having
    968          a current representation of the target resource, when the field-value is "*", or not having a current representation of the
    969          target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value.
     966      <p id="rfc.section.3.2.p.1">The "If-None-Match" header field makes the request method conditional on a recipient cache or origin server either not having
     967         any current representation of the target resource, when the field-value is "*", or having a selected representation with an
     968         entity-tag that does not match any of those listed in the field-value.
    970969      </p>
    971970      <p id="rfc.section.3.2.p.2">A recipient <em class="bcp14">MUST</em> use the weak comparison function when comparing entity-tags for If-None-Match (<a href="#entity.tag.comparison" title="Comparison">Section&nbsp;2.3.2</a>), since weak entity-tags can be used for cache validation even if there have been changes to the representation data.
     
    993992      <p id="rfc.section.3.2.p.9">An origin server <em class="bcp14">MUST NOT</em> perform the requested method if the condition evaluates to false; instead, the origin server <em class="bcp14">MUST</em> respond with either a) the <a href="#status.304" class="smpl">304 (Not Modified)</a> status code if the request method is GET or HEAD; or, b) the <a href="#status.412" class="smpl">412 (Precondition Failed)</a> status code for all other request methods.
    994993      </p>
     994      <p id="rfc.section.3.2.p.10">Requirements on cache handling of a received If-None-Match header field are defined in <a href="p6-cache.html#validation.received" title="Handling a Received Validation Request">Section 4.3.2</a> of <a href="#Part6" id="rfc.xref.Part6.4"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>.
     995      </p>
    995996      <div id="rfc.iref.i.3"></div>
    996997      <h2 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a>&nbsp;<a id="header.if-modified-since" href="#header.if-modified-since">If-Modified-Since</a></h2>
     
    10251026      <p id="rfc.section.3.3.p.11">An origin server that receives an If-Modified-Since header field <em class="bcp14">SHOULD</em> evaluate the condition prior to performing the method (<a href="#evaluation" title="Evaluation">Section&nbsp;5</a>). The origin server <em class="bcp14">SHOULD NOT</em> perform the requested method if the selected representation's last modification date is earlier than or equal to the date
    10261027         provided in the field-value; instead, the origin server <em class="bcp14">SHOULD</em> generate a <a href="#status.304" class="smpl">304 (Not Modified)</a> response, including only those metadata that are useful for identifying or updating a previously cached response.
     1028      </p>
     1029      <p id="rfc.section.3.3.p.12">Requirements on cache handling of a received If-Modified-Since header field are defined in <a href="p6-cache.html#validation.received" title="Handling a Received Validation Request">Section 4.3.2</a> of <a href="#Part6" id="rfc.xref.Part6.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>.
    10271030      </p>
    10281031      <div id="rfc.iref.i.4"></div>
     
    10511054         user agent). In the latter case, the origin server <em class="bcp14">MUST NOT</em> send a validator header field in the response unless it can verify that the request is a duplicate of an immediately prior
    10521055         change made by the same user agent.
     1056      </p>
     1057      <p id="rfc.section.3.4.p.10">The If-Unmodified-Since header field can be ignored by caches and intermediaries because it is not applicable to a stored
     1058         response.
    10531059      </p>
    10541060      <h2 id="rfc.section.3.5"><a href="#rfc.section.3.5">3.5</a>&nbsp;<a id="header.if-range" href="#header.if-range">If-Range</a></h2>
     
    10641070         representation as if it were the payload of a <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response.
    10651071      </p>
    1066       <p id="rfc.section.4.1.p.2">The server generating a 304 response <em class="bcp14">MUST</em> generate any of the following header fields that would have been sent in a <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response to the same request: <a href="p6-cache.html#header.cache-control" class="smpl">Cache-Control</a>, <a href="p2-semantics.html#header.content-location" class="smpl">Content-Location</a>, <a href="#header.etag" class="smpl">ETag</a>, <a href="p6-cache.html#header.expires" class="smpl">Expires</a>, and <a href="p2-semantics.html#header.vary" class="smpl">Vary</a>.
     1072      <p id="rfc.section.4.1.p.2">The server generating a 304 response <em class="bcp14">MUST</em> generate any of the following header fields that would have been sent in a <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response to the same request: <a href="p6-cache.html#header.cache-control" class="smpl">Cache-Control</a>, <a href="p2-semantics.html#header.content-location" class="smpl">Content-Location</a>, <a href="p2-semantics.html#header.date" class="smpl">Date</a>, <a href="#header.etag" class="smpl">ETag</a>, <a href="p6-cache.html#header.expires" class="smpl">Expires</a>, and <a href="p2-semantics.html#header.vary" class="smpl">Vary</a>.
    10671073      </p>
    10681074      <p id="rfc.section.4.1.p.3">Since the goal of a 304 response is to minimize information transfer when the recipient already has one or more cached representations,
     
    10701076         cache updates (e.g., <a href="#header.last-modified" class="smpl">Last-Modified</a> might be useful if the response does not have an <a href="#header.etag" class="smpl">ETag</a> field).
    10711077      </p>
    1072       <p id="rfc.section.4.1.p.4">Requirements on a cache that receives a 304 response are defined in <a href="p6-cache.html#freshening.responses" title="Freshening Stored Responses upon Validation">Section 4.3.4</a> of <a href="#Part6" id="rfc.xref.Part6.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>. If the conditional request originated with an outbound client, such as a user agent with its own cache sending a conditional
     1078      <p id="rfc.section.4.1.p.4">Requirements on a cache that receives a 304 response are defined in <a href="p6-cache.html#freshening.responses" title="Freshening Stored Responses upon Validation">Section 4.3.4</a> of <a href="#Part6" id="rfc.xref.Part6.6"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>. If the conditional request originated with an outbound client, such as a user agent with its own cache sending a conditional
    10731079         GET to a shared proxy, then the proxy <em class="bcp14">SHOULD</em> forward the 304 response to that client.
    10741080      </p>
     
    10811087      </p>
    10821088      <h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a>&nbsp;<a id="evaluation" href="#evaluation">Evaluation</a></h1>
    1083       <p id="rfc.section.5.p.1">Except when excluded below, a server <em class="bcp14">MUST</em> evaluate received request preconditions after it has successfully performed its normal request checks and just before it would
     1089      <p id="rfc.section.5.p.1">Except when excluded below, a recipient cache or origin server <em class="bcp14">MUST</em> evaluate received request preconditions after it has successfully performed its normal request checks and just before it would
    10841090         perform the action associated with the request method. A server <em class="bcp14">MUST</em> ignore all received preconditions if its response to the same request without those conditions would have been a status code
    10851091         other than a <a href="p2-semantics.html#status.2xx" class="smpl">2xx</a> or <a href="#status.412" class="smpl">412 (Precondition Failed)</a>. In other words, redirects and failures take precedence over the evaluation of preconditions in conditional requests.
     
    11071113      </p>
    11081114      <ol>
    1109          <li id="precedence1">When <a href="#header.if-match" class="smpl">If-Match</a> is present, evaluate it:
     1115         <li id="precedence1">When recipient is the origin server and <a href="#header.if-match" class="smpl">If-Match</a> is present, evaluate the <a href="#header.if-match" class="smpl">If-Match</a> precondition:
    11101116            <ul>
    11111117               <li>if true, continue to step <a href="#precedence3">3</a></li>
     
    11141120            </ul>
    11151121         </li>
    1116          <li id="precedence2">When <a href="#header.if-match" class="smpl">If-Match</a> is not present and <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a> is present, evaluate it:
     1122         <li id="precedence2">When recipient is the origin server, <a href="#header.if-match" class="smpl">If-Match</a> is not present, and <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a> is present, evaluate the <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a> precondition:
    11171123            <ul>
    11181124               <li>if true, continue to step <a href="#precedence3">3</a></li>
     
    11211127            </ul>
    11221128         </li>
    1123          <li id="precedence3">When <a href="#header.if-none-match" class="smpl">If-None-Match</a> is present, evaluate it:
     1129         <li id="precedence3">When <a href="#header.if-none-match" class="smpl">If-None-Match</a> is present, evaluate the <a href="#header.if-none-match" class="smpl">If-None-Match</a> precondition:
    11241130            <ul>
    11251131               <li>if true, continue to step <a href="#precedence5">5</a></li>
     
    11281134            </ul>
    11291135         </li>
    1130          <li id="precedence4">When the method is GET or HEAD, <a href="#header.if-none-match" class="smpl">If-None-Match</a> is not present, and <a href="#header.if-modified-since" class="smpl">If-Modified-Since</a> is present, evaluate it:
     1136         <li id="precedence4">When the method is GET or HEAD, <a href="#header.if-none-match" class="smpl">If-None-Match</a> is not present, and <a href="#header.if-modified-since" class="smpl">If-Modified-Since</a> is present, evaluate the <a href="#header.if-modified-since" class="smpl">If-Modified-Since</a> precondition:
    11311137            <ul>
    11321138               <li>if true, continue to step <a href="#precedence5">5</a></li>
     
    11341140            </ul>
    11351141         </li>
    1136          <li id="precedence5">When the method is GET and both <a href="p5-range.html#header.range" class="smpl">Range</a> and <a href="p5-range.html#header.if-range" class="smpl">If-Range</a> are present, evaluate If-Range:
     1142         <li id="precedence5">When the method is GET and both <a href="p5-range.html#header.range" class="smpl">Range</a> and <a href="p5-range.html#header.if-range" class="smpl">If-Range</a> are present, evaluate the <a href="p5-range.html#header.if-range" class="smpl">If-Range</a> precondition:
    11371143            <ul>
    11381144               <li>if the validator matches and the Range specification is applicable to the selected representation, respond <a href="p5-range.html#status.206" class="smpl">206 (Partial Content)</a> <a href="#Part5" id="rfc.xref.Part5.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[Part5]</cite></a></li>
     
    15221528                     </ul>
    15231529                  </li>
    1524                   <li><em>Part6</em>&nbsp;&nbsp;<a href="#rfc.xref.Part6.1">1</a>, <a href="#rfc.xref.Part6.2">2.2.1</a>, <a href="#rfc.xref.Part6.3">2.3.1</a>, <a href="#rfc.xref.Part6.4">3</a>, <a href="#rfc.xref.Part6.5">4.1</a>, <a href="#Part6"><b>10.1</b></a><ul>
    1525                         <li><em>Section 4.3.2</em>&nbsp;&nbsp;<a href="#rfc.xref.Part6.4">3</a></li>
    1526                         <li><em>Section 4.3.4</em>&nbsp;&nbsp;<a href="#rfc.xref.Part6.5">4.1</a></li>
     1530                  <li><em>Part6</em>&nbsp;&nbsp;<a href="#rfc.xref.Part6.1">1</a>, <a href="#rfc.xref.Part6.2">2.2.1</a>, <a href="#rfc.xref.Part6.3">2.3.1</a>, <a href="#rfc.xref.Part6.4">3.2</a>, <a href="#rfc.xref.Part6.5">3.3</a>, <a href="#rfc.xref.Part6.6">4.1</a>, <a href="#Part6"><b>10.1</b></a><ul>
     1531                        <li><em>Section 4.3.2</em>&nbsp;&nbsp;<a href="#rfc.xref.Part6.4">3.2</a>, <a href="#rfc.xref.Part6.5">3.3</a></li>
     1532                        <li><em>Section 4.3.4</em>&nbsp;&nbsp;<a href="#rfc.xref.Part6.6">4.1</a></li>
    15271533                     </ul>
    15281534                  </li>
  • draft-ietf-httpbis/latest/p4-conditional.xml

    r2403 r2408  
    656656   one precondition is present.
    657657</t>
    658 <t>
    659    Requirements on a cache when handling a received conditional request are
    660    defined in &cache-validation-received;.
    661 </t>
    662658
    663659<section title="If-Match" anchor="header.if-match">
     
    666662<t>
    667663   The "If-Match" header field makes the request method conditional on the
    668    recipient cache or origin server either having at least one current
     664   recipient origin server either having at least one current
    669665   representation of the target resource, when the field-value is "*", or
    670666   having a current representation of the target resource that has an
     
    673669</t>
    674670<t>
    675    A recipient &MUST; use the strong comparison function when comparing
     671   An origin server &MUST; use the strong comparison function when comparing
    676672   entity-tags for If-Match (<xref target="entity.tag.comparison"/>), since
    677673   the client intends this precondition to prevent the method from being
     
    720716   of an immediately prior change made by the same user agent.
    721717</t>
     718<t>
     719   The If-Match header field can be ignored by caches and intermediaries
     720   because it is not applicable to a stored response.
     721</t>
    722722</section>
    723723
     
    727727<t>
    728728   The "If-None-Match" header field makes the request method conditional on
    729    the recipient cache or origin server either not having a current
     729   a recipient cache or origin server either not having any current
    730730   representation of the target resource, when the field-value is "*", or
    731    not having a current representation of the target resource that has an
    732    entity-tag matching a member of the list of entity-tags provided in the
    733    field-value.
     731   having a selected representation with an entity-tag that does not match any
     732   of those listed in the field-value.
    734733</t>
    735734<t>
     
    787786   b) the <x:ref>412 (Precondition Failed)</x:ref> status code for all other
    788787   request methods.
     788</t>
     789<t>
     790   Requirements on cache handling of a received If-None-Match header field
     791   are defined in &cache-validation-received;.
    789792</t>
    790793</section>
     
    864867   metadata that are useful for identifying or updating a previously cached
    865868   response.
     869</t>
     870<t>
     871   Requirements on cache handling of a received If-Modified-Since header field
     872   are defined in &cache-validation-received;.
    866873</t>
    867874</section>
     
    930937   of an immediately prior change made by the same user agent.
    931938</t>
     939<t>
     940   The If-Unmodified-Since header field can be ignored by caches and
     941   intermediaries because it is not applicable to a stored response.
     942</t>
    932943</section>
    933944
     
    936947   The "If-Range" header field provides a special conditional request
    937948   mechanism that is similar to the <x:ref>If-Match</x:ref> and
    938    <x:ref>If-Unmodified-Since</x:ref> header fields but instructs the recipient to
    939    ignore the <x:ref>Range</x:ref> header field if the validator doesn't
    940    match, resulting in transfer of the new selected representation instead of
    941    a 412 response. If-Range is defined in &header-if-range;.
     949   <x:ref>If-Unmodified-Since</x:ref> header fields but instructs the
     950   recipient to ignore the <x:ref>Range</x:ref> header field if the validator
     951   doesn't match, resulting in transfer of the new selected representation
     952   instead of a 412 response. If-Range is defined in &header-if-range;.
    942953</t>
    943954</section>
     
    967978   <x:ref>Cache-Control</x:ref>,
    968979   <x:ref>Content-Location</x:ref>,
     980   <x:ref>Date</x:ref>,
    969981   <x:ref>ETag</x:ref>,
    970982   <x:ref>Expires</x:ref>, and
     
    10081020<section title="Evaluation" anchor="evaluation">
    10091021<t>
    1010    Except when excluded below, a server &MUST; evaluate received request
    1011    preconditions after it has successfully performed its normal request checks
    1012    and just before it would perform the action associated with the request
    1013    method.
     1022   Except when excluded below, a recipient cache or origin server &MUST;
     1023   evaluate received request preconditions after it has successfully performed
     1024   its normal request checks and just before it would perform the action
     1025   associated with the request method.
    10141026   A server &MUST; ignore all received preconditions if its response to the
    10151027   same request without those conditions would have been a status code other
     
    10621074   preconditions defined by this specification in the following order:
    10631075   <list style="numbers">
    1064      <t anchor="precedence1">When <x:ref>If-Match</x:ref> is present, evaluate it:
     1076     <t anchor="precedence1">When recipient is the origin server and
     1077       <x:ref>If-Match</x:ref> is present,
     1078       evaluate the <x:ref>If-Match</x:ref> precondition:
    10651079       <list style="symbols">
    10661080         <t>if true, continue to step <xref target="precedence3" format="counter"/></t>
     
    10701084       </list>
    10711085     </t>
    1072      <t anchor="precedence2">When <x:ref>If-Match</x:ref> is not present and
    1073         <x:ref>If-Unmodified-Since</x:ref> is present, evaluate it:
     1086     <t anchor="precedence2">When recipient is the origin server,
     1087       <x:ref>If-Match</x:ref> is not present, and
     1088       <x:ref>If-Unmodified-Since</x:ref> is present,
     1089       evaluate the <x:ref>If-Unmodified-Since</x:ref> precondition:
    10741090       <list style="symbols">
    10751091         <t>if true, continue to step <xref target="precedence3" format="counter"/></t>
     
    10791095       </list>
    10801096     </t>
    1081      <t anchor="precedence3">When <x:ref>If-None-Match</x:ref> is present, evaluate it:
     1097     <t anchor="precedence3">When <x:ref>If-None-Match</x:ref> is present,
     1098       evaluate the <x:ref>If-None-Match</x:ref> precondition:
    10821099       <list style="symbols">
    10831100         <t>if true, continue to step <xref target="precedence5" format="counter"/></t>
     
    10871104     </t>
    10881105     <t anchor="precedence4">When the method is GET or HEAD,
    1089         <x:ref>If-None-Match</x:ref> is not present, and
    1090         <x:ref>If-Modified-Since</x:ref> is present, evaluate it:
     1106       <x:ref>If-None-Match</x:ref> is not present, and
     1107       <x:ref>If-Modified-Since</x:ref> is present,
     1108       evaluate the <x:ref>If-Modified-Since</x:ref> precondition:
    10911109       <list style="symbols">
    10921110         <t>if true, continue to step <xref target="precedence5" format="counter"/></t>
     
    10941112       </list>
    10951113     </t>
    1096      <t anchor="precedence5">When the method is GET and both <x:ref>Range</x:ref> and
    1097         <x:ref>If-Range</x:ref> are present, evaluate If-Range:
     1114     <t anchor="precedence5">When the method is GET and both
     1115       <x:ref>Range</x:ref> and <x:ref>If-Range</x:ref> are present,
     1116       evaluate the <x:ref>If-Range</x:ref> precondition:
    10981117       <list style="symbols">
    10991118         <t>if the validator matches and the Range specification is
  • draft-ietf-httpbis/latest/p6-cache.html

    r2407 r2408  
    10501050      </p>
    10511051      <h3 id="rfc.section.4.3.2"><a href="#rfc.section.4.3.2">4.3.2</a>&nbsp;<a id="validation.received" href="#validation.received">Handling a Received Validation Request</a></h3>
    1052       <p id="rfc.section.4.3.2.p.1">Each client in the request chain may have its own cache, so it is common for a cache at an intermediary or origin server to
    1053          receive conditional requests from other (outbound) caches. Likewise, some user agents make use of conditional requests to
    1054          limit data transfers to recently modified representations or to complete the transfer of partially retrieved representations.
    1055       </p>
    1056       <p id="rfc.section.4.3.2.p.2">If the request semantics can be satisfied with a cached response and a recipient cache has at least one response stored for
    1057          this primary cache key, the cache <em class="bcp14">MUST</em> evaluate received precondition header fields as part of its selection process for determining a suitable response. A cache <em class="bcp14">MUST NOT</em> evaluate received precondition header fields in a request with semantics that cannot be satisfied with a cached response,
    1058          or for which the cache has no prior stored responses, since such preconditions are intended for some other (inbound) server.
     1052      <p id="rfc.section.4.3.2.p.1">Each client in the request chain may have its own cache, so it is common for a cache at an intermediary to receive conditional
     1053         requests from other (outbound) caches. Likewise, some user agents make use of conditional requests to limit data transfers
     1054         to recently modified representations or to complete the transfer of a partially retrieved representation.
     1055      </p>
     1056      <p id="rfc.section.4.3.2.p.2">If a cache receives a request that can be satisfied by reusing one of its stored <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> or <a href="p5-range.html#status.206" class="smpl">206 (Partial Content)</a> responses, the cache <em class="bcp14">SHOULD</em> evaluate any applicable conditional header field preconditions received in that request with respect to the corresponding
     1057         validators contained within the selected response. A cache <em class="bcp14">MUST NOT</em> evaluate conditional header fields that are only applicable to an origin server, found in a request with semantics that cannot
     1058         be satisfied with a cached response, or applied to a target resource for which it has no stored responses; such preconditions
     1059         are likely intended for some other (inbound) server.
    10591060      </p>
    10601061      <p id="rfc.section.4.3.2.p.3">The proper evaluation of conditional requests by a cache depends on the received precondition header fields and their precedence,
    1061          as defined in <a href="p4-conditional.html#precedence" title="Precedence">Section 6</a> of <a href="#Part4" id="rfc.xref.Part4.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>.
    1062       </p>
    1063       <p id="rfc.section.4.3.2.p.4">A request containing an <a href="p4-conditional.html#header.if-match" class="smpl">If-Match</a> header field (<a href="p4-conditional.html#header.if-match" title="If-Match">Section 3.1</a> of <a href="#Part4" id="rfc.xref.Part4.6"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>) indicates that the client wants to receive an error response if the cache has a stored response that cannot be used to answer
    1064          this request. The cache <em class="bcp14">MUST</em> generate a <a href="p4-conditional.html#status.412" class="smpl">412 (Precondition Failed)</a> response if the field-value is "*" and no suitable response is stored, or if the field-value is a list of entity-tags and
    1065          none of them match the entity-tag of a suitable stored response. Otherwise, the cache <em class="bcp14">MUST</em> generate a <a href="p2-semantics.html#status.2xx" class="smpl">2xx (Successful)</a> response that reuses the most recent of its matching stored responses to satisfy the request.
    1066       </p>
    1067       <p id="rfc.section.4.3.2.p.5">A request containing an <a href="p4-conditional.html#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a> header field (<a href="p4-conditional.html#header.if-unmodified-since" title="If-Unmodified-Since">Section 3.4</a> of <a href="#Part4" id="rfc.xref.Part4.7"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>) indicates that the client wants to receive an error response if the cache has a stored response that cannot be used to answer
    1068          this request. The cache <em class="bcp14">MUST</em> generate a <a href="p4-conditional.html#status.412" class="smpl">412 (Precondition Failed)</a> response if one of the following is true: 1) a stored response has a <a href="p4-conditional.html#header.last-modified" class="smpl">Last-Modified</a> field-value that is more recent than the conditional timestamp; 2) no <a href="p4-conditional.html#header.last-modified" class="smpl">Last-Modified</a> field is present, but a stored response has a <a href="p2-semantics.html#header.date" class="smpl">Date</a> field-value that is more recent than the conditional timestamp; or, 3) neither <a href="p4-conditional.html#header.last-modified" class="smpl">Last-Modified</a> nor <a href="p2-semantics.html#header.date" class="smpl">Date</a> is present, but the cache recorded a stored response as having been received at a time more recent than the conditional timestamp.
    1069          Otherwise, the cache <em class="bcp14">MUST</em> generate a <a href="p2-semantics.html#status.2xx" class="smpl">2xx (Successful)</a> response that reuses the most recent of its matching stored responses to satisfy the request.
    1070       </p>
    1071       <p id="rfc.section.4.3.2.p.6">A request containing an <a href="p4-conditional.html#header.if-none-match" class="smpl">If-None-Match</a> header field (<a href="p4-conditional.html#header.if-none-match" title="If-None-Match">Section 3.2</a> of <a href="#Part4" id="rfc.xref.Part4.8"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>) indicates that the client wants to validate one or more of its stored responses. If the field-value is "*" and any suitable
    1072          response is stored, or the field-value is a list of entity-tags and at least one of them match the entity-tag of a suitable
    1073          stored response, the cache <em class="bcp14">MUST</em> generate a <a href="p4-conditional.html#status.304" class="smpl">304 (Not Modified)</a> response using the most suitable of those matching responses as the selected representation. Otherwise, if the cache has one
    1074          or more suitable stored responses that do not match the condition, the cache <em class="bcp14">MUST</em> generate a <a href="p2-semantics.html#status.2xx" class="smpl">2xx (Successful)</a> response that reuses the most suitable of those stored responses to satisfy the request. Finally, if the cache has no suitable
    1075          stored responses, the cache <em class="bcp14">SHOULD</em> forward the conditional request toward the origin server; if the received condition contains a list of entity-tags and the
    1076          cache has its own set of stored responses for that primary cache key, the cache <em class="bcp14">SHOULD</em> take the union of the received set with the set of entity-tags for its own stored set of responses (fresh or stale) and generate
    1077          an <a href="p4-conditional.html#header.if-none-match" class="smpl">If-None-Match</a> header field containing that union when it forwards the request toward the origin server. However, if a stored response contains
    1078          only partial content, the cache <em class="bcp14">MUST NOT</em> include its entity-tag in the union unless the request is for a range that would be fully satisfied by that stored response.
    1079       </p>
    1080       <p id="rfc.section.4.3.2.p.7">A request containing an <a href="p4-conditional.html#header.if-modified-since" class="smpl">If-Modified-Since</a> header field (<a href="p4-conditional.html#header.if-modified-since" title="If-Modified-Since">Section 3.3</a> of <a href="#Part4" id="rfc.xref.Part4.9"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>) indicates that the client wants to validate one or more of its stored responses by modification date if the stored responses
    1081          have no entity-tag or the recipient does not implement <a href="p4-conditional.html#header.if-none-match" class="smpl">If-None-Match</a>. The cache <em class="bcp14">MUST</em> generate a <a href="p2-semantics.html#status.2xx" class="smpl">2xx (Successful)</a> response, reusing the most recent of its stored responses to satisfy the request, if one of the following is true: 1) a stored
    1082          response has a <a href="p4-conditional.html#header.last-modified" class="smpl">Last-Modified</a> field-value that is more recent than the conditional timestamp; 2) no <a href="p4-conditional.html#header.last-modified" class="smpl">Last-Modified</a> field is present, but a stored response has a <a href="p2-semantics.html#header.date" class="smpl">Date</a> field-value that is more recent than the conditional timestamp; or, 3) neither <a href="p4-conditional.html#header.last-modified" class="smpl">Last-Modified</a> nor <a href="p2-semantics.html#header.date" class="smpl">Date</a> is present, but the cache recorded a stored response as having been received at a time more recent than the conditional timestamp.
    1083          Otherwise, if the cache has one or more suitable stored responses, the cache <em class="bcp14">MUST</em> generate a <a href="p4-conditional.html#status.304" class="smpl">304 (Not Modified)</a> response using the most recent of its suitable stored responses as the selected representation. Finally, if the cache has
    1084          no suitable stored responses, the cache <em class="bcp14">SHOULD</em> forward the conditional request toward the origin server.
    1085       </p>
    1086       <p id="rfc.section.4.3.2.p.8">A cache that implements partial responses to range requests, as defined in <a href="#Part5" id="rfc.xref.Part5.4"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[Part5]</cite></a>, also needs to evaluate a received <a href="p5-range.html#header.if-range" class="smpl">If-Range</a> header field (<a href="p5-range.html#header.if-range" title="If-Range">Section 3.2</a> of <a href="#Part5" id="rfc.xref.Part5.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[Part5]</cite></a>) in respect to its selected stored response.
     1062         as defined in <a href="p4-conditional.html#precedence" title="Precedence">Section 6</a> of <a href="#Part4" id="rfc.xref.Part4.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>. The <a href="p4-conditional.html#header.if-match" class="smpl">If-Match</a> and <a href="p4-conditional.html#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a> conditional header fields are not applicable to a cache.
     1063      </p>
     1064      <p id="rfc.section.4.3.2.p.4">A request containing an <a href="p4-conditional.html#header.if-none-match" class="smpl">If-None-Match</a> header field (<a href="p4-conditional.html#header.if-none-match" title="If-None-Match">Section 3.2</a> of <a href="#Part4" id="rfc.xref.Part4.6"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>) indicates that the client wants to validate one or more of its own stored responses in comparison to whichever stored response
     1065         is selected by the cache. If the field-value is "*", or if the field-value is a list of entity-tags and at least one of them
     1066         match the entity-tag of the selected stored response, a cache recipient <em class="bcp14">SHOULD</em> generate a <a href="p4-conditional.html#status.304" class="smpl">304 (Not Modified)</a> response (using the metadata of the selected stored response) instead of sending that stored response.
     1067      </p>
     1068      <p id="rfc.section.4.3.2.p.5">When a cache decides to revalidate its own stored responses for a request that contains an <a href="p4-conditional.html#header.if-none-match" class="smpl">If-None-Match</a> list of entity-tags, the cache <em class="bcp14">MAY</em> combine the received list with a list of entity-tags from its own stored set of responses (fresh or stale) and send the union
     1069         of the two lists as a replacement <a href="p4-conditional.html#header.if-none-match" class="smpl">If-None-Match</a> header field value in the forwarded request. If a stored response contains only partial content, the cache <em class="bcp14">MUST NOT</em> include its entity-tag in the union unless the request is for a range that would be fully satisfied by that partial stored
     1070         response. If the response to the forwarded request is <a href="p4-conditional.html#status.304" class="smpl">304 (Not Modified)</a> and has an ETag header field value with an entity-tag that is not in the client's list, the cache <em class="bcp14">MUST</em> generate a <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response for the client by reusing its corresponding stored response, as updated by the 304 response metadata (<a href="#freshening.responses" title="Freshening Stored Responses upon Validation">Section&nbsp;4.3.4</a>).
     1071      </p>
     1072      <p id="rfc.section.4.3.2.p.6">If an <a href="p4-conditional.html#header.if-none-match" class="smpl">If-None-Match</a> header field is not present, a request containing an <a href="p4-conditional.html#header.if-modified-since" class="smpl">If-Modified-Since</a> header field (<a href="p4-conditional.html#header.if-modified-since" title="If-Modified-Since">Section 3.3</a> of <a href="#Part4" id="rfc.xref.Part4.7"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>) indicates that the client wants to validate one or more of its own stored responses by modification date. A cache recipient <em class="bcp14">SHOULD</em> generate a <a href="p4-conditional.html#status.304" class="smpl">304 (Not Modified)</a> response (using the metadata of the selected stored response) if one of the following cases is true: 1) the selected stored
     1073         response has a <a href="p4-conditional.html#header.last-modified" class="smpl">Last-Modified</a> field-value that is earlier than or equal to the conditional timestamp; 2) no <a href="p4-conditional.html#header.last-modified" class="smpl">Last-Modified</a> field is present in the selected stored response, but it has a <a href="p2-semantics.html#header.date" class="smpl">Date</a> field-value that is earlier than or equal to the conditional timestamp; or, 3) neither <a href="p4-conditional.html#header.last-modified" class="smpl">Last-Modified</a> nor <a href="p2-semantics.html#header.date" class="smpl">Date</a> is present in the selected stored response, but the cache recorded it as having been received at a time earlier than or equal
     1074         to the conditional timestamp.
     1075      </p>
     1076      <p id="rfc.section.4.3.2.p.7">A cache that implements partial responses to range requests, as defined in <a href="#Part5" id="rfc.xref.Part5.4"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[Part5]</cite></a>, also needs to evaluate a received <a href="p5-range.html#header.if-range" class="smpl">If-Range</a> header field (<a href="p5-range.html#header.if-range" title="If-Range">Section 3.2</a> of <a href="#Part5" id="rfc.xref.Part5.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[Part5]</cite></a>) with respect to its selected stored response.
    10871077      </p>
    10881078      <h3 id="rfc.section.4.3.3"><a href="#rfc.section.4.3.3">4.3.3</a>&nbsp;<a id="validation.response" href="#validation.response">Handling a Validation Response</a></h3>
     
    11061096      <p id="rfc.section.4.3.4.p.2">The stored response to update is identified by using the first match (if any) of: </p>
    11071097      <ul>
    1108          <li>If the new response contains a <dfn>strong validator</dfn> (see <a href="p4-conditional.html#weak.and.strong.validators" title="Weak versus Strong">Section 2.1</a> of <a href="#Part4" id="rfc.xref.Part4.10"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>), then that strong validator identifies the selected representation for update. All of the stored responses with the same
     1098         <li>If the new response contains a <dfn>strong validator</dfn> (see <a href="p4-conditional.html#weak.and.strong.validators" title="Weak versus Strong">Section 2.1</a> of <a href="#Part4" id="rfc.xref.Part4.8"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>), then that strong validator identifies the selected representation for update. All of the stored responses with the same
    11091099            strong validator are selected. If none of the stored responses contain the same strong validator, then the cache <em class="bcp14">MUST NOT</em> use the new response to update any stored responses.
    11101100         </li>
     
    21812171                     </ul>
    21822172                  </li>
    2183                   <li><em>Part4</em>&nbsp;&nbsp;<a href="#rfc.xref.Part4.1">4.2.2</a>, <a href="#rfc.xref.Part4.2">4.3</a>, <a href="#rfc.xref.Part4.3">4.3.1</a>, <a href="#rfc.xref.Part4.4">4.3.1</a>, <a href="#rfc.xref.Part4.5">4.3.2</a>, <a href="#rfc.xref.Part4.6">4.3.2</a>, <a href="#rfc.xref.Part4.7">4.3.2</a>, <a href="#rfc.xref.Part4.8">4.3.2</a>, <a href="#rfc.xref.Part4.9">4.3.2</a>, <a href="#rfc.xref.Part4.10">4.3.4</a>, <a href="#Part4"><b>10.1</b></a><ul>
    2184                         <li><em>Section 2.1</em>&nbsp;&nbsp;<a href="#rfc.xref.Part4.10">4.3.4</a></li>
     2173                  <li><em>Part4</em>&nbsp;&nbsp;<a href="#rfc.xref.Part4.1">4.2.2</a>, <a href="#rfc.xref.Part4.2">4.3</a>, <a href="#rfc.xref.Part4.3">4.3.1</a>, <a href="#rfc.xref.Part4.4">4.3.1</a>, <a href="#rfc.xref.Part4.5">4.3.2</a>, <a href="#rfc.xref.Part4.6">4.3.2</a>, <a href="#rfc.xref.Part4.7">4.3.2</a>, <a href="#rfc.xref.Part4.8">4.3.4</a>, <a href="#Part4"><b>10.1</b></a><ul>
     2174                        <li><em>Section 2.1</em>&nbsp;&nbsp;<a href="#rfc.xref.Part4.8">4.3.4</a></li>
    21852175                        <li><em>Section 2.2</em>&nbsp;&nbsp;<a href="#rfc.xref.Part4.1">4.2.2</a>, <a href="#rfc.xref.Part4.3">4.3.1</a></li>
    21862176                        <li><em>Section 2.3</em>&nbsp;&nbsp;<a href="#rfc.xref.Part4.4">4.3.1</a></li>
    2187                         <li><em>Section 3.1</em>&nbsp;&nbsp;<a href="#rfc.xref.Part4.6">4.3.2</a></li>
    2188                         <li><em>Section 3.2</em>&nbsp;&nbsp;<a href="#rfc.xref.Part4.8">4.3.2</a></li>
    2189                         <li><em>Section 3.3</em>&nbsp;&nbsp;<a href="#rfc.xref.Part4.9">4.3.2</a></li>
    2190                         <li><em>Section 3.4</em>&nbsp;&nbsp;<a href="#rfc.xref.Part4.7">4.3.2</a></li>
     2177                        <li><em>Section 3.2</em>&nbsp;&nbsp;<a href="#rfc.xref.Part4.6">4.3.2</a></li>
     2178                        <li><em>Section 3.3</em>&nbsp;&nbsp;<a href="#rfc.xref.Part4.7">4.3.2</a></li>
    21912179                        <li><em>Section 6</em>&nbsp;&nbsp;<a href="#rfc.xref.Part4.5">4.3.2</a></li>
    21922180                     </ul>
  • draft-ietf-httpbis/latest/p6-cache.xml

    r2407 r2408  
    871871<t>
    872872   Each client in the request chain may have its own cache, so it is common
    873    for a cache at an intermediary or origin server to receive conditional
    874    requests from other (outbound) caches. Likewise, some user agents make use
    875    of conditional requests to limit data transfers to recently modified
    876    representations or to complete the transfer of partially retrieved
    877    representations.
    878 </t>
    879 <t>
    880    If the request semantics can be satisfied with a cached response and a
    881    recipient cache has at least one response stored for this primary cache
    882    key, the cache &MUST; evaluate received precondition header fields as part
    883    of its selection process for determining a suitable response.
    884    A cache &MUST-NOT; evaluate received precondition header fields in a
    885    request with semantics that cannot be satisfied with a cached response, or
    886    for which the cache has no prior stored responses, since such preconditions
    887    are intended for some other (inbound) server.
     873   for a cache at an intermediary to receive conditional requests from other
     874   (outbound) caches. Likewise, some user agents make use of conditional
     875   requests to limit data transfers to recently modified representations or to
     876   complete the transfer of a partially retrieved representation.
     877</t>
     878<t>
     879   If a cache receives a request that can be satisfied by reusing one of
     880   its stored <x:ref>200 (OK)</x:ref> or <x:ref>206 (Partial Content)</x:ref>
     881   responses, the cache &SHOULD; evaluate any applicable conditional header
     882   field preconditions received in that request with respect to the
     883   corresponding validators contained within the selected response.
     884   A cache &MUST-NOT; evaluate conditional header fields that are only
     885   applicable to an origin server, found in a request with semantics that
     886   cannot be satisfied with a cached response, or applied to a target resource
     887   for which it has no stored responses; such preconditions are likely
     888   intended for some other (inbound) server.
    888889</t>
    889890<t>
    890891   The proper evaluation of conditional requests by a cache depends on the
    891892   received precondition header fields and their precedence, as defined in
    892    &conditional-precedence;.
    893 </t>
    894 <t>
    895    A request containing an <x:ref>If-Match</x:ref> header field
    896    (&header-if-match;) indicates that the client wants to receive an error
    897    response if the cache has a stored response that cannot be used to answer
    898    this request.
    899    The cache &MUST; generate a <x:ref>412 (Precondition Failed)</x:ref>
    900    response if the field-value is "*" and no suitable response is stored, or
    901    if the field-value is a list of entity-tags and none of them match the
    902    entity-tag of a suitable stored response.
    903    Otherwise, the cache &MUST; generate a <x:ref>2xx (Successful)</x:ref>
    904    response that reuses the most recent of its matching stored responses to
    905    satisfy the request.
    906 </t>
    907 <t>
    908    A request containing an <x:ref>If-Unmodified-Since</x:ref> header field
    909    (&header-if-unmodified-since;) indicates that the client wants to receive
    910    an error response if the cache has a stored response that cannot be used
    911    to answer this request.
    912    The cache &MUST; generate a <x:ref>412 (Precondition Failed)</x:ref>
    913    response if one of the following is true:
    914    1) a stored response has a <x:ref>Last-Modified</x:ref> field-value that
    915    is more recent than the conditional timestamp;
    916    2) no <x:ref>Last-Modified</x:ref> field is present, but a stored
    917    response has a <x:ref>Date</x:ref> field-value that is more recent than the
    918    conditional timestamp; or,
    919    3) neither <x:ref>Last-Modified</x:ref> nor <x:ref>Date</x:ref> is present,
    920    but the cache recorded a stored response as having been received at a
    921    time more recent than the conditional timestamp.
    922    Otherwise, the cache &MUST; generate a <x:ref>2xx (Successful)</x:ref>
    923    response that reuses the most recent of its matching stored responses to
    924    satisfy the request.
     893   &conditional-precedence;. The <x:ref>If-Match</x:ref> and
     894   <x:ref>If-Unmodified-Since</x:ref> conditional header fields are not
     895   applicable to a cache.
    925896</t>
    926897<t>
    927898   A request containing an <x:ref>If-None-Match</x:ref> header field
    928899   (&header-if-none-match;) indicates that the client wants to validate one
    929    or more of its stored responses.
    930    If the field-value is "*" and any suitable response is
    931    stored, or the field-value is a list of entity-tags and at least one of
    932    them match the entity-tag of a suitable stored response, the cache &MUST;
    933    generate a <x:ref>304 (Not Modified)</x:ref> response using the most
    934    suitable of those matching responses as the selected representation.
    935    Otherwise, if the cache has one or more suitable stored responses that
    936    do not match the condition, the cache &MUST; generate a
    937    <x:ref>2xx (Successful)</x:ref> response that reuses the most suitable of
    938    those stored responses to satisfy the request.
    939    Finally, if the cache has no suitable stored responses, the cache &SHOULD;
    940    forward the conditional request toward the origin server; if the received
    941    condition contains a list of entity-tags and the cache has its own set of
    942    stored responses for that primary cache key, the cache &SHOULD; take the
    943    union of the received set with the set of entity-tags for its own stored
    944    set of responses (fresh or stale) and generate an
    945    <x:ref>If-None-Match</x:ref> header field containing that union when it
    946    forwards the request toward the origin server.
    947    However, if a stored response contains only partial content, the cache
    948    &MUST-NOT; include its entity-tag in the union unless the request is for
    949    a range that would be fully satisfied by that stored response.
    950 </t>
    951 <t>
    952    A request containing an <x:ref>If-Modified-Since</x:ref> header field
     900   or more of its own stored responses in comparison to whichever stored
     901   response is selected by the cache.
     902   If the field-value is "*", or if the field-value is a list of entity-tags
     903   and at least one of them match the entity-tag of the selected stored
     904   response, a cache recipient &SHOULD; generate a
     905   <x:ref>304 (Not Modified)</x:ref> response (using the metadata of the
     906   selected stored response) instead of sending that stored response.
     907</t>
     908<t>
     909   When a cache decides to revalidate its own stored responses for a
     910   request that contains an <x:ref>If-None-Match</x:ref> list of entity-tags,
     911   the cache &MAY; combine the received list with a list of entity-tags
     912   from its own stored set of responses (fresh or stale) and send the union of
     913   the two lists as a replacement <x:ref>If-None-Match</x:ref> header
     914   field value in the forwarded request.
     915   If a stored response contains only partial content, the
     916   cache &MUST-NOT; include its entity-tag in the union unless the request is
     917   for a range that would be fully satisfied by that partial stored response.
     918   If the response to the forwarded request is
     919   <x:ref>304 (Not Modified)</x:ref> and has an ETag header field value with
     920   an entity-tag that is not in the client's list, the cache &MUST;
     921   generate a <x:ref>200 (OK)</x:ref> response for the client by reusing its
     922   corresponding stored response, as updated by the 304 response metadata
     923   (<xref target="freshening.responses"/>).
     924</t>
     925<t>
     926   If an <x:ref>If-None-Match</x:ref> header field is not present, a request
     927   containing an <x:ref>If-Modified-Since</x:ref> header field
    953928   (&header-if-modified-since;) indicates that the client wants to validate
    954    one or more of its stored responses by modification date if the stored
    955    responses have no entity-tag or the recipient does not implement
    956    <x:ref>If-None-Match</x:ref>.
    957    The cache &MUST; generate a <x:ref>2xx (Successful)</x:ref> response,
    958    reusing the most recent of its stored responses to satisfy the request,
    959    if one of the following is true:
    960    1) a stored response has a <x:ref>Last-Modified</x:ref> field-value that
    961    is more recent than the conditional timestamp;
    962    2) no <x:ref>Last-Modified</x:ref> field is present, but a stored
    963    response has a <x:ref>Date</x:ref> field-value that is more recent than the
    964    conditional timestamp; or,
    965    3) neither <x:ref>Last-Modified</x:ref> nor <x:ref>Date</x:ref> is present,
    966    but the cache recorded a stored response as having been received at a
    967    time more recent than the conditional timestamp.
    968    Otherwise, if the cache has one or more suitable stored responses, the
    969    cache &MUST; generate a <x:ref>304 (Not Modified)</x:ref> response using
    970    the most recent of its suitable stored responses as the selected
    971    representation.
    972    Finally, if the cache has no suitable stored responses, the cache &SHOULD;
    973    forward the conditional request toward the origin server.
     929   one or more of its own stored responses by modification date.
     930   A cache recipient &SHOULD; generate a <x:ref>304 (Not Modified)</x:ref>
     931   response (using the metadata of the selected stored response) if one of the
     932   following cases is true:
     933   1) the selected stored response has a <x:ref>Last-Modified</x:ref>
     934   field-value that is earlier than or equal to the conditional timestamp;
     935   2) no <x:ref>Last-Modified</x:ref> field is present in the selected stored
     936   response, but it has a <x:ref>Date</x:ref> field-value that is earlier than
     937   or equal to the conditional timestamp; or,
     938   3) neither <x:ref>Last-Modified</x:ref> nor <x:ref>Date</x:ref> is present
     939   in the selected stored response, but the cache recorded it as having been
     940   received at a time earlier than or equal to the conditional timestamp.
    974941</t>
    975942<t>
    976943   A cache that implements partial responses to range requests, as defined in
    977944   &partial;, also needs to evaluate a received <x:ref>If-Range</x:ref> header
    978    field (&header-if-range;) in respect to its selected stored response.
     945   field (&header-if-range;) with respect to its selected stored response.
    979946</t>
    980947</section>
Note: See TracChangeset for help on using the changeset viewer.