Ignore:
Timestamp:
Jul 12, 2012, 3:14:44 AM (7 years ago)
Author:
julian.reschke@…
Message:

Refactor If-*Match header fields to separately define the condition (see #372)

File:
1 edited

Legend:

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

    r1758 r1761  
    449449  }
    450450  @bottom-center {
    451        content: "Expires January 12, 2013";
     451       content: "Expires January 13, 2013";
    452452  }
    453453  @bottom-right {
     
    490490      <meta name="dct.creator" content="Reschke, J. F.">
    491491      <meta name="dct.identifier" content="urn:ietf:id:draft-ietf-httpbis-p4-conditional-latest">
    492       <meta name="dct.issued" scheme="ISO8601" content="2012-07-11">
     492      <meta name="dct.issued" scheme="ISO8601" content="2012-07-12">
    493493      <meta name="dct.replaces" content="urn:ietf:rfc:2616">
    494494      <meta name="dct.abstract" content="The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypertext information systems. HTTP has been in use by the World Wide Web global information initiative since 1990. This document is Part 4 of the seven-part specification that defines the protocol referred to as &#34;HTTP/1.1&#34; and, taken together, obsoletes RFC 2616. Part 4 defines request header fields for indicating conditional requests and the rules for constructing responses to those requests.">
     
    516516            </tr>
    517517            <tr>
    518                <td class="left">Expires: January 12, 2013</td>
     518               <td class="left">Expires: January 13, 2013</td>
    519519               <td class="right">J. Reschke, Editor</td>
    520520            </tr>
     
    525525            <tr>
    526526               <td class="left"></td>
    527                <td class="right">July 11, 2012</td>
     527               <td class="right">July 12, 2012</td>
    528528            </tr>
    529529         </tbody>
     
    555555         in progress”.
    556556      </p>
    557       <p>This Internet-Draft will expire on January 12, 2013.</p>
     557      <p>This Internet-Draft will expire on January 13, 2013.</p>
    558558      <h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1>
    559559      <p>Copyright © 2012 IETF Trust and the persons identified as the document authors. All rights reserved.</p>
     
    975975      </p>
    976976      <div id="rfc.figure.u.9"></div><pre class="inline"><span id="rfc.iref.g.7"></span>  <a href="#header.if-match" class="smpl">If-Match</a> = "*" / 1#<a href="#header.etag" class="smpl">entity-tag</a>
    977 </pre><p id="rfc.section.3.1.p.4">If any of the entity-tags listed in the If-Match field value match (as per <a href="#entity.tag.comparison" title="Comparison">Section&nbsp;2.3.2</a>) the entity-tag of the selected representation for the target resource, or if "*" is given and any current representation
    978          exists for the target resource, then the server <em class="bcp14">MAY</em> perform the request method as if the If-Match header field was not present.
    979       </p>
    980       <p id="rfc.section.3.1.p.5">Origin servers <em class="bcp14">MUST NOT</em> perform the requested method if none of the entity-tags match, or if "*" is given and no current representation exists; instead
    981          they <em class="bcp14">MUST</em> respond with the <a href="#status.412" class="smpl">412 (Precondition Failed)</a> status code.
    982       </p>
    983       <p id="rfc.section.3.1.p.6">Proxy servers using a cached response as the selected representation <em class="bcp14">MUST NOT</em> perform the requested method if none of the entity-tags match, or if "*" is given and no current representation exists; instead,
    984          they <em class="bcp14">MUST</em> forward the request towards the origin server.
    985       </p>
    986       <p id="rfc.section.3.1.p.7">If the request would, without the If-Match header field, result in anything other than a <a href="p2-semantics.html#status.2xx" class="smpl">2xx (Successful)</a> or <a href="#status.412" class="smpl">412 (Precondition Failed)</a> status code, then the If-Match header field <em class="bcp14">MUST</em> be ignored.
    987       </p>
    988       <p id="rfc.section.3.1.p.8">Examples:</p>
     977</pre><p id="rfc.section.3.1.p.4">The If-Match condition is met if and only if any of the entity-tags listed in the If-Match field value match the entity-tag
     978         of the selected representation for the target resource (as per <a href="#entity.tag.comparison" title="Comparison">Section&nbsp;2.3.2</a>), or if "*" is given and any current representation exists for the target resource.
     979      </p>
     980      <p id="rfc.section.3.1.p.5">If the condition is met, the server <em class="bcp14">MAY</em> perform the request method as if the If-Match header field was not present.
     981      </p>
     982      <p id="rfc.section.3.1.p.6">Origin servers <em class="bcp14">MUST NOT</em> perform the requested method if the condition is not met; instead they <em class="bcp14">MUST</em> respond with the <a href="#status.412" class="smpl">412 (Precondition
     983            Failed)</a> status code.
     984      </p>
     985      <p id="rfc.section.3.1.p.7">Proxy servers using a cached response as the selected representation <em class="bcp14">MUST NOT</em> perform the requested method if the condition is not met; instead, they <em class="bcp14">MUST</em> forward the request towards the origin server.
     986      </p>
     987      <p id="rfc.section.3.1.p.8">If the request would, without the If-Match header field, result in anything other than a <a href="p2-semantics.html#status.2xx" class="smpl">2xx (Successful)</a> or <a href="#status.412" class="smpl">412 (Precondition Failed)</a> status code, then the If-Match header field <em class="bcp14">MUST</em> be ignored.
     988      </p>
     989      <p id="rfc.section.3.1.p.9">Examples:</p>
    989990      <div id="rfc.figure.u.10"></div><pre class="text">  If-Match: "xyzzy"
    990991  If-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
    991992  If-Match: *
    992 </pre><p id="rfc.section.3.1.p.10">The result of a request having both an If-Match header field and either an <a href="#header.if-none-match" class="smpl">If-None-Match</a> or an <a href="#header.if-modified-since" class="smpl">If-Modified-Since</a> header field is undefined by this specification.
     993</pre><p id="rfc.section.3.1.p.11">The result of a request having both an If-Match header field and either an <a href="#header.if-none-match" class="smpl">If-None-Match</a> or an <a href="#header.if-modified-since" class="smpl">If-Modified-Since</a> header field is undefined by this specification.
    993994      </p>
    994995      <div id="rfc.iref.i.2"></div>
     
    10091010      </p>
    10101011      <div id="rfc.figure.u.11"></div><pre class="inline"><span id="rfc.iref.g.8"></span>  <a href="#header.if-none-match" class="smpl">If-None-Match</a> = "*" / 1#<a href="#header.etag" class="smpl">entity-tag</a>
    1011 </pre><p id="rfc.section.3.2.p.5">If any of the entity-tags listed in the If-None-Match field-value match (as per <a href="#entity.tag.comparison" title="Comparison">Section&nbsp;2.3.2</a>) the entity-tag of the selected representation, or if "*" is given and any current representation exists for that resource,
    1012          then the server <em class="bcp14">MUST NOT</em> perform the requested method. Instead, if the request method was GET or HEAD, the server <em class="bcp14">SHOULD</em> respond with a <a href="#status.304" class="smpl">304 (Not Modified)</a> status code, including the cache-related header fields (particularly <a href="#header.etag" class="smpl">ETag</a>) of the selected representation that has a matching entity-tag. For all other request methods, the server <em class="bcp14">MUST</em> respond with a <a href="#status.412" class="smpl">412 (Precondition Failed)</a> status code.
    1013       </p>
    1014       <p id="rfc.section.3.2.p.6">If none of the entity-tags match, then the server <em class="bcp14">MAY</em> perform the requested method as if the If-None-Match header field did not exist, but <em class="bcp14">MUST</em> also ignore any <a href="#header.if-modified-since" class="smpl">If-Modified-Since</a> header field(s) in the request. That is, if no entity-tags match, then the server <em class="bcp14">MUST NOT</em> return a <a href="#status.304" class="smpl">304 (Not Modified)</a> response.
    1015       </p>
    1016       <p id="rfc.section.3.2.p.7">If the request would, without the If-None-Match header field, result in anything other than a <a href="p2-semantics.html#status.2xx" class="smpl">2xx (Successful)</a> or <a href="#status.304" class="smpl">304 (Not Modified)</a> status code, then the If-None-Match header field <em class="bcp14">MUST</em> be ignored. (See <a href="#rules.for.when.to.use.entity.tags.and.last-modified.dates" title="Rules for When to Use Entity-tags and Last-Modified Dates">Section&nbsp;2.4</a> for a discussion of server behavior when both <a href="#header.if-modified-since" class="smpl">If-Modified-Since</a> and If-None-Match appear in the same request.)
    1017       </p>
    1018       <p id="rfc.section.3.2.p.8">Examples:</p>
     1012</pre><p id="rfc.section.3.2.p.5">The If-None-Match condition is met if and only if none of the entity-tags listed in the If-None-Match field value match the
     1013         entity-tag of the selected representation for the target resource (as per <a href="#entity.tag.comparison" title="Comparison">Section&nbsp;2.3.2</a>), or if "*" is given and no current representation exists for that resource.
     1014      </p>
     1015      <p id="rfc.section.3.2.p.6">If the condition is not met, the server <em class="bcp14">MUST NOT</em> perform the requested method. Instead, if the request method was GET or HEAD, the server <em class="bcp14">SHOULD</em> respond with a <a href="#status.304" class="smpl">304 (Not Modified)</a> status code, including the cache-related header fields (particularly <a href="#header.etag" class="smpl">ETag</a>) of the selected representation that has a matching entity-tag. For all other request methods, the server <em class="bcp14">MUST</em> respond with a <a href="#status.412" class="smpl">412 (Precondition
     1016            Failed)</a> status code.
     1017      </p>
     1018      <p id="rfc.section.3.2.p.7">If the condition is met, the server <em class="bcp14">MAY</em> perform the requested method as if the If-None-Match header field did not exist, but <em class="bcp14">MUST</em> also ignore any <a href="#header.if-modified-since" class="smpl">If-Modified-Since</a> header field(s) in the request. That is, if no entity-tags match, then the server <em class="bcp14">MUST NOT</em> return a <a href="#status.304" class="smpl">304
     1019            (Not Modified)</a> response.
     1020      </p>
     1021      <p id="rfc.section.3.2.p.8">If the request would, without the If-None-Match header field, result in anything other than a <a href="p2-semantics.html#status.2xx" class="smpl">2xx (Successful)</a> or <a href="#status.304" class="smpl">304 (Not Modified)</a> status code, then the If-None-Match header field <em class="bcp14">MUST</em> be ignored. (See <a href="#rules.for.when.to.use.entity.tags.and.last-modified.dates" title="Rules for When to Use Entity-tags and Last-Modified Dates">Section&nbsp;2.4</a> for a discussion of server behavior when both <a href="#header.if-modified-since" class="smpl">If-Modified-Since</a> and If-None-Match appear in the same request.)
     1022      </p>
     1023      <p id="rfc.section.3.2.p.9">Examples:</p>
    10191024      <div id="rfc.figure.u.12"></div><pre class="text">  If-None-Match: "xyzzy"
    10201025  If-None-Match: W/"xyzzy"
     
    10221027  If-None-Match: W/"xyzzy", W/"r2d2xxxx", W/"c3piozzzz"
    10231028  If-None-Match: *
    1024 </pre><p id="rfc.section.3.2.p.10">The result of a request having both an If-None-Match header field and either an <a href="#header.if-match" class="smpl">If-Match</a> or an <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a> header field is undefined by this specification.
     1029</pre><p id="rfc.section.3.2.p.11">The result of a request having both an If-None-Match header field and either an <a href="#header.if-match" class="smpl">If-Match</a> or an <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a> header field is undefined by this specification.
    10251030      </p>
    10261031      <div id="rfc.iref.i.3"></div>
     
    13271332         </li>
    13281333         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/363">http://tools.ietf.org/wg/httpbis/trac/ticket/363</a>&gt;: "Rare cases"
     1334         </li>
     1335         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/372">http://tools.ietf.org/wg/httpbis/trac/ticket/372</a>&gt;: "refactor conditional header field descriptions"
    13291336         </li>
    13301337      </ul>
Note: See TracChangeset for help on using the changeset viewer.