Changeset 2354


Ignore:
Timestamp:
Aug 10, 2013, 7:07:00 PM (6 years ago)
Author:
fielding@…
Message:

Allow an origin server to respond with a success status if the precondition is on a state change that already succeeded; also, make the description of If-Unmodified-Since have the same conditions as If-Match; addresses #455

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

Legend:

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

    r2333 r2354  
    449449  }
    450450  @bottom-center {
    451        content: "Expires February 2, 2014";
     451       content: "Expires February 11, 2014";
    452452  }
    453453  @bottom-right {
     
    491491      <meta name="dct.creator" content="Reschke, J. F.">
    492492      <meta name="dct.identifier" content="urn:ietf:id:draft-ietf-httpbis-p4-conditional-latest">
    493       <meta name="dct.issued" scheme="ISO8601" content="2013-08-01">
     493      <meta name="dct.issued" scheme="ISO8601" content="2013-08-10">
    494494      <meta name="dct.replaces" content="urn:ietf:rfc:2616">
    495495      <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.">
     
    517517            </tr>
    518518            <tr>
    519                <td class="left">Expires: February 2, 2014</td>
    520                <td class="right">August 1, 2013</td>
     519               <td class="left">Expires: February 11, 2014</td>
     520               <td class="right">August 10, 2013</td>
    521521            </tr>
    522522         </tbody>
     
    545545         in progress”.
    546546      </p>
    547       <p>This Internet-Draft will expire on February 2, 2014.</p>
     547      <p>This Internet-Draft will expire on February 11, 2014.</p>
    548548      <h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1>
    549549      <p>Copyright © 2013 IETF Trust and the persons identified as the document authors. All rights reserved.</p>
     
    950950      <p id="rfc.section.3.1.p.5">If the condition is met, the server <em class="bcp14">MAY</em> perform the request method.
    951951      </p>
    952       <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
    953             Failed)</a> status code.
    954       </p>
    955       <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.
     952      <p id="rfc.section.3.1.p.6">An origin server <em class="bcp14">MUST NOT</em> perform the requested method if the condition is not met; instead the origin server <em class="bcp14">MUST</em> respond with either: a) the <a href="#status.412" class="smpl">412 (Precondition Failed)</a> status code; or, b) one of the <a href="p2-semantics.html#status.2xx" class="smpl">2xx (Successful)</a> status codes if the origin server has verified that a state change is being requested and the final state is already reflected
     953         in the current state of the target resource (i.e., the change requested by the user agent has already succeeded, but the user
     954         agent might not be aware of that due to the prior response message being lost or because a compatible change was made by some
     955         other user agent). In the latter case, the origin server <em class="bcp14">MUST NOT</em> send a <a href="p2-semantics.html#status.204" class="smpl">204 (No Content)</a> status code unless it can verify that the request is a duplicate of an immediately prior change made by the same user agent.
     956      </p>
     957      <p id="rfc.section.3.1.p.7">A proxy 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, the proxy <em class="bcp14">MUST</em> forward the request towards the origin server.
    956958      </p>
    957959      <p id="rfc.section.3.1.p.8">Examples:</p>
     
    10321034      <h2 id="rfc.section.3.4"><a href="#rfc.section.3.4">3.4</a>&nbsp;<a id="header.if-unmodified-since" href="#header.if-unmodified-since">If-Unmodified-Since</a></h2>
    10331035      <p id="rfc.section.3.4.p.1">The "If-Unmodified-Since" header field can be used to make a request method conditional by modification date: if the selected
    1034          representation has been modified since the time specified in this field, then the server <em class="bcp14">MUST NOT</em> perform the requested operation and <em class="bcp14">MUST</em> instead respond with the <a href="#status.412" class="smpl">412 (Precondition Failed)</a> status code. If the selected representation has not been modified since the time specified in this field, the server <em class="bcp14">MAY</em> perform the request.
     1036         representation has not been modified since the time specified in this field, then the condition is met. If-Unmodified-Since
     1037         is useful for resource update requests, when the resource does not provide entity-tag values, as a means for protecting against
     1038         accidental overwrites when multiple clients are acting in parallel on the same resource (i.e., the "lost update" problem).
    10351039      </p>
    10361040      <div id="rfc.figure.u.14"></div><pre class="inline"><span id="rfc.iref.g.10"></span>  <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a> = <a href="#imported.abnf" class="smpl">HTTP-date</a>
    10371041</pre><p id="rfc.section.3.4.p.3">An example of the field is:</p>
    10381042      <div id="rfc.figure.u.15"></div><pre class="text">  If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT
    1039 </pre><p id="rfc.section.3.4.p.5">A server <em class="bcp14">MUST</em> ignore the If-Unmodified-Since header field if the received value is not a valid HTTP-date.
     1043</pre><p id="rfc.section.3.4.p.5">If the condition is met, the server <em class="bcp14">MAY</em> perform the request method.
     1044      </p>
     1045      <p id="rfc.section.3.4.p.6">An origin server <em class="bcp14">MUST NOT</em> perform the requested method if the condition is not met; instead the origin server <em class="bcp14">MUST</em> respond with either: a) the <a href="#status.412" class="smpl">412 (Precondition Failed)</a> status code; or, b) one of the <a href="p2-semantics.html#status.2xx" class="smpl">2xx (Successful)</a> status codes if the origin server has verified that a state change is being requested and the final state is already reflected
     1046         in the current state of the target resource (i.e., the change requested by the user agent has already succeeded, but the user
     1047         agent might not be aware of that due to the prior response message being lost or because a compatible change was made by some
     1048         other user agent). In the latter case, the origin server <em class="bcp14">MUST NOT</em> send a <a href="p2-semantics.html#status.204" class="smpl">204 (No Content)</a> status code unless it can verify that the request is a duplicate of an immediately prior change made by the same user agent.
     1049      </p>
     1050      <p id="rfc.section.3.4.p.7">A proxy 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, the proxy <em class="bcp14">MUST</em> forward the request towards the origin server.
     1051      </p>
     1052      <p id="rfc.section.3.4.p.8">A server <em class="bcp14">MUST</em> ignore the If-Unmodified-Since header field if the received value is not a valid HTTP-date.
    10401053      </p>
    10411054      <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>
     
    11001113            <ul>
    11011114               <li>if true, continue to step <a href="#precedence3">3</a></li>
    1102                <li>if false, respond <a href="#status.412" class="smpl">412 (Precondition Failed)</a></li>
     1115               <li>if false, respond <a href="#status.412" class="smpl">412 (Precondition Failed)</a> unless it can be determined that the state-changing request has already succeeded (see <a href="#header.if-match" id="rfc.xref.header.if-match.1" title="If-Match">Section&nbsp;3.1</a>)
     1116               </li>
    11031117            </ul>
    11041118         </li>
     
    11061120            <ul>
    11071121               <li>if true, continue to step <a href="#precedence3">3</a></li>
    1108                <li>if false, respond <a href="#status.412" class="smpl">412 (Precondition Failed)</a></li>
     1122               <li>if false, respond <a href="#status.412" class="smpl">412 (Precondition Failed)</a> unless it can be determined that the state-changing request has already succeeded (see <a href="#header.if-unmodified-since" id="rfc.xref.header.if-unmodified-since.1" title="If-Unmodified-Since">Section&nbsp;3.4</a>)
     1123               </li>
    11091124            </ul>
    11101125         </li>
     
    11961211                  <td class="left">http</td>
    11971212                  <td class="left">standard</td>
    1198                   <td class="left"><a href="#header.if-match" id="rfc.xref.header.if-match.1" title="If-Match">Section&nbsp;3.1</a>
     1213                  <td class="left"><a href="#header.if-match" id="rfc.xref.header.if-match.2" title="If-Match">Section&nbsp;3.1</a>
    11991214                  </td>
    12001215               </tr>
     
    12171232                  <td class="left">http</td>
    12181233                  <td class="left">standard</td>
    1219                   <td class="left"><a href="#header.if-unmodified-since" id="rfc.xref.header.if-unmodified-since.1" title="If-Unmodified-Since">Section&nbsp;3.4</a>
     1234                  <td class="left"><a href="#header.if-unmodified-since" id="rfc.xref.header.if-unmodified-since.2" title="If-Unmodified-Since">Section&nbsp;3.4</a>
    12201235                  </td>
    12211236               </tr>
     
    14651480            </li>
    14661481            <li><a id="rfc.index.I" href="#rfc.index.I"><b>I</b></a><ul>
    1467                   <li>If-Match header field&nbsp;&nbsp;<a href="#rfc.iref.i.1"><b>3.1</b></a>, <a href="#rfc.xref.header.if-match.1">6.2</a></li>
     1482                  <li>If-Match header field&nbsp;&nbsp;<a href="#rfc.iref.i.1"><b>3.1</b></a>, <a href="#rfc.xref.header.if-match.1">5</a>, <a href="#rfc.xref.header.if-match.2">6.2</a></li>
    14681483                  <li>If-Modified-Since header field&nbsp;&nbsp;<a href="#rfc.iref.i.3"><b>3.3</b></a>, <a href="#rfc.xref.header.if-modified-since.1">6.2</a></li>
    14691484                  <li>If-None-Match header field&nbsp;&nbsp;<a href="#rfc.iref.i.2"><b>3.2</b></a>, <a href="#rfc.xref.header.if-none-match.1">6.2</a>, <a href="#rfc.xref.header.if-none-match.2">A</a></li>
    1470                   <li>If-Unmodified-Since header field&nbsp;&nbsp;<a href="#rfc.iref.i.4"><b>3.4</b></a>, <a href="#rfc.xref.header.if-unmodified-since.1">6.2</a></li>
     1485                  <li>If-Unmodified-Since header field&nbsp;&nbsp;<a href="#rfc.iref.i.4"><b>3.4</b></a>, <a href="#rfc.xref.header.if-unmodified-since.1">5</a>, <a href="#rfc.xref.header.if-unmodified-since.2">6.2</a></li>
    14711486               </ul>
    14721487            </li>
  • draft-ietf-httpbis/latest/p4-conditional.xml

    r2333 r2354  
    687687</t>
    688688<t>
    689    Origin servers &MUST-NOT; perform the requested method if the condition is
    690    not met; instead they &MUST; respond with the <x:ref>412 (Precondition
    691    Failed)</x:ref> status code.
    692 </t>
    693 <t>
    694    Proxy servers using a cached response as the selected representation
     689   An origin server &MUST-NOT; perform the requested method if the condition
     690   is not met; instead the origin server &MUST; respond with either:
     691   a) the <x:ref>412 (Precondition Failed)</x:ref> status code; or,
     692   b) one of the <x:ref>2xx (Successful)</x:ref> status codes if the origin
     693   server has verified that a state change is being requested and the final
     694   state is already reflected in the current state of the target resource
     695   (i.e., the change requested by the user agent has already succeeded, but
     696   the user agent might not be aware of that due to the prior response message
     697   being lost or because a compatible change was made by some other user
     698   agent). In the latter case, the origin server &MUST-NOT; send a
     699   <x:ref>204 (No Content)</x:ref> status code unless it can verify that the
     700   request is a duplicate of an immediately prior change made by the same user
     701   agent.
     702</t>
     703<t>
     704   A proxy using a cached response as the selected representation
    695705   &MUST-NOT; perform the requested method if the condition is not met;
    696    instead, they &MUST; forward the request towards the origin server.
     706   instead, the proxy &MUST; forward the request towards the origin server.
    697707</t>
    698708<t>
     
    853863   The "If-Unmodified-Since" header field can be used to make a request
    854864   method conditional by modification date: if the selected representation
    855    has been modified since the time specified in this field, then the
    856    server &MUST-NOT; perform the requested operation and &MUST; instead
    857    respond with the <x:ref>412 (Precondition Failed)</x:ref> status code.
    858    If the selected representation has not been modified since the time
    859    specified in this field, the server &MAY; perform the request.
     865   has not been modified since the time specified in this field, then the
     866   condition is met.  If-Unmodified-Since is useful for resource update
     867   requests, when the resource does not provide entity-tag values, as a means
     868   for protecting against accidental overwrites when multiple clients are
     869   acting in parallel on the same resource (i.e., the "lost update" problem).
    860870</t>
    861871<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Unmodified-Since"/>
     
    868878  If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT
    869879</artwork></figure>
     880<t>
     881   If the condition is met, the server &MAY; perform the request method.
     882</t>
     883<t>
     884   An origin server &MUST-NOT; perform the requested method if the condition
     885   is not met; instead the origin server &MUST; respond with either:
     886   a) the <x:ref>412 (Precondition Failed)</x:ref> status code; or,
     887   b) one of the <x:ref>2xx (Successful)</x:ref> status codes if the origin
     888   server has verified that a state change is being requested and the final
     889   state is already reflected in the current state of the target resource
     890   (i.e., the change requested by the user agent has already succeeded, but
     891   the user agent might not be aware of that due to the prior response message
     892   being lost or because a compatible change was made by some other user
     893   agent). In the latter case, the origin server &MUST-NOT; send a
     894   <x:ref>204 (No Content)</x:ref> status code unless it can verify that the
     895   request is a duplicate of an immediately prior change made by the same user
     896   agent.
     897</t>
     898<t>
     899   A proxy using a cached response as the selected representation
     900   &MUST-NOT; perform the requested method if the condition is not met;
     901   instead, the proxy &MUST; forward the request towards the origin server.
     902</t>
    870903<t>
    871904   A server &MUST; ignore the If-Unmodified-Since header field if the
     
    10181051       <list style="symbols">
    10191052         <t>if true, continue to step <xref target="precedence3" format="counter"/></t>
    1020          <t>if false, respond <x:ref>412 (Precondition Failed)</x:ref></t>
     1053         <t>if false, respond <x:ref>412 (Precondition Failed)</x:ref> unless
     1054            it can be determined that the state-changing request has already
     1055            succeeded (see <xref target="header.if-match"/>)</t>
    10211056       </list>
    10221057     </t>
     
    10251060       <list style="symbols">
    10261061         <t>if true, continue to step <xref target="precedence3" format="counter"/></t>
    1027          <t>if false, respond <x:ref>412 (Precondition Failed)</x:ref></t>
     1062         <t>if false, respond <x:ref>412 (Precondition Failed)</x:ref> unless
     1063            it can be determined that the state-changing request has already
     1064            succeeded (see <xref target="header.if-unmodified-since"/>)</t>
    10281065       </list>
    10291066     </t>
     
    12341271    <x:defines>2xx (Successful)</x:defines>
    12351272    <x:defines>200 (OK)</x:defines>
     1273    <x:defines>204 (No Content)</x:defines>
    12361274    <x:defines>Accept-Encoding</x:defines>
    12371275    <x:defines>Content-Location</x:defines>
Note: See TracChangeset for help on using the changeset viewer.