* WGs marked with an * asterisk has had at least one new draft made available during the last 5 days

Changeset 737


Ignore:
Timestamp:
2009-12-29 01:22:21 (5 years ago)
Author:
mnot@pobox.com
Message:

require understanding of response status code, as well as response cacheability, for storing a response (see #199).

Location:
draft-ietf-httpbis/latest
Files:
2 edited

Legend:

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

    r736 r737  
    402402      <meta name="DC.Creator" content="Reschke, J. F."> 
    403403      <meta name="DC.Identifier" content="urn:ietf:id:draft-ietf-httpbis-p6-cache-latest"> 
    404       <meta name="DC.Date.Issued" scheme="ISO8601" content="2009-12-22"> 
     404      <meta name="DC.Date.Issued" scheme="ISO8601" content="2009-12-29"> 
    405405      <meta name="DC.Relation.Replaces" content="urn:ietf:rfc:2616"> 
    406406      <meta name="DC.Description.Abstract" content="The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. This document is Part 6 of the seven-part specification that defines the protocol referred to as &#34;HTTP/1.1&#34; and, taken together, obsoletes RFC 2616. Part 6 defines requirements on HTTP caches and the associated header fields that control cache behavior or indicate cacheable response messages."> 
     
    435435            </tr> 
    436436            <tr> 
    437                <td class="left">Expires: June 25, 2010</td> 
     437               <td class="left">Expires: July 2, 2010</td> 
    438438               <td class="right">HP</td> 
    439439            </tr> 
     
    492492            <tr> 
    493493               <td class="left"></td> 
    494                <td class="right">December 22, 2009</td> 
     494               <td class="right">December 29, 2009</td> 
    495495            </tr> 
    496496         </tbody> 
     
    522522      <p>The list of Internet-Draft Shadow Directories can be accessed at &lt;<a href="http://www.ietf.org/shadow.html">http://www.ietf.org/shadow.html</a>&gt;. 
    523523      </p> 
    524       <p>This Internet-Draft will expire in June 25, 2010.</p> 
     524      <p>This Internet-Draft will expire in July 2, 2010.</p> 
    525525      <h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1> 
    526526      <p>Copyright © 2009 IETF Trust and the persons identified as the document authors. All rights reserved.</p> 
     
    725725      <ul> 
    726726         <li>The request method is understood by the cache and defined as being cacheable, and</li> 
    727          <li>The response status is understood by the cache and defined as being cacheable, and</li> 
     727         <li>the response status code is understood by the cache, and</li> 
    728728         <li>the "no-store" cache directive (see <a href="#header.cache-control" id="rfc.xref.header.cache-control.1" title="Cache-Control">Section&nbsp;3.2</a>) does not appear in request or response headers, and 
    729729         </li> 
    730          <li>the "private" cache response directive (see <a href="#header.cache-control" id="rfc.xref.header.cache-control.2" title="Cache-Control">Section&nbsp;3.2</a> does not appear in the response, if the cache is shared, and 
    731          </li> 
    732          <li>the "Authorization" header (see <a href="p7-auth.html#header.authorization" title="Authorization">Section 3.1</a> of <a href="#Part7" id="rfc.xref.Part7.1"><cite title="HTTP/1.1, part 7: Authentication">[Part7]</cite></a>) does not appear in the request, if the cache is shared (unless the "public" directive is present; see <a href="#header.cache-control" id="rfc.xref.header.cache-control.3" title="Cache-Control">Section&nbsp;3.2</a>), and 
    733          </li> 
    734          <li>the cache understands partial responses, if the response is partial or incomplete (see <a href="#errors.or.incomplete.response.cache.behavior" title="Storing Partial and Incomplete Responses">Section&nbsp;2.1.1</a>). 
    735          </li> 
    736       </ul> 
    737       <p id="rfc.section.2.1.p.2">Note that in normal operation, most caches will not store a response that has neither a cache validator nor an explicit expiration 
     730         <li>the "private" cache response directive (see <a href="#cache-response-directive" title="Response Cache-Control Directives">Section&nbsp;3.2.2</a> does not appear in the response, if the cache is shared, and 
     731         </li> 
     732         <li>the "Authorization" header (see <a href="p7-auth.html#header.authorization" title="Authorization">Section 3.1</a> of <a href="#Part7" id="rfc.xref.Part7.1"><cite title="HTTP/1.1, part 7: Authentication">[Part7]</cite></a>) does not appear in the request, if the cache is shared (unless the "public" directive is present; see <a href="#header.cache-control" id="rfc.xref.header.cache-control.2" title="Cache-Control">Section&nbsp;3.2</a>), and 
     733         </li> 
     734         <li>the response either:  
     735            <ul> 
     736               <li>contains an Expires header (see <a href="#header.expires" id="rfc.xref.header.expires.1" title="Expires">Section&nbsp;3.3</a>), or 
     737               </li> 
     738               <li>contains a max-age response cache directive (see <a href="#cache-response-directive" title="Response Cache-Control Directives">Section&nbsp;3.2.2</a>), or 
     739               </li> 
     740               <li>contains a s-maxage response cache directive and the cache is shared, or</li> 
     741               <li>contains a Cache Control Extension (see <a href="#cache.control.extensions" title="Cache Control Extensions">Section&nbsp;3.2.3</a>) that allows it to be cached, or 
     742               </li> 
     743               <li>has a status code that can be served with heuristic freshness (see <a href="#heuristic.freshness" title="Calculating Heuristic Freshness">Section&nbsp;2.3.1.1</a>). 
     744               </li> 
     745            </ul>  
     746         </li> 
     747      </ul> 
     748      <p id="rfc.section.2.1.p.2">In this context, a cache has "understood" a request method or a response status code if it recognises it and implements any 
     749         cache-specific behaviour. In particular, 206 Partial Content responses cannot be cached by an implementation that does not 
     750         handle partial content (see <a href="#errors.or.incomplete.response.cache.behavior" title="Storing Partial and Incomplete Responses">Section&nbsp;2.1.1</a>). 
     751      </p> 
     752      <p id="rfc.section.2.1.p.3">Note that in normal operation, most caches will not store a response that has neither a cache validator nor an explicit expiration 
    738753         time, as such responses are not usually useful to store. However, caches are not prohibited from storing such responses. 
    739754      </p> 
     
    754769         <li>selecting request-headers nominated by the stored response (if any) match those presented (see <a href="#caching.negotiated.responses" title="Caching Negotiated Responses">Section&nbsp;2.6</a>), and 
    755770         </li> 
    756          <li>the presented request and stored response are free from directives that would prevent its use (see <a href="#header.cache-control" id="rfc.xref.header.cache-control.4" title="Cache-Control">Section&nbsp;3.2</a> and <a href="#header.pragma" id="rfc.xref.header.pragma.1" title="Pragma">Section&nbsp;3.4</a>), and 
     771         <li>the presented request and stored response are free from directives that would prevent its use (see <a href="#header.cache-control" id="rfc.xref.header.cache-control.3" title="Cache-Control">Section&nbsp;3.2</a> and <a href="#header.pragma" id="rfc.xref.header.pragma.1" title="Pragma">Section&nbsp;3.4</a>), and 
    757772         </li> 
    758773         <li>the stored response is either:  
     
    786801      </p> 
    787802      <p id="rfc.section.2.3.p.2">The primary mechanism for determining freshness is for an origin server to provide an explicit expiration time in the future, 
    788          using either the Expires header (<a href="#header.expires" id="rfc.xref.header.expires.1" title="Expires">Section&nbsp;3.3</a>) or the max-age response cache directive (<a href="#cache-response-directive" title="Response Cache-Control Directives">Section&nbsp;3.2.2</a>). Generally, origin servers will assign future explicit expiration times to responses in the belief that the entity is not 
     803         using either the Expires header (<a href="#header.expires" id="rfc.xref.header.expires.2" title="Expires">Section&nbsp;3.3</a>) or the max-age response cache directive (<a href="#cache-response-directive" title="Response Cache-Control Directives">Section&nbsp;3.2.2</a>). Generally, origin servers will assign future explicit expiration times to responses in the belief that the entity is not 
    789804         likely to change in a semantically significant way before the expiration time is reached. 
    790805      </p> 
     
    816831         <li>If the max-age response cache directive (<a href="#cache-response-directive" title="Response Cache-Control Directives">Section&nbsp;3.2.2</a>) is present, use its value, or 
    817832         </li> 
    818          <li>If the Expires response header (<a href="#header.expires" id="rfc.xref.header.expires.2" title="Expires">Section&nbsp;3.3</a>) is present, use its value minus the value of the Date response header, or 
     833         <li>If the Expires response header (<a href="#header.expires" id="rfc.xref.header.expires.3" title="Expires">Section&nbsp;3.3</a>) is present, use its value minus the value of the Date response header, or 
    819834         </li> 
    820835         <li>Otherwise, no explicit expiration time is present in the response, but a heuristic may be used; see <a href="#heuristic.freshness" title="Calculating Heuristic Freshness">Section&nbsp;2.3.1.1</a>. 
     
    14081423                  <td class="left">http</td> 
    14091424                  <td class="left">standard</td> 
    1410                   <td class="left"> <a href="#header.cache-control" id="rfc.xref.header.cache-control.5" title="Cache-Control">Section&nbsp;3.2</a>  
     1425                  <td class="left"> <a href="#header.cache-control" id="rfc.xref.header.cache-control.4" title="Cache-Control">Section&nbsp;3.2</a>  
    14111426                  </td> 
    14121427               </tr> 
     
    14151430                  <td class="left">http</td> 
    14161431                  <td class="left">standard</td> 
    1417                   <td class="left"> <a href="#header.expires" id="rfc.xref.header.expires.3" title="Expires">Section&nbsp;3.3</a>  
     1432                  <td class="left"> <a href="#header.expires" id="rfc.xref.header.expires.4" title="Expires">Section&nbsp;3.3</a>  
    14181433                  </td> 
    14191434               </tr> 
     
    15411556      <h1 id="rfc.section.A" class="np"><a href="#rfc.section.A">A.</a>&nbsp;<a id="compatibility" href="#compatibility">Compatibility with Previous Versions</a></h1> 
    15421557      <h2 id="rfc.section.A.1"><a href="#rfc.section.A.1">A.1</a>&nbsp;<a id="changes.from.rfc.2068" href="#changes.from.rfc.2068">Changes from RFC 2068</a></h2> 
    1543       <p id="rfc.section.A.1.p.1">A case was missed in the Cache-Control model of HTTP/1.1; s-maxage was introduced to add this missing case. (Sections <a href="#response.cacheability" title="Response Cacheability">2.1</a>, <a href="#header.cache-control" id="rfc.xref.header.cache-control.6" title="Cache-Control">3.2</a>). 
     1558      <p id="rfc.section.A.1.p.1">A case was missed in the Cache-Control model of HTTP/1.1; s-maxage was introduced to add this missing case. (Sections <a href="#response.cacheability" title="Response Cacheability">2.1</a>, <a href="#header.cache-control" id="rfc.xref.header.cache-control.5" title="Cache-Control">3.2</a>). 
    15441559      </p> 
    15451560      <p id="rfc.section.A.1.p.2">Transfer-coding and message lengths all interact in ways that required fixing exactly when chunked encoding is used (to allow 
     
    15541569      <p id="rfc.section.A.1.p.5">The Cache-Control: max-age directive was not properly defined for responses. (<a href="#cache-response-directive" title="Response Cache-Control Directives">Section&nbsp;3.2.2</a>) 
    15551570      </p> 
    1556       <p id="rfc.section.A.1.p.6">Warnings could be cached incorrectly, or not updated appropriately. (Section <a href="#expiration.model" title="Freshness Model">2.3</a>, <a href="#combining.headers" title="Combining Responses">2.7</a>, <a href="#header.cache-control" id="rfc.xref.header.cache-control.7" title="Cache-Control">3.2</a>, and <a href="#header.warning" id="rfc.xref.header.warning.4" title="Warning">3.6</a>) Warning also needed to be a general header, as PUT or other methods may have need for it in requests. 
     1571      <p id="rfc.section.A.1.p.6">Warnings could be cached incorrectly, or not updated appropriately. (Section <a href="#expiration.model" title="Freshness Model">2.3</a>, <a href="#combining.headers" title="Combining Responses">2.7</a>, <a href="#header.cache-control" id="rfc.xref.header.cache-control.6" title="Cache-Control">3.2</a>, and <a href="#header.warning" id="rfc.xref.header.warning.4" title="Warning">3.6</a>) Warning also needed to be a general header, as PUT or other methods may have need for it in requests. 
    15571572      </p> 
    15581573      <h2 id="rfc.section.A.2"><a href="#rfc.section.A.2">A.2</a>&nbsp;<a id="changes.from.rfc.2616" href="#changes.from.rfc.2616">Changes from RFC 2616</a></h2> 
     
    17751790                     </ul> 
    17761791                  </li> 
    1777                   <li class="indline1">Cache-Control header&nbsp;&nbsp;<a class="iref" href="#rfc.xref.header.cache-control.1">2.1</a>, <a class="iref" href="#rfc.xref.header.cache-control.2">2.1</a>, <a class="iref" href="#rfc.xref.header.cache-control.3">2.1</a>, <a class="iref" href="#rfc.xref.header.cache-control.4">2.2</a>, <a class="iref" href="#rfc.iref.c.3"><b>3.2</b></a>, <a class="iref" href="#rfc.xref.header.cache-control.5">5.1</a>, <a class="iref" href="#rfc.xref.header.cache-control.6">A.1</a>, <a class="iref" href="#rfc.xref.header.cache-control.7">A.1</a></li> 
     1792                  <li class="indline1">Cache-Control header&nbsp;&nbsp;<a class="iref" href="#rfc.xref.header.cache-control.1">2.1</a>, <a class="iref" href="#rfc.xref.header.cache-control.2">2.1</a>, <a class="iref" href="#rfc.xref.header.cache-control.3">2.2</a>, <a class="iref" href="#rfc.iref.c.3"><b>3.2</b></a>, <a class="iref" href="#rfc.xref.header.cache-control.4">5.1</a>, <a class="iref" href="#rfc.xref.header.cache-control.5">A.1</a>, <a class="iref" href="#rfc.xref.header.cache-control.6">A.1</a></li> 
    17781793                  <li class="indline1">cacheable&nbsp;&nbsp;<a class="iref" href="#rfc.iref.c.2">1.2</a></li> 
    17791794               </ul> 
    17801795            </li> 
    17811796            <li class="indline0"><a id="rfc.index.E" href="#rfc.index.E"><b>E</b></a><ul class="ind"> 
    1782                   <li class="indline1">Expires header&nbsp;&nbsp;<a class="iref" href="#rfc.xref.header.expires.1">2.3</a>, <a class="iref" href="#rfc.xref.header.expires.2">2.3.1</a>, <a class="iref" href="#rfc.iref.e.2"><b>3.3</b></a>, <a class="iref" href="#rfc.xref.header.expires.3">5.1</a></li> 
     1797                  <li class="indline1">Expires header&nbsp;&nbsp;<a class="iref" href="#rfc.xref.header.expires.1">2.1</a>, <a class="iref" href="#rfc.xref.header.expires.2">2.3</a>, <a class="iref" href="#rfc.xref.header.expires.3">2.3.1</a>, <a class="iref" href="#rfc.iref.e.2"><b>3.3</b></a>, <a class="iref" href="#rfc.xref.header.expires.4">5.1</a></li> 
    17831798                  <li class="indline1">explicit expiration time&nbsp;&nbsp;<a class="iref" href="#rfc.iref.e.1">1.2</a></li> 
    17841799               </ul> 
     
    18241839                     <ul class="ind"> 
    18251840                        <li class="indline1">Age&nbsp;&nbsp;<a class="iref" href="#rfc.xref.header.age.1">2.2</a>, <a class="iref" href="#rfc.iref.h.2"><b>3.1</b></a>, <a class="iref" href="#rfc.xref.header.age.2">5.1</a></li> 
    1826                         <li class="indline1">Cache-Control&nbsp;&nbsp;<a class="iref" href="#rfc.xref.header.cache-control.1">2.1</a>, <a class="iref" href="#rfc.xref.header.cache-control.2">2.1</a>, <a class="iref" href="#rfc.xref.header.cache-control.3">2.1</a>, <a class="iref" href="#rfc.xref.header.cache-control.4">2.2</a>, <a class="iref" href="#rfc.iref.h.3"><b>3.2</b></a>, <a class="iref" href="#rfc.xref.header.cache-control.5">5.1</a>, <a class="iref" href="#rfc.xref.header.cache-control.6">A.1</a>, <a class="iref" href="#rfc.xref.header.cache-control.7">A.1</a></li> 
    1827                         <li class="indline1">Expires&nbsp;&nbsp;<a class="iref" href="#rfc.xref.header.expires.1">2.3</a>, <a class="iref" href="#rfc.xref.header.expires.2">2.3.1</a>, <a class="iref" href="#rfc.iref.h.4"><b>3.3</b></a>, <a class="iref" href="#rfc.xref.header.expires.3">5.1</a></li> 
     1841                        <li class="indline1">Cache-Control&nbsp;&nbsp;<a class="iref" href="#rfc.xref.header.cache-control.1">2.1</a>, <a class="iref" href="#rfc.xref.header.cache-control.2">2.1</a>, <a class="iref" href="#rfc.xref.header.cache-control.3">2.2</a>, <a class="iref" href="#rfc.iref.h.3"><b>3.2</b></a>, <a class="iref" href="#rfc.xref.header.cache-control.4">5.1</a>, <a class="iref" href="#rfc.xref.header.cache-control.5">A.1</a>, <a class="iref" href="#rfc.xref.header.cache-control.6">A.1</a></li> 
     1842                        <li class="indline1">Expires&nbsp;&nbsp;<a class="iref" href="#rfc.xref.header.expires.1">2.1</a>, <a class="iref" href="#rfc.xref.header.expires.2">2.3</a>, <a class="iref" href="#rfc.xref.header.expires.3">2.3.1</a>, <a class="iref" href="#rfc.iref.h.4"><b>3.3</b></a>, <a class="iref" href="#rfc.xref.header.expires.4">5.1</a></li> 
    18281843                        <li class="indline1">Pragma&nbsp;&nbsp;<a class="iref" href="#rfc.xref.header.pragma.1">2.2</a>, <a class="iref" href="#rfc.xref.header.pragma.2">3.2</a>, <a class="iref" href="#rfc.iref.h.5"><b>3.4</b></a>, <a class="iref" href="#rfc.xref.header.pragma.3">5.1</a></li> 
    18291844                        <li class="indline1">Vary&nbsp;&nbsp;<a class="iref" href="#rfc.xref.header.vary.1">2.6</a>, <a class="iref" href="#rfc.iref.h.6"><b>3.5</b></a>, <a class="iref" href="#rfc.xref.header.vary.2">5.1</a></li> 
  • draft-ietf-httpbis/latest/p6-cache.xml

    r736 r737  
    423423  <list style="symbols"> 
    424424    <t>The request method is understood by the cache and defined as being cacheable, and</t> 
    425     <t>The response status is understood by the cache and defined as being cacheable, and</t> 
     425    <t>the response status code is understood by the cache, and</t> 
    426426    <t>the "no-store" cache directive (see <xref target="header.cache-control" />) does not 
    427427       appear in request or response headers, and</t> 
    428     <t>the "private" cache response directive (see <xref target="header.cache-control" /> 
     428    <t>the "private" cache response directive (see <xref target="cache-response-directive" /> 
    429429       does not appear in the response, if the cache is shared, and</t> 
    430430    <t>the "Authorization" header (see &header-authorization;) does not appear in the request, if 
    431431       the cache is shared (unless the "public" directive is present; see <xref 
    432        target="header.cache-control" />), and</t>             
    433     <t>the cache understands partial responses, if the response is partial or incomplete 
    434        (see <xref target="errors.or.incomplete.response.cache.behavior" />).</t> 
    435   </list> 
     432       target="header.cache-control" />), and</t> 
     433    <t>the response either: 
     434      <list style="symbols"> 
     435        <t>contains an Expires header (see <xref target="header.expires" />), or</t> 
     436        <t>contains a max-age response cache directive (see <xref target="cache-response-directive" />), or</t> 
     437        <t>contains a s-maxage response cache directive and the cache is shared, or</t> 
     438        <t>contains a Cache Control Extension (see <xref target="cache.control.extensions" />) that allows it to be cached, or</t> 
     439        <t>has a status code that can be served with heuristic freshness (see <xref 
     440           target="heuristic.freshness" />).</t> 
     441      </list> 
     442    </t> 
     443  </list> 
     444</t> 
     445<t> 
     446  In this context, a cache has "understood" a request method or a response status 
     447  code if it recognises it and implements any cache-specific behaviour. In 
     448  particular, 206 Partial Content responses cannot be cached by an 
     449  implementation that does not handle partial content 
     450  (see <xref target="errors.or.incomplete.response.cache.behavior" />). 
    436451</t> 
    437452<t> 
Note: See TracChangeset for help on using the changeset viewer.