* WGs marked with an * asterisk has had at least one new draft made available during the last 5 days

Changeset 1761


Ignore:
Timestamp:
2012-07-12 03:14:44 (2 years ago)
Author:
julian.reschke@gmx.de
Message:

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

Location:
draft-ietf-httpbis/latest
Files:
2 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> 
  • draft-ietf-httpbis/latest/p4-conditional.xml

    r1758 r1761  
    758758</artwork></figure> 
    759759<t> 
    760    If any of the entity-tags listed in the If-Match field value match 
    761    (as per <xref target="entity.tag.comparison"/>) the entity-tag of the  
    762    selected representation for the target resource, 
    763    or if "*" is given and any current representation exists for the 
    764    target resource, then the server &MAY; perform the request method 
    765    as if the If-Match header field was not present. 
    766 </t> 
    767 <t> 
    768    Origin servers &MUST-NOT; perform the requested method if none of the 
    769    entity-tags match, or if "*" is given and no current representation 
    770    exists; instead they &MUST; respond with the <x:ref>412 (Precondition Failed)</x:ref> 
    771    status code. 
     760   The If-Match condition is met if and only if any of the entity-tags listed 
     761   in the If-Match field value match the entity-tag of the selected 
     762   representation for the target resource (as per <xref 
     763   target="entity.tag.comparison"/>), or if "*" is given and any current 
     764   representation exists for the target resource. 
     765</t> 
     766<t> 
     767   If the condition is met, the server &MAY; perform the request method as if 
     768   the If-Match header field was not present. 
     769</t> 
     770<t> 
     771   Origin servers &MUST-NOT; perform the requested method if the condition is 
     772   not met; instead they &MUST; respond with the <x:ref>412 (Precondition 
     773   Failed)</x:ref> status code. 
    772774</t> 
    773775<t> 
    774776   Proxy servers using a cached response as the selected representation 
    775    &MUST-NOT; perform the requested method if none of the entity-tags match, 
    776    or if "*" is given and no current representation exists; instead, they 
    777    &MUST; forward the request towards the origin server. 
     777   &MUST-NOT; perform the requested method if the condition is not met; 
     778   instead, they &MUST; forward the request towards the origin server. 
    778779</t> 
    779780<t> 
     
    827828</artwork></figure> 
    828829<t> 
    829    If any of the entity-tags listed in the If-None-Match field-value match 
    830    (as per <xref target="entity.tag.comparison"/>) the entity-tag of the  
    831    selected representation, or if "*" is 
    832    given and any current representation exists for that resource, then the 
    833    server &MUST-NOT; perform the requested method. 
    834    Instead, if the request method was GET or HEAD, the server &SHOULD; 
    835    respond with a <x:ref>304 (Not Modified)</x:ref> status code, including the cache-related 
    836    header fields (particularly <x:ref>ETag</x:ref>) of the selected representation that has 
    837    a matching entity-tag.  For all other request methods, the server &MUST; 
    838    respond with a <x:ref>412 (Precondition Failed)</x:ref> status code. 
    839 </t> 
    840 <t> 
    841    If none of the entity-tags match, then the server &MAY; perform the 
    842    requested method as if the If-None-Match header field did not exist, 
    843    but &MUST; also ignore any <x:ref>If-Modified-Since</x:ref> header field(s) 
    844    in the request. That is, if no entity-tags match, then the server &MUST-NOT; 
    845    return a <x:ref>304 (Not Modified)</x:ref> response. 
     830   The If-None-Match condition is met if and only if none of the entity-tags 
     831   listed in the If-None-Match field value match the entity-tag of the selected 
     832   representation for the target resource (as per <xref 
     833   target="entity.tag.comparison"/>), or if "*" is given and no current 
     834   representation exists for that resource. 
     835</t> 
     836<t> 
     837   If the condition is not met, the server &MUST-NOT; perform the requested 
     838   method. Instead, if the request method was GET or HEAD, the server &SHOULD; 
     839   respond with a <x:ref>304 (Not Modified)</x:ref> status code, including the 
     840   cache-related header fields (particularly <x:ref>ETag</x:ref>) of the 
     841   selected representation that has a matching entity-tag. For all other 
     842   request methods, the server &MUST; respond with a <x:ref>412 (Precondition 
     843   Failed)</x:ref> status code. 
     844</t> 
     845<t> 
     846   If the condition is met, the server &MAY; perform the requested method 
     847   as if the If-None-Match header field did not exist, but &MUST; also ignore 
     848   any <x:ref>If-Modified-Since</x:ref> header field(s) in the request. That 
     849   is, if no entity-tags match, then the server &MUST-NOT; return a <x:ref>304 
     850   (Not Modified)</x:ref> response. 
    846851</t> 
    847852<t> 
     
    14621467      "Rare cases" 
    14631468    </t> 
     1469    <t> 
     1470      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/372"/>: 
     1471      "refactor conditional header field descriptions" 
     1472    </t> 
    14641473  </list> 
    14651474</t> 
Note: See TracChangeset for help on using the changeset viewer.