Ignore:
Timestamp:
Jul 1, 2011, 9:56:52 AM (8 years ago)
Author:
julian.reschke@…
Message:

add guidance on minimum sizes of protocol elements (see #282)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • draft-ietf-httpbis/latest/p6-cache.html

    r1321 r1323  
    550550                  </ul>
    551551               </li>
     552               <li>1.5&nbsp;&nbsp;&nbsp;<a href="#delta-seconds">Delta Seconds</a></li>
    552553            </ul>
    553554         </li>
     
    740741  <a href="#abnf.dependencies" class="smpl">pseudonym</a>     = &lt;pseudonym, defined in <a href="#Part1" id="rfc.xref.Part1.9"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#header.via" title="Via">Section 9.9</a>&gt;
    741742  <a href="#abnf.dependencies" class="smpl">uri-host</a>      = &lt;uri-host, defined in <a href="#Part1" id="rfc.xref.Part1.10"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#uri" title="Uniform Resource Identifiers">Section 2.7</a>&gt;
    742 </pre><h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a id="caching.overview" href="#caching.overview">Cache Operation</a></h1>
     743</pre><h2 id="rfc.section.1.5"><a href="#rfc.section.1.5">1.5</a>&nbsp;<a id="delta-seconds" href="#delta-seconds">Delta Seconds</a></h2>
     744      <p id="rfc.section.1.5.p.1">The delta-seconds rule specifies a non-negative integer, representing time in seconds.</p>
     745      <div id="rfc.figure.u.3"></div><pre class="inline"><span id="rfc.iref.g.1"></span>  <a href="#delta-seconds" class="smpl">delta-seconds</a>  = 1*<a href="#notation" class="smpl">DIGIT</a>
     746</pre><p id="rfc.section.1.5.p.3">If an implementation receives a delta-seconds value larger than the largest positive integer it can represent, or if any of
     747         its subsequent calculations overflows, it <em class="bcp14">MUST</em> consider the value to be 2147483648 (2<sup>31</sup>). Recipients parsing a delta-seconds value <em class="bcp14">SHOULD</em> use an arithmetic type of at least 31 bits of range, and senders <em class="bcp14">MUST NOT</em> send delta-seconds with a value greater than 2147483648.
     748      </p>
     749      <h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a id="caching.overview" href="#caching.overview">Cache Operation</a></h1>
    743750      <h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a>&nbsp;<a id="response.cacheability" href="#response.cacheability">Response Cacheability</a></h2>
    744751      <p id="rfc.section.2.1.p.1">A cache <em class="bcp14">MUST NOT</em> store a response to any request, unless:
     
    834841         algorithms, but does impose worst-case constraints on their results.
    835842      </p>
    836       <div id="rfc.figure.u.3"></div>
     843      <div id="rfc.figure.u.4"></div>
    837844      <p>The calculation to determine if a response is fresh is:</p>  <pre class="text">   response_is_fresh = (freshness_lifetime &gt; current_age)
    838845</pre> <p id="rfc.section.2.3.p.6">The freshness_lifetime is defined in <a href="#calculating.freshness.lifetime" title="Calculating Freshness Lifetime">Section&nbsp;2.3.1</a>; the current_age is defined in <a href="#age.calculations" title="Calculating Age">Section&nbsp;2.3.2</a>.
     
    918925         </li>
    919926      </ol>
    920       <div id="rfc.figure.u.4"></div> <pre class="text">  apparent_age = max(0, response_time - date_value);
     927      <div id="rfc.figure.u.5"></div> <pre class="text">  apparent_age = max(0, response_time - date_value);
    921928
    922929  response_delay = response_time - request_time;
    923930  corrected_age_value = age_value + response_delay; 
    924 </pre> <div id="rfc.figure.u.5"></div>
     931</pre> <div id="rfc.figure.u.6"></div>
    925932      <p>These are combined as</p>  <pre class="text">  corrected_initial_age = max(apparent_age, corrected_age_value);
    926933</pre><p id="rfc.section.2.3.2.p.11">The current_age of a stored response can then be calculated by adding the amount of time (in seconds) since the stored response
    927934         was last validated by the origin server to the corrected_initial_age.
    928935      </p>
    929       <div id="rfc.figure.u.6"></div><pre class="text">  resident_time = now - response_time;
     936      <div id="rfc.figure.u.7"></div><pre class="text">  resident_time = now - response_time;
    930937  current_age = corrected_initial_age + resident_time;
    931938</pre><h3 id="rfc.section.2.3.3"><a href="#rfc.section.2.3.3">2.3.3</a>&nbsp;<a id="serving.stale.responses" href="#serving.stale.responses">Serving Stale Responses</a></h3>
     
    10481055         validated at the origin server. Age values are calculated as specified in <a href="#age.calculations" title="Calculating Age">Section&nbsp;2.3.2</a>.
    10491056      </p>
    1050       <div id="rfc.figure.u.7"></div><pre class="inline"><span id="rfc.iref.g.1"></span>  <a href="#header.age" class="smpl">Age</a> = <a href="#rule.delta-seconds" class="smpl">delta-seconds</a>
    1051 </pre><div id="rule.delta-seconds">
    1052          <p id="rfc.section.3.1.p.3">  Age field-values are non-negative integers, representing time in seconds.</p>
    1053       </div>
    1054       <div id="rfc.figure.u.8"></div><pre class="inline"><span id="rfc.iref.g.2"></span>  <a href="#rule.delta-seconds" class="smpl">delta-seconds</a>  = 1*<a href="#notation" class="smpl">DIGIT</a>
    1055 </pre><p id="rfc.section.3.1.p.5">If a cache receives a value larger than the largest positive integer it can represent, or if any of its age calculations overflows,
    1056          it <em class="bcp14">MUST</em> transmit an Age header field with a field-value of 2147483648 (2<sup>31</sup>). Recipients parsing the Age header field-value <em class="bcp14">SHOULD</em> use an arithmetic type of at least 31 bits of range.
    1057       </p>
    1058       <p id="rfc.section.3.1.p.6">The presence of an Age header field in a response implies that a response is not first-hand. However, the converse is not
     1057      <div id="rfc.figure.u.8"></div><pre class="inline"><span id="rfc.iref.g.2"></span>  <a href="#header.age" class="smpl">Age</a> = <a href="#delta-seconds" class="smpl">delta-seconds</a>
     1058</pre><p id="rfc.section.3.1.p.3">Age field-values are non-negative integers, representing time in seconds (see <a href="#delta-seconds" title="Delta Seconds">Section&nbsp;1.5</a>).
     1059      </p>
     1060      <p id="rfc.section.3.1.p.4">The presence of an Age header field in a response implies that a response is not first-hand. However, the converse is not
    10591061         true, since HTTP/1.0 caches might not implement the Age header field.
    10601062      </p>
     
    10861088       "no-cache"
    10871089     / "no-store"
    1088      / "max-age" "=" <a href="#rule.delta-seconds" class="smpl">delta-seconds</a>
    1089      / "max-stale" [ "=" <a href="#rule.delta-seconds" class="smpl">delta-seconds</a> ]
    1090      / "min-fresh" "=" <a href="#rule.delta-seconds" class="smpl">delta-seconds</a>
     1090     / "max-age" "=" <a href="#delta-seconds" class="smpl">delta-seconds</a>
     1091     / "max-stale" [ "=" <a href="#delta-seconds" class="smpl">delta-seconds</a> ]
     1092     / "min-fresh" "=" <a href="#delta-seconds" class="smpl">delta-seconds</a>
    10911093     / "no-transform"
    10921094     / "only-if-cached"
     
    11581160     / "must-revalidate"
    11591161     / "proxy-revalidate"
    1160      / "max-age" "=" <a href="#rule.delta-seconds" class="smpl">delta-seconds</a>
    1161      / "s-maxage" "=" <a href="#rule.delta-seconds" class="smpl">delta-seconds</a>
     1162     / "max-age" "=" <a href="#delta-seconds" class="smpl">delta-seconds</a>
     1163     / "s-maxage" "=" <a href="#delta-seconds" class="smpl">delta-seconds</a>
    11621164     / <a href="#header.cache-control" class="smpl">cache-extension</a>
    11631165</pre><p id="rfc.section.3.2.2.p.2"> <dfn>public</dfn>  <span id="rfc.iref.c.12"></span>  <span id="rfc.iref.p.2"></span> 
     
    17551757 ) / ( "s-maxage=" delta-seconds ) / cache-extension
    17561758
    1757 <a href="#rule.delta-seconds" class="smpl">delta-seconds</a> = 1*DIGIT
     1759<a href="#delta-seconds" class="smpl">delta-seconds</a> = 1*DIGIT
    17581760
    17591761<a href="#header.pragma" class="smpl">extension-pragma</a> = token [ "=" ( token / quoted-string ) ]
     
    19671969         </li>
    19681970         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/235">http://tools.ietf.org/wg/httpbis/trac/ticket/235</a>&gt;: "Cache Invalidation only happens upon successful responses"
     1971         </li>
     1972         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/282">http://tools.ietf.org/wg/httpbis/trac/ticket/282</a>&gt;: "Recommend minimum sizes for protocol elements"
    19691973         </li>
    19701974         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/289">http://tools.ietf.org/wg/httpbis/trac/ticket/289</a>&gt;: "Proxies don't 'understand' methods"
     
    20192023                  <li><tt>Grammar</tt>&nbsp;&nbsp;
    20202024                     <ul>
    2021                         <li><tt>Age</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.1"><b>3.1</b></a></li>
     2025                        <li><tt>Age</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.2"><b>3.1</b></a></li>
    20222026                        <li><tt>Cache-Control</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.3"><b>3.2</b></a></li>
    20232027                        <li><tt>cache-extension</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.4"><b>3.2</b></a></li>
    20242028                        <li><tt>cache-request-directive</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.5"><b>3.2.1</b></a></li>
    20252029                        <li><tt>cache-response-directive</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.6"><b>3.2.2</b></a></li>
    2026                         <li><tt>delta-seconds</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.2"><b>3.1</b></a></li>
     2030                        <li><tt>delta-seconds</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.1"><b>1.5</b></a></li>
    20272031                        <li><tt>Expires</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.7"><b>3.3</b></a></li>
    20282032                        <li><tt>extension-pragma</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.10"><b>3.4</b></a></li>
Note: See TracChangeset for help on using the changeset viewer.