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