Ignore:
Timestamp:
24/09/13 00:36:40 (7 years ago)
Author:
fielding@…
Message:

The changes in [2361] and [2372] to address #479 had the unfortunate effect of making most caches noncompliant; this change removes the need for caches to process If-Match and If-Unmodified-Since and reduces the precondition evaluation to checking the stored response already selected by the cache

File:
1 edited

Legend:

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

    r2403 r2408  
    656656   one precondition is present.
    657657</t>
    658 <t>
    659    Requirements on a cache when handling a received conditional request are
    660    defined in &cache-validation-received;.
    661 </t>
    662658
    663659<section title="If-Match" anchor="header.if-match">
     
    666662<t>
    667663   The "If-Match" header field makes the request method conditional on the
    668    recipient cache or origin server either having at least one current
     664   recipient origin server either having at least one current
    669665   representation of the target resource, when the field-value is "*", or
    670666   having a current representation of the target resource that has an
     
    673669</t>
    674670<t>
    675    A recipient &MUST; use the strong comparison function when comparing
     671   An origin server &MUST; use the strong comparison function when comparing
    676672   entity-tags for If-Match (<xref target="entity.tag.comparison"/>), since
    677673   the client intends this precondition to prevent the method from being
     
    720716   of an immediately prior change made by the same user agent.
    721717</t>
     718<t>
     719   The If-Match header field can be ignored by caches and intermediaries
     720   because it is not applicable to a stored response.
     721</t>
    722722</section>
    723723
     
    727727<t>
    728728   The "If-None-Match" header field makes the request method conditional on
    729    the recipient cache or origin server either not having a current
     729   a recipient cache or origin server either not having any current
    730730   representation of the target resource, when the field-value is "*", or
    731    not having a current representation of the target resource that has an
    732    entity-tag matching a member of the list of entity-tags provided in the
    733    field-value.
     731   having a selected representation with an entity-tag that does not match any
     732   of those listed in the field-value.
    734733</t>
    735734<t>
     
    787786   b) the <x:ref>412 (Precondition Failed)</x:ref> status code for all other
    788787   request methods.
     788</t>
     789<t>
     790   Requirements on cache handling of a received If-None-Match header field
     791   are defined in &cache-validation-received;.
    789792</t>
    790793</section>
     
    864867   metadata that are useful for identifying or updating a previously cached
    865868   response.
     869</t>
     870<t>
     871   Requirements on cache handling of a received If-Modified-Since header field
     872   are defined in &cache-validation-received;.
    866873</t>
    867874</section>
     
    930937   of an immediately prior change made by the same user agent.
    931938</t>
     939<t>
     940   The If-Unmodified-Since header field can be ignored by caches and
     941   intermediaries because it is not applicable to a stored response.
     942</t>
    932943</section>
    933944
     
    936947   The "If-Range" header field provides a special conditional request
    937948   mechanism that is similar to the <x:ref>If-Match</x:ref> and
    938    <x:ref>If-Unmodified-Since</x:ref> header fields but instructs the recipient to
    939    ignore the <x:ref>Range</x:ref> header field if the validator doesn't
    940    match, resulting in transfer of the new selected representation instead of
    941    a 412 response. If-Range is defined in &header-if-range;.
     949   <x:ref>If-Unmodified-Since</x:ref> header fields but instructs the
     950   recipient to ignore the <x:ref>Range</x:ref> header field if the validator
     951   doesn't match, resulting in transfer of the new selected representation
     952   instead of a 412 response. If-Range is defined in &header-if-range;.
    942953</t>
    943954</section>
     
    967978   <x:ref>Cache-Control</x:ref>,
    968979   <x:ref>Content-Location</x:ref>,
     980   <x:ref>Date</x:ref>,
    969981   <x:ref>ETag</x:ref>,
    970982   <x:ref>Expires</x:ref>, and
     
    10081020<section title="Evaluation" anchor="evaluation">
    10091021<t>
    1010    Except when excluded below, a server &MUST; evaluate received request
    1011    preconditions after it has successfully performed its normal request checks
    1012    and just before it would perform the action associated with the request
    1013    method.
     1022   Except when excluded below, a recipient cache or origin server &MUST;
     1023   evaluate received request preconditions after it has successfully performed
     1024   its normal request checks and just before it would perform the action
     1025   associated with the request method.
    10141026   A server &MUST; ignore all received preconditions if its response to the
    10151027   same request without those conditions would have been a status code other
     
    10621074   preconditions defined by this specification in the following order:
    10631075   <list style="numbers">
    1064      <t anchor="precedence1">When <x:ref>If-Match</x:ref> is present, evaluate it:
     1076     <t anchor="precedence1">When recipient is the origin server and
     1077       <x:ref>If-Match</x:ref> is present,
     1078       evaluate the <x:ref>If-Match</x:ref> precondition:
    10651079       <list style="symbols">
    10661080         <t>if true, continue to step <xref target="precedence3" format="counter"/></t>
     
    10701084       </list>
    10711085     </t>
    1072      <t anchor="precedence2">When <x:ref>If-Match</x:ref> is not present and
    1073         <x:ref>If-Unmodified-Since</x:ref> is present, evaluate it:
     1086     <t anchor="precedence2">When recipient is the origin server,
     1087       <x:ref>If-Match</x:ref> is not present, and
     1088       <x:ref>If-Unmodified-Since</x:ref> is present,
     1089       evaluate the <x:ref>If-Unmodified-Since</x:ref> precondition:
    10741090       <list style="symbols">
    10751091         <t>if true, continue to step <xref target="precedence3" format="counter"/></t>
     
    10791095       </list>
    10801096     </t>
    1081      <t anchor="precedence3">When <x:ref>If-None-Match</x:ref> is present, evaluate it:
     1097     <t anchor="precedence3">When <x:ref>If-None-Match</x:ref> is present,
     1098       evaluate the <x:ref>If-None-Match</x:ref> precondition:
    10821099       <list style="symbols">
    10831100         <t>if true, continue to step <xref target="precedence5" format="counter"/></t>
     
    10871104     </t>
    10881105     <t anchor="precedence4">When the method is GET or HEAD,
    1089         <x:ref>If-None-Match</x:ref> is not present, and
    1090         <x:ref>If-Modified-Since</x:ref> is present, evaluate it:
     1106       <x:ref>If-None-Match</x:ref> is not present, and
     1107       <x:ref>If-Modified-Since</x:ref> is present,
     1108       evaluate the <x:ref>If-Modified-Since</x:ref> precondition:
    10911109       <list style="symbols">
    10921110         <t>if true, continue to step <xref target="precedence5" format="counter"/></t>
     
    10941112       </list>
    10951113     </t>
    1096      <t anchor="precedence5">When the method is GET and both <x:ref>Range</x:ref> and
    1097         <x:ref>If-Range</x:ref> are present, evaluate If-Range:
     1114     <t anchor="precedence5">When the method is GET and both
     1115       <x:ref>Range</x:ref> and <x:ref>If-Range</x:ref> are present,
     1116       evaluate the <x:ref>If-Range</x:ref> precondition:
    10981117       <list style="symbols">
    10991118         <t>if the validator matches and the Range specification is
Note: See TracChangeset for help on using the changeset viewer.