Ignore:
Timestamp:
11/08/13 02:07:00 (7 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

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