Ignore:
Timestamp:
Jul 31, 2008, 6:37:30 AM (11 years ago)
Author:
julian.reschke@…
Message:

Resolve #71: Clarify matching functions and add examples (closes #71).

File:
1 edited

Legend:

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

    r290 r298  
    473473         <tr>
    474474            <td class="header left"></td>
    475             <td class="header right">July 19, 2008</td>
     475            <td class="header right">July 31, 2008</td>
    476476         </tr>
    477477      </table>
     
    673673      </p>
    674674      <ul>
    675          <li>The strong comparison function: in order to be considered equal, both validators <em class="bcp14">MUST</em> be identical in every way, and both <em class="bcp14">MUST NOT</em> be weak.
    676          </li>
    677          <li>The weak comparison function: in order to be considered equal, both validators <em class="bcp14">MUST</em> be identical in every way, but either or both of them <em class="bcp14">MAY</em> be tagged as "weak" without affecting the result.
    678          </li>
    679       </ul>
    680       <p id="rfc.section.5.p.8">An entity tag is strong unless it is explicitly tagged as weak. <a href="#entity.tags" title="Entity Tags">Section&nbsp;3</a> gives the syntax for entity tags.
    681       </p>
    682       <p id="rfc.section.5.p.9">A Last-Modified time, when used as a validator in a request, is implicitly weak unless it is possible to deduce that it is
     675         <li>The strong comparison function: in order to be considered equal, both opaque-tags <em class="bcp14">MUST</em> be identical character-by-character, and both <em class="bcp14">MUST NOT</em> be weak.
     676         </li>
     677         <li>The weak comparison function: in order to be considered equal, both opaque-tags <em class="bcp14">MUST</em> be identical character-by-character.
     678         </li>
     679      </ul>
     680      <p id="rfc.section.5.p.8">The example below shows the results for a set of entity tag pairs, and both the weak and strong comparison function results:</p>
     681      <div id="rfc.table.u.1">
     682         <table summary="" class="tt full" cellpadding="3" cellspacing="0">
     683            <thead>
     684               <tr>
     685                  <th>ETag 1</th>
     686                  <th>ETag 2</th>
     687                  <th>Strong Comparison</th>
     688                  <th>Weak Comparison</th>
     689               </tr>
     690            </thead>
     691            <tbody>
     692               <tr>
     693                  <td>W/"1"</td>
     694                  <td>W/"1"</td>
     695                  <td>no match</td>
     696                  <td>match</td>
     697               </tr>
     698               <tr>
     699                  <td>W/"1"</td>
     700                  <td>W/"2"</td>
     701                  <td>no match</td>
     702                  <td>no match</td>
     703               </tr>
     704               <tr>
     705                  <td>W/"1"</td>
     706                  <td>"1"</td>
     707                  <td>no match</td>
     708                  <td>match</td>
     709               </tr>
     710               <tr>
     711                  <td>"1"</td>
     712                  <td>"1"</td>
     713                  <td>match</td>
     714                  <td>match</td>
     715               </tr>
     716            </tbody>
     717         </table>
     718      </div>
     719      <p id="rfc.section.5.p.9">An entity tag is strong unless it is explicitly tagged as weak. <a href="#entity.tags" title="Entity Tags">Section&nbsp;3</a> gives the syntax for entity tags.
     720      </p>
     721      <p id="rfc.section.5.p.10">A Last-Modified time, when used as a validator in a request, is implicitly weak unless it is possible to deduce that it is
    683722         strong, using the following rules:
    684723      </p>
     
    689728         </li>
    690729      </ul>
    691       <p id="rfc.section.5.p.10">or </p>
     730      <p id="rfc.section.5.p.11">or </p>
    692731      <ul>
    693732         <li>The validator is about to be used by a client in an If-Modified-Since or If-Unmodified-Since header, because the client has
     
    697736         <li>The presented Last-Modified time is at least 60 seconds before the Date value.</li>
    698737      </ul>
    699       <p id="rfc.section.5.p.11">or </p>
     738      <p id="rfc.section.5.p.12">or </p>
    700739      <ul>
    701740         <li>The validator is being compared by an intermediate cache to the validator stored in its cache entry for the entity, and</li>
     
    703742         <li>The presented Last-Modified time is at least 60 seconds before the Date value.</li>
    704743      </ul>
    705       <p id="rfc.section.5.p.12">This method relies on the fact that if two different responses were sent by the origin server during the same second, but
     744      <p id="rfc.section.5.p.13">This method relies on the fact that if two different responses were sent by the origin server during the same second, but
    706745         both had the same Last-Modified time, then at least one of those responses would have a Date value equal to its Last-Modified
    707746         time. The arbitrary 60-second limit guards against the possibility that the Date and Last-Modified values are generated from
    708747         different clocks, or at somewhat different times during the preparation of the response. An implementation <em class="bcp14">MAY</em> use a value larger than 60 seconds, if it is believed that 60 seconds is too short.
    709748      </p>
    710       <p id="rfc.section.5.p.13">If a client wishes to perform a sub-range retrieval on a value for which it has only a Last-Modified time and no opaque validator,
     749      <p id="rfc.section.5.p.14">If a client wishes to perform a sub-range retrieval on a value for which it has only a Last-Modified time and no opaque validator,
    711750         it <em class="bcp14">MAY</em> do this only if the Last-Modified time is strong in the sense described here.
    712751      </p>
    713       <p id="rfc.section.5.p.14">A cache or origin server receiving a conditional range request (<a href="#Part5" id="rfc.xref.Part5.3"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>) <em class="bcp14">MUST</em> use the strong comparison function to evaluate the condition.
    714       </p>
    715       <p id="rfc.section.5.p.15">These rules allow HTTP/1.1 caches and clients to safely perform sub-range retrievals on values that have been obtained from
     752      <p id="rfc.section.5.p.15">A cache or origin server receiving a conditional range request (<a href="#Part5" id="rfc.xref.Part5.3"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>) <em class="bcp14">MUST</em> use the strong comparison function to evaluate the condition.
     753      </p>
     754      <p id="rfc.section.5.p.16">These rules allow HTTP/1.1 caches and clients to safely perform sub-range retrievals on values that have been obtained from
    716755         HTTP/1.0 servers.
    717756      </p>
     
    11241163      </ul>
    11251164      <h2 id="rfc.section.B.5"><a href="#rfc.section.B.5">B.5</a>&nbsp;<a id="changes.since.03" href="#changes.since.03">Since draft-ietf-httpbis-p4-conditional-03</a></h2>
     1165      <p id="rfc.section.B.5.p.1">Closed issues: </p>
     1166      <ul>
     1167         <li> &lt;<a href="http://www3.tools.ietf.org/wg/httpbis/trac/ticket/71">http://www3.tools.ietf.org/wg/httpbis/trac/ticket/71</a>&gt;: "Examples for ETag matching"
     1168         </li>
     1169      </ul>
    11261170      <h1><a id="rfc.copyright" href="#rfc.copyright">Full Copyright Statement</a></h1>
    11271171      <p>This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the
Note: See TracChangeset for help on using the changeset viewer.