Ignore:
Timestamp:
24/09/13 00:36:40 (7 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

File:
1 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>
Note: See TracChangeset for help on using the changeset viewer.