source: draft-ietf-httpbis/latest/p6-cache.xml @ 580

Last change on this file since 580 was 580, checked in by julian.reschke@…, 10 years ago

re-organize section on HTTP-date including ABNF, refer to RFC 5322 for semantics (related to #163)

  • Property svn:eol-style set to native
File size: 101.4 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<?xml-stylesheet type='text/xsl' href='rfc2629.xslt'?>
3<!DOCTYPE rfc [
4  <!ENTITY MAY "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MAY</bcp14>">
5  <!ENTITY MUST "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST</bcp14>">
6  <!ENTITY MUST-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST NOT</bcp14>">
7  <!ENTITY OPTIONAL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>OPTIONAL</bcp14>">
8  <!ENTITY RECOMMENDED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>RECOMMENDED</bcp14>">
9  <!ENTITY REQUIRED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>REQUIRED</bcp14>">
10  <!ENTITY SHALL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL</bcp14>">
11  <!ENTITY SHALL-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL NOT</bcp14>">
12  <!ENTITY SHOULD "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD</bcp14>">
13  <!ENTITY SHOULD-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD NOT</bcp14>">
14  <!ENTITY ID-VERSION "latest">
15  <!ENTITY ID-MONTH "May">
16  <!ENTITY ID-YEAR "2009">
17  <!ENTITY notation                    "<xref target='Part1' x:rel='#notation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
18  <!ENTITY basic-rules                 "<xref target='Part1' x:rel='#basic.rules' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
19  <!ENTITY uri                         "<xref target='Part1' x:rel='#uri' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
20  <!ENTITY messaging                   "<xref target='Part1' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
21  <!ENTITY conditional                 "<xref target='Part4' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
22  <!ENTITY partial                     "<xref target='Part5' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
23  <!ENTITY combining-byte-ranges       "<xref target='Part5' x:rel='#combining.byte.ranges' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
24  <!ENTITY entity-length               "<xref target='Part3' x:rel='#entity.length' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
25  <!ENTITY full-date                   "<xref target='Part1' x:rel='#date.time.formats.full.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
26  <!ENTITY header-authorization        "<xref target='Part7' x:rel='#header.authorization' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
27  <!ENTITY header-connection           "<xref target='Part1' x:rel='#header.connection' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
28  <!ENTITY header-date                 "<xref target='Part1' x:rel='#header.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
29  <!ENTITY header-via                  "<xref target='Part1' x:rel='#header.via' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
30  <!ENTITY header-last-modified        "<xref target='Part4' x:rel='#header.last-modified' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
31  <!ENTITY message-headers             "<xref target='Part1' x:rel='#message.headers' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
32  <!ENTITY message-length              "<xref target='Part1' x:rel='#message.length' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
33  <!ENTITY safe-methods                "<xref target='Part2' x:rel='#safe.methods' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
34  <!ENTITY server-driven-negotiation   "<xref target='Part3' x:rel='#server-driven.negotiation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
35]>
36<?rfc toc="yes" ?>
37<?rfc symrefs="yes" ?>
38<?rfc sortrefs="yes" ?>
39<?rfc compact="yes"?>
40<?rfc subcompact="no" ?>
41<?rfc linkmailto="no" ?>
42<?rfc editing="no" ?>
43<?rfc comments="yes"?>
44<?rfc inline="yes"?>
45<?rfc-ext allow-markup-in-artwork="yes" ?>
46<?rfc-ext include-references-in-index="yes" ?>
47<rfc category="std" docName="draft-ietf-httpbis-p6-cache-&ID-VERSION;" ipr="pre5378Trust200902"
48  obsoletes="2616" x:maturity-level="draft" xmlns:x="http://purl.org/net/xml2rfc/ext">
49<front>
50
51  <title abbrev="HTTP/1.1, Part 6">HTTP/1.1, part 6: Caching</title>
52
53  <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
54    <organization abbrev="Day Software">Day Software</organization>
55    <address>
56      <postal>
57        <street>23 Corporate Plaza DR, Suite 280</street>
58        <city>Newport Beach</city>
59        <region>CA</region>
60        <code>92660</code>
61        <country>USA</country>
62      </postal>
63      <phone>+1-949-706-5300</phone>
64      <facsimile>+1-949-706-5305</facsimile>
65      <email>fielding@gbiv.com</email>
66      <uri>http://roy.gbiv.com/</uri>
67    </address>
68  </author>
69
70  <author fullname="Jim Gettys" initials="J." surname="Gettys">
71    <organization>One Laptop per Child</organization>
72    <address>
73      <postal>
74        <street>21 Oak Knoll Road</street>
75        <city>Carlisle</city>
76        <region>MA</region>
77        <code>01741</code>
78        <country>USA</country>
79      </postal>
80      <email>jg@laptop.org</email>
81      <uri>http://www.laptop.org/</uri>
82    </address>
83  </author>
84
85  <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
86    <organization abbrev="HP">Hewlett-Packard Company</organization>
87    <address>
88      <postal>
89        <street>HP Labs, Large Scale Systems Group</street>
90        <street>1501 Page Mill Road, MS 1177</street>
91        <city>Palo Alto</city>
92        <region>CA</region>
93        <code>94304</code>
94        <country>USA</country>
95      </postal>
96      <email>JeffMogul@acm.org</email>
97    </address>
98  </author>
99
100  <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
101    <organization abbrev="Microsoft">Microsoft Corporation</organization>
102    <address>
103      <postal>
104        <street>1 Microsoft Way</street>
105        <city>Redmond</city>
106        <region>WA</region>
107        <code>98052</code>
108        <country>USA</country>
109      </postal>
110      <email>henrikn@microsoft.com</email>
111    </address>
112  </author>
113
114  <author fullname="Larry Masinter" initials="L." surname="Masinter">
115    <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
116    <address>
117      <postal>
118        <street>345 Park Ave</street>
119        <city>San Jose</city>
120        <region>CA</region>
121        <code>95110</code>
122        <country>USA</country>
123      </postal>
124      <email>LMM@acm.org</email>
125      <uri>http://larry.masinter.net/</uri>
126    </address>
127  </author>
128
129  <author fullname="Paul J. Leach" initials="P." surname="Leach">
130    <organization abbrev="Microsoft">Microsoft Corporation</organization>
131    <address>
132      <postal>
133        <street>1 Microsoft Way</street>
134        <city>Redmond</city>
135        <region>WA</region>
136        <code>98052</code>
137      </postal>
138      <email>paulle@microsoft.com</email>
139    </address>
140  </author>
141
142  <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
143    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
144    <address>
145      <postal>
146        <street>MIT Computer Science and Artificial Intelligence Laboratory</street>
147        <street>The Stata Center, Building 32</street>
148        <street>32 Vassar Street</street>
149        <city>Cambridge</city>
150        <region>MA</region>
151        <code>02139</code>
152        <country>USA</country>
153      </postal>
154      <email>timbl@w3.org</email>
155      <uri>http://www.w3.org/People/Berners-Lee/</uri>
156    </address>
157  </author>
158
159  <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
160    <organization abbrev="W3C">World Wide Web Consortium</organization>
161    <address>
162      <postal>
163        <street>W3C / ERCIM</street>
164        <street>2004, rte des Lucioles</street>
165        <city>Sophia-Antipolis</city>
166        <region>AM</region>
167        <code>06902</code>
168        <country>France</country>
169      </postal>
170      <email>ylafon@w3.org</email>
171      <uri>http://www.raubacapeu.net/people/yves/</uri>
172    </address>
173  </author>
174
175  <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
176    <organization abbrev="greenbytes">greenbytes GmbH</organization>
177    <address>
178      <postal>
179        <street>Hafenweg 16</street>
180        <city>Muenster</city><region>NW</region><code>48155</code>
181        <country>Germany</country>
182      </postal>
183      <phone>+49 251 2807760</phone>   
184      <facsimile>+49 251 2807761</facsimile>   
185      <email>julian.reschke@greenbytes.de</email>       
186      <uri>http://greenbytes.de/tech/webdav/</uri>     
187    </address>
188  </author>
189
190  <date month="&ID-MONTH;" year="&ID-YEAR;" />
191  <workgroup>HTTPbis Working Group</workgroup>
192
193<abstract>
194<t>
195  The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed,
196  collaborative, hypermedia information systems. This document is Part 6 of the seven-part
197  specification that defines the protocol referred to as "HTTP/1.1" and, taken together,
198  obsoletes RFC 2616. Part 6 defines requirements on HTTP caches and the associated header
199  fields that control cache behavior or indicate cacheable response messages.
200</t>
201</abstract>
202
203<note title="Editorial Note (To be removed by RFC Editor)">
204<t>
205  Discussion of this draft should take place on the HTTPBIS working group mailing list
206  (ietf-http-wg@w3.org). The current issues list is at <eref
207  target="http://tools.ietf.org/wg/httpbis/trac/report/11" /> and related documents
208  (including fancy diffs) can be found at <eref target="http://tools.ietf.org/wg/httpbis/" />.
209</t>
210<t>
211  The changes in this draft are summarized in <xref target="changes.since.06" />.
212</t>
213</note>
214
215  </front>
216  <middle>
217
218<section anchor="caching" title="Introduction">
219<t>
220  HTTP is typically used for distributed information systems, where performance can be
221  improved by the use of response caches. This document defines aspects of HTTP/1.1 related to
222  caching and reusing response messages.
223</t>
224
225<section anchor="intro.purpose" title="Purpose">
226<iref item="cache" />
227<t>
228  An HTTP <x:dfn>cache</x:dfn> is a local store of response messages and the subsystem that
229  controls its message storage, retrieval, and deletion. A cache stores cacheable responses
230  in order to reduce the response time and network bandwidth consumption on future,
231  equivalent requests. Any client or server may include a cache, though a cache cannot be
232  used by a server that is acting as a tunnel.
233</t>
234<t>
235  Caching would be useless if it did not significantly improve performance. The goal of
236  caching in HTTP/1.1 is to reuse a prior response message to satisfy a current request. In
237  some cases, a stored response can be reused without the need for a network request,
238  reducing latency and network round-trips; a "freshness" mechanism is used for this purpose
239  (see <xref target="expiration.model" />). Even when a new request is required, it is often
240  possible to reuse all or parts of the payload of a prior response to satisfy the request,
241  thereby reducing network bandwidth usage; a "validation" mechanism is used for this
242  purpose (see <xref target="validation.model" />).
243</t>
244</section>
245
246<section anchor="intro.terminology" title="Terminology">
247<t>
248  This specification uses a number of terms to refer to the roles played by participants
249  in, and objects of, HTTP caching.
250</t>
251<t>
252  <iref item="cacheable" />
253  <x:dfn>cacheable</x:dfn>
254  <list>
255    <t>A response is cacheable if a cache is allowed to store a copy of the response message
256      for use in answering subsequent requests. Even when a response is cacheable, there may
257      be additional constraints on whether a cache can use the cached copy to satisfy a
258      particular request.</t>
259  </list>
260</t>
261<t>
262  <iref item="explicit expiration time" />
263  <x:dfn>explicit expiration time</x:dfn>
264  <list>
265    <t>The time at which the origin server intends that an entity should no longer be
266      returned by a cache without further validation.</t>
267  </list>
268</t>
269<t>
270  <iref item="heuristic expiration time" />
271  <x:dfn>heuristic expiration time</x:dfn>
272  <list>
273    <t>An expiration time assigned by a cache when no explicit expiration time is
274    available.</t>
275  </list>
276</t>
277<t>
278  <iref item="age" />
279  <x:dfn>age</x:dfn>
280  <list>
281    <t>The age of a response is the time since it was sent by, or successfully validated
282      with, the origin server.</t>
283  </list>
284</t>
285<t>
286  <iref item="first-hand" />
287  <x:dfn>first-hand</x:dfn>
288  <list>
289    <t>A response is first-hand if the freshness model is not in use; i.e., its age is
290    0.</t>
291  </list>
292</t>
293<t>
294  <iref item="freshness lifetime" />
295  <x:dfn>freshness lifetime</x:dfn>
296  <list>
297    <t>The length of time between the generation of a response and its expiration time. </t>
298  </list>
299</t>
300<t>
301  <iref item="fresh" />
302  <x:dfn>fresh</x:dfn>
303  <list>
304    <t>A response is fresh if its age has not yet exceeded its freshness lifetime.</t>
305  </list>
306</t>
307<t>
308  <iref item="stale" />
309  <x:dfn>stale</x:dfn>
310  <list>
311    <t>A response is stale if its age has passed its freshness lifetime (either explicit or heuristic).</t>
312  </list>
313</t>
314<t>
315  <iref item="validator" />
316  <x:dfn>validator</x:dfn>
317  <list>
318    <t>A protocol element (e.g., an entity tag or a Last-Modified time) that is used to find
319      out whether a stored response is an equivalent copy of an entity.</t>
320  </list>
321</t>
322<t anchor="shared.and.non-shared.caches">
323  <iref item="validator" />
324  <x:dfn>shared cache</x:dfn>
325  <list>
326    <t>A cache that is accessible to more than one user. A non-shared cache is
327      dedicated to a single user.</t>
328  </list>
329</t>
330</section>
331
332<section anchor="intro.requirements" title="Requirements">
333<t>
334  The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD
335  NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as
336  described in <xref target="RFC2119" />.
337</t>
338<t>
339  An implementation is not compliant if it fails to satisfy one or more of the &MUST;
340  or &REQUIRED; level requirements for the protocols it implements. An implementation
341  that satisfies all the &MUST; or &REQUIRED; level and all the &SHOULD; level
342  requirements for its protocols is said to be "unconditionally compliant"; one that
343  satisfies all the &MUST; level requirements but not all the &SHOULD; level
344  requirements for its protocols is said to be "conditionally compliant."
345</t>
346</section>
347
348<section title="Syntax Notation" anchor="notation">
349  <x:anchor-alias value="ALPHA"/>
350  <x:anchor-alias value="CR"/>
351  <x:anchor-alias value="DIGIT"/>
352  <x:anchor-alias value="DQUOTE"/>
353  <x:anchor-alias value="LF"/>
354  <x:anchor-alias value="OCTET"/>
355  <x:anchor-alias value="SP"/>
356  <x:anchor-alias value="VCHAR"/>
357  <x:anchor-alias value="WSP"/>
358<t>
359  This specification uses the ABNF syntax defined in &notation; (which
360  extends the syntax defined in <xref target="RFC5234"/> with a list rule).
361  <xref target="collected.abnf"/> shows the collected ABNF, with the list
362  rule expanded.
363</t>
364<t>
365  The following core rules are included by
366  reference, as defined in <xref target="RFC5234" x:fmt="," x:sec="B.1"/>:
367  ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls),
368  DIGIT (decimal 0-9), DQUOTE (double quote),
369  HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed),
370  OCTET (any 8-bit sequence of data), SP (space),
371  VCHAR (any visible USASCII character),
372  and WSP (whitespace).
373</t>
374
375<section title="Core Rules" anchor="core.rules">
376  <x:anchor-alias value="quoted-string"/>
377  <x:anchor-alias value="token"/>
378  <x:anchor-alias value="OWS"/>
379<t>
380  The core rules below are defined in &basic-rules;:
381</t>
382<figure><artwork type="abnf2616">
383  <x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in &basic-rules;&gt;
384  <x:ref>token</x:ref>         = &lt;token, defined in &basic-rules;&gt;
385  <x:ref>OWS</x:ref>           = &lt;OWS, defined in &basic-rules;&gt;
386</artwork></figure>
387</section>
388
389<section title="ABNF Rules defined in other Parts of the Specification" anchor="abnf.dependencies">
390  <x:anchor-alias value="field-name"/>
391  <x:anchor-alias value="HTTP-date"/>
392  <x:anchor-alias value="port"/>
393  <x:anchor-alias value="pseudonym"/>
394  <x:anchor-alias value="uri-host"/>
395<t>
396  The ABNF rules below are defined in other parts:
397</t>
398<figure><!--Part1--><artwork type="abnf2616">
399  <x:ref>field-name</x:ref>    = &lt;field-name, defined in &message-headers;&gt;
400  <x:ref>HTTP-date</x:ref>     = &lt;HTTP-date, defined in &full-date;&gt;
401  <x:ref>port</x:ref>          = &lt;port, defined in &uri;&gt;
402  <x:ref>pseudonym</x:ref>     = &lt;pseudonym, defined in &header-via;&gt; 
403  <x:ref>uri-host</x:ref>      = &lt;uri-host, defined in &uri;&gt;
404</artwork></figure>
405</section>
406
407</section>
408</section>
409
410<section anchor="caching.overview" title="Cache Operation">
411
412<section anchor="response.cacheability" title="Response Cacheability">
413<t>
414  A cache &MUST-NOT; store a response to any request, unless:
415  <list style="symbols">
416    <t>The request method is defined as being cacheable, and</t>
417    <t>the "no-store" cache directive (see <xref target="header.cache-control" />) does not
418       appear in request or response headers, and</t>
419    <t>the "private" cache response directive (see <xref target="header.cache-control" />
420       does not appear in the response, if the cache is shared, and</t>
421    <t>the "Authorization" header (see &header-authorization;) does not appear in the request, if
422       the cache is shared (unless the "public" directive is present; see <xref
423       target="header.cache-control" />), and</t>           
424    <t>the cache understands partial responses, if the response is partial or incomplete
425       (see <xref target="errors.or.incomplete.response.cache.behavior" />).</t>
426  </list>
427</t>
428<t>
429  Note that in normal operation, most caches will not store a response that has neither a
430  cache validator nor an explicit expiration time, as such responses are not usually
431  useful to store. However, caches are not prohibited from storing such responses.
432</t>
433
434<section anchor="errors.or.incomplete.response.cache.behavior" title="Storing Partial and Incomplete Responses">
435<t>
436  A cache that receives an incomplete response (for example, with fewer bytes of data
437  than specified in a Content-Length header) can store the response, but &MUST; 
438  treat it as a partial response &partial;. Partial responses
439  can be combined as described in &combining-byte-ranges;; the result might be a
440  full response or might still be partial. A cache &MUST-NOT; return a partial
441  response to a client without explicitly marking it as such using the 206 (Partial
442  Content) status code.
443</t>
444<t>
445  A cache that does not support the Range and Content-Range headers &MUST-NOT; store
446  incomplete or partial responses.
447</t>
448</section>
449
450</section>
451
452
453<section anchor="constructing.responses.from.caches" title="Constructing Responses from Caches">
454<t>
455  For a presented request, a cache &MUST-NOT; return a stored response, unless:
456  <list style="symbols">
457    <t>The presented Request-URI and that of the stored response match
458      (<cref anchor="TODO-Request-URI">Need to find a new term for this, as Part
459      1 doesn't define Request-URI anymore; the new term request-target does not
460      work for this.</cref>), and</t>
461    <t>the request method associated with the stored response allows it to be
462      used for the presented request, and</t>
463    <t>selecting request-headers nominated by the stored response (if any) match those presented (see <xref
464      target="caching.negotiated.responses" />), and</t>
465    <t>the presented request and stored response are free from directives that would prevent
466      its use (see <xref target="header.cache-control" /> and <xref target="header.pragma"/>),
467      and</t>
468    <t>the stored response is either:
469      <list style="symbols">
470        <t>fresh (see <xref target="expiration.model" />), or</t>
471        <t>allowed to be served stale (see <xref target="serving.stale.responses" />), or</t>
472        <t>successfully validated (see <xref target="validation.model" />).</t>
473      </list>
474    </t>
475  </list>
476</t>
477<t>
478  <cref anchor="TODO-method-cacheability">define method cacheability for GET, HEAD and POST in p2-semantics.</cref>
479</t>
480<t>
481  When a stored response is used to satisfy a request, caches &MUST; include a
482  single Age header field <xref target="header.age" /> in the response with a value equal to the stored response's
483  current_age; see <xref target="age.calculations" />.
484  <cref>DISCUSS: this currently includes successfully validated responses.</cref>
485</t>
486<t>
487  Requests with methods that are unsafe (&safe-methods;) &MUST; be written through the cache to
488  the origin server; i.e., A cache must not reply to such a request before having forwarded the request and having received a
489  corresponding response.
490</t>
491<t>
492  Also, note that unsafe requests might invalidate already stored responses; see
493  <xref target="invalidation.after.updates.or.deletions" />.
494</t>
495<t>
496  Caches &MUST; use the most recent response (as determined by the Date header) when
497  more than one suitable response is stored. They can also forward a request with
498  "Cache-Control: max-age=0" or "Cache-Control: no-cache" to disambiguate which response to
499  use.
500</t>
501<t>
502  <cref anchor="TODO-header-properties">end-to-end and hop-by-hop headers, non-modifiable headers removed; re-spec in p1</cref>
503</t>
504</section>
505
506<section anchor="expiration.model" title="Freshness Model">
507<t>
508  When a response is "fresh" in the cache, it can be used to satisfy subsequent
509  requests without contacting the origin server, thereby improving efficiency.
510</t>
511<t>
512  The primary mechanism for determining freshness is for an origin server to provide an
513  explicit expiration time in the future, using either the Expires header (<xref
514  target="header.expires" />) or the max-age response cache directive (<xref
515  target="cache-response-directive" />). Generally, origin servers will assign future
516  explicit expiration times to responses in the belief that the entity is not likely to
517  change in a semantically significant way before the expiration time is reached.
518</t>
519<t>
520  If an origin server wishes to force a cache to validate every request, it can
521  assign an explicit expiration time in the past. This means that the response is always
522  stale, so that caches should validate it before using it for subsequent requests.
523  <cref>This wording may cause confusion, because the response may still be served stale.</cref>
524</t>
525<t>
526  Since origin servers do not always provide explicit expiration times, HTTP caches may
527  also assign heuristic expiration times when they are not specified, employing algorithms that
528  use other header values (such as the Last-Modified time) to estimate a plausible
529  expiration time. The HTTP/1.1 specification does not provide specific algorithms, but does
530  impose worst-case constraints on their results.
531</t>
532<figure>
533<preamble>
534  The calculation to determine if a response is fresh is:
535</preamble>
536<artwork type="code">
537   response_is_fresh = (freshness_lifetime &gt; current_age)
538</artwork>
539</figure>
540
541<t>
542  The freshness_lifetime is defined in <xref target="calculating.freshness.lifetime" />;
543  the current_age is defined in <xref target="age.calculations" />.
544</t>
545<t>
546  Additionally, clients may need to influence freshness calculation. They can do this using
547  several request cache directives, with the effect of either increasing or loosening
548  constraints on freshness. See <xref target="cache-request-directive" />.
549</t>
550<t>
551  <cref>ISSUE: there are not requirements directly applying to cache-request-directives and
552  freshness.</cref>
553</t>
554<t>
555  Note that freshness applies only to cache operation; it cannot be used to force a user agent
556  to refresh its display or reload a resource. See <xref target="history.lists" /> for an explanation of
557  the difference between caches and history mechanisms.
558</t>
559
560<section anchor="calculating.freshness.lifetime" title="Calculating Freshness Lifetime">
561<t>
562  A cache can calculate the freshness lifetime (denoted as freshness_lifetime) of a
563  response by using the first match of:
564  <list style="symbols">
565    <t>If the cache is shared and the s-maxage response cache directive (<xref
566      target="cache-response-directive" />) is present, use its value, or</t>
567    <t>If the max-age response cache directive (<xref target="cache-response-directive"
568      />) is present, use its value, or</t>
569    <t>If the Expires response header (<xref target="header.expires" />) is present, use
570      its value minus the value of the Date response header, or</t>
571    <t>Otherwise, no explicit expiration time is present in the response, but a heuristic
572      may be used; see <xref target="heuristic.freshness" />.</t>
573  </list>
574</t>
575<t>
576  Note that this calculation is not vulnerable to clock skew, since all of the
577  information comes from the origin server.
578</t>
579
580<section anchor="heuristic.freshness" title="Calculating Heuristic Freshness">
581<t>
582  If no explicit expiration time is present in a stored response that has a status code
583  of 200, 203, 206, 300, 301 or 410, a heuristic expiration time can be
584  calculated. Heuristics &MUST-NOT; be used for other response status codes.
585</t>
586<t>
587  When a heuristic is used to calculate freshness lifetime, the cache &SHOULD;
588  attach a Warning header with a 113 warn-code to the response if its current_age is
589  more than 24 hours and such a warning is not already present.
590</t>
591<t>
592  Also, if the response has a Last-Modified header (&header-last-modified;), the
593  heuristic expiration value &SHOULD; be no more than some fraction of the interval
594  since that time. A typical setting of this fraction might be 10%.
595</t>
596<t>
597  <cref>REVIEW: took away HTTP/1.0 query string heuristic uncacheability.</cref>
598</t>
599</section>
600</section>
601
602<section anchor="age.calculations" title="Calculating Age">
603<t>
604  HTTP/1.1 uses the Age response-header to convey the estimated age of the response
605  message when obtained from a cache. The Age field value is the cache's estimate of the
606  amount of time since the response was generated or validated by the origin server. In
607  essence, the Age value is the sum of the time that the response has been resident in
608  each of the caches along the path from the origin server, plus the amount of time it has
609  been in transit along network paths.
610</t>
611<t>
612  The term "age_value" denotes the value of the Age header, in a form appropriate for
613  arithmetic operations.
614</t>
615<t>
616  HTTP/1.1 requires origin servers to send a Date header, if possible, with every
617  response, giving the time at which the response was generated (see &header-date;).
618  The term "date_value" denotes the value of the Date header, in a form appropriate for
619  arithmetic operations.
620</t>
621<t>
622  The term "now" means "the current value of the clock at the host performing the
623  calculation." Hosts that use HTTP, but especially hosts running origin servers and
624  caches, &SHOULD; use NTP <xref target="RFC1305" /> or some similar protocol to
625  synchronize their clocks to a globally accurate time standard.
626</t>
627<t>
628  A response's age can be calculated in two entirely independent ways:
629  <list style="numbers">
630    <t>now minus date_value, if the local clock is reasonably well synchronized to the
631      origin server's clock. If the result is negative, the result is replaced by zero.</t>
632    <t>age_value, if all of the caches along the response path implement HTTP/1.1.</t>
633  </list>
634</t>
635<figure>
636<preamble>These are combined as</preamble>
637<artwork type="code">
638    corrected_received_age = max(now - date_value, age_value)
639</artwork></figure>
640<t>
641  When an Age value is received, it &MUST; be interpreted relative to the time the
642  request was initiated, not the time that the response was received.
643</t>
644<figure><artwork type="code">
645   corrected_initial_age = corrected_received_age
646                         + (now - request_time)
647</artwork></figure>
648<t>
649  where "request_time" is the time (according to the local clock) when the request that
650  elicited this response was sent.
651</t>
652<t>
653  The current_age of a stored response can then be calculated by adding the amount of
654  time (in seconds) since the stored response was last validated by the origin server to
655  the corrected_initial_age.
656</t>
657<t>
658  In summary:
659</t>
660<figure><artwork type="code">
661  age_value     - Age header field-value received with the response
662  date_value    - Date header field-value received with the response
663  request_time  - local time when the cache made the request
664                 resulting in the stored response
665  response_time - local time when the cache received the response
666  now           - current local time
667 
668  apparent_age = max(0, response_time - date_value);
669  corrected_received_age = max(apparent_age, age_value);
670  response_delay = response_time - request_time;
671  corrected_initial_age = corrected_received_age + response_delay;
672  resident_time = now - response_time;
673  current_age   = corrected_initial_age + resident_time;
674</artwork></figure>
675</section>
676
677<section anchor="serving.stale.responses" title="Serving Stale Responses">
678<t>
679  A "stale" response is one that either has explicit expiry information, or is allowed to
680  have heuristic expiry calculated, but is not fresh according to the calculations in
681  <xref target="expiration.model" />.
682</t>
683<t>
684  Caches &MUST-NOT; return a stale response if it is prohibited by an explicit
685  in-protocol directive (e.g., by a "no-store" or "no-cache" cache directive, a
686  "must-revalidate" cache-response-directive, or an applicable "s-maxage" or
687  "proxy-revalidate" cache-response-directive; see <xref target="cache-response-directive"/>).
688</t>
689<t>
690  Caches &SHOULD-NOT; return stale responses unless they are
691  disconnected (i.e., it cannot contact the origin server or otherwise find a forward path)
692  or otherwise explicitly allowed (e.g., the max-stale request directive; see <xref target="cache-request-directive" />).
693</t>
694<t>
695  Stale responses &SHOULD; have a Warning header with the 110 warn-code (see <xref
696  target="header.warning" />). Likewise, the 112 warn-code &SHOULD; be sent on stale responses if
697  the cache is disconnected.
698</t>
699<t>
700  If a cache receives a first-hand response (either an entire response, or a 304 (Not
701  Modified) response) that it would normally forward to the requesting client, and the
702  received response is no longer fresh, the cache &SHOULD; forward it to the
703  requesting client without adding a new Warning (but without removing any existing
704  Warning headers). A cache &SHOULD-NOT; attempt to validate a response simply because
705  that response became stale in transit.
706</t>
707</section>
708</section>
709
710<section anchor="validation.model" title="Validation Model">
711<t>
712  Checking with the origin server to see if a stale or otherwise unusable cached response
713  can be reused is called "validating" or "revalidating." Doing so potentially avoids
714  the overhead of retransmitting the response body when the stored response is valid.
715</t>
716<t>
717  HTTP's conditional request mechanism &conditional; is used for this purpose. When a stored
718  response includes one or more validators, such as the field values of an ETag or
719  Last-Modified header field, then a validating request &SHOULD; be made conditional
720  to those field values.
721</t>
722<t>
723  A 304 (Not Modified) response status code indicates that the stored
724  response can be updated and reused; see <xref target="combining.headers"/>.
725</t>
726<t>
727  If instead the cache receives a full response (i.e., one with a response body), it is used to satisfy the
728  request and replace the stored response. <cref>Should there be a requirement here?</cref>
729</t>
730<t>
731  If a cache receives a 5xx response while attempting to validate a response, it &MAY;
732  either forward this response to the requesting client, or act as if the server failed to
733  respond. In the latter case, it &MAY; return a previously stored response (which &SHOULD; include the
734  111 warn-code; see <xref target="header.warning"/>) unless the
735  stored response includes the "must-revalidate" cache directive (see <xref
736  target="serving.stale.responses" />).
737</t>
738</section>
739
740<section anchor="invalidation.after.updates.or.deletions" title="Request Methods that Invalidate">
741<t>
742  Because unsafe methods (&safe-methods;) have the potential for changing state on the
743  origin server, intervening caches can use them to keep their contents
744  up-to-date.
745</t>
746<t>
747  The following HTTP methods &MUST; cause a cache to invalidate the Request-URI as well
748  as the Location and Content-Location headers (if present):
749  <list style="symbols">
750    <t>PUT</t>
751    <t>DELETE</t>
752    <t>POST</t>
753  </list>
754</t>
755<t>
756  An invalidation based on the URI in a Location or Content-Location header &MUST-NOT;
757  be performed if the host part of that URI differs from the host part in the Request-URI.
758  This helps prevent denial of service attacks.
759</t>
760<t>
761  <cref>TODO: "host part" needs to be specified better.</cref>
762</t>
763<t>
764  A cache that passes through requests for methods it does not understand &SHOULD;
765  invalidate the Request-URI.
766</t>
767<t>
768  Here, "invalidate" means that the cache will either remove all stored responses related
769  to the Request-URI, or will mark these as "invalid" and in need of a mandatory validation
770  before they can be returned in response to a subsequent request.
771</t>
772<t>
773  Note that this does not guarantee that all appropriate responses are invalidated. For
774  example, the request that caused the change at the origin server might not have gone
775  through the cache where a response is stored.
776</t>
777<t>
778  <cref>TODO: specify that only successful (2xx, 3xx?) responses invalidate.</cref>
779</t>
780</section>
781
782<section anchor="caching.negotiated.responses" title="Caching Negotiated Responses">
783<t>
784  Use of server-driven content negotiation (&server-driven-negotiation;) alters
785  the conditions under which a cache can use the response for subsequent
786  requests.
787</t>
788<t>
789  When a cache receives a request that can be satisfied by a stored response
790  that includes a Vary header field (<xref target="header.vary"/>), it &MUST-NOT; use that response unless
791  all of the selecting request-headers in the presented request match the corresponding
792  stored request-headers from the original request.
793</t>
794<t>
795  The selecting request-headers from two requests are defined to match if and only if the
796  selecting request-headers in the first request can be transformed to the selecting
797  request-headers in the second request by adding or removing linear white space
798  <cref>[ref]</cref> at places where this is allowed by the corresponding ABNF, and/or
799  combining multiple message-header fields with the same field name following the rules
800  about message headers in &message-headers;. <cref anchor="DISCUSS-header-specific-canonicalization">
801  Should the matching requirement be relaxed so that it would be ok to use a cached response
802  if the selecting request headers match after header-specific canonicalization?
803  (see <eref target="http://trac.tools.ietf.org/wg/httpbis/trac/ticket/147">Issue 147</eref>)
804  </cref>
805</t>
806<t>
807  A Vary header field-value of "*" always fails to match, and subsequent requests to that
808  resource can only be properly interpreted by the origin server.
809</t>
810<t>
811  If no stored response matches, the cache &MAY; forward the presented request to the origin
812  server in a conditional request, and &SHOULD; include all ETags stored with
813  potentially suitable responses in an If-None-Match request header. If the server responds with 304 (Not Modified) and
814  includes an entity tag or Content-Location that indicates the entity to be used, that
815  cached response &MUST; be used to satisfy the presented request, and &SHOULD;
816  be used to update the corresponding stored response; see <xref target="combining.headers"/>.
817</t>
818<t>
819  If any of the stored responses contains only partial content, its entity-tag &SHOULD-NOT; 
820  be included in the If-None-Match header field unless the request is for a range that would
821  be fully satisfied by that stored response.
822</t>
823<t>
824  If a cache receives a successful response whose Content-Location field matches that of an
825  existing stored response for the same Request-URI, whose entity-tag differs from that of
826  the existing stored response, and whose Date is more recent than that of the existing
827  response, the existing response &SHOULD-NOT; be returned in response to future
828  requests and &SHOULD; be deleted from the cache.<cref>DISCUSS: Not sure if this is necessary.</cref>
829</t>
830</section>
831
832<section anchor="combining.headers" title="Combining Responses">
833<t>
834  When a cache receives a 304 (Not Modified) response or a 206 (Partial Content) response,
835  it needs to update the stored response with the new one, so that the updated response can
836  be sent to the client.
837</t>
838<t>
839  If the status code is 304 (Not Modified), the cache &SHOULD; use the stored entity-body as
840  the updated entity-body. If the status code is 206 (Partial Content) and the ETag or
841  Last-Modified headers match exactly, the cache &MAY; combine the stored entity-body in
842  the stored response with the updated entity-body received in the response and use the
843  result as the updated entity-body (see &combining-byte-ranges;).
844</t>
845<t>
846  The stored response headers are used for the updated response, except that
847  <list style="symbols">
848    <t>any stored Warning headers with warn-code 1xx (see <xref target="header.warning" />)
849      &MUST; be deleted from the stored response and the forwarded response.</t>
850    <t>any stored Warning headers with warn-code 2xx &MUST; be retained in the stored
851      response and the forwarded response.</t>
852    <t>any headers provided in the 304 or 206 response &MUST; replace the corresponding
853      headers from the stored response.</t>
854  </list>
855</t>
856<t>
857  A cache &MUST; also replace any stored headers with corresponding headers received in the
858  incoming response, except for Warning headers as described immediately above. If a header
859  field-name in the incoming response matches more than one header in the stored response,
860  all such old headers &MUST; be replaced. It &MAY; store the combined
861  entity-body.
862</t>
863<t>
864  <cref>ISSUE: discuss how to handle HEAD updates</cref>
865</t>
866</section>
867
868</section>
869
870<section anchor="header.fields" title="Header Field Definitions">
871<t>
872  This section defines the syntax and semantics of HTTP/1.1 header fields
873  related to caching.
874</t>
875<t>
876  For entity-header fields, both sender and recipient refer to either the client or the
877  server, depending on who sends and who receives the entity.
878</t>
879
880<section anchor="header.age" title="Age">
881  <iref item="Age header" primary="true" x:for-anchor="" />
882  <iref item="Headers" primary="true" subitem="Age" x:for-anchor="" />
883  <x:anchor-alias value="Age"/>
884  <x:anchor-alias value="Age-v"/>
885  <x:anchor-alias value="age-value"/>
886<t>
887  The response-header field "Age" conveys the sender's estimate of the amount of time since
888  the response (or its validation) was generated at the origin server. Age values are
889  calculated as specified in <xref target="age.calculations" />.
890</t>
891<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Age"/><iref primary="true" item="Grammar" subitem="Age-v"/>
892  <x:ref>Age</x:ref>   = "Age" ":" <x:ref>OWS</x:ref> <x:ref>Age-v</x:ref>
893  <x:ref>Age-v</x:ref> = <x:ref>delta-seconds</x:ref>
894</artwork></figure>
895<t anchor="rule.delta-seconds">
896  <x:anchor-alias value="delta-seconds" />
897  Age field-values are non-negative integers, representing time in seconds.
898</t>
899<figure><artwork type="abnf2616"><iref item="Grammar" primary="true" subitem="delta-seconds" />
900  <x:ref>delta-seconds</x:ref>  = 1*<x:ref>DIGIT</x:ref>
901</artwork></figure>
902<t>
903  If a cache receives a value larger than the largest positive integer it can represent, or
904  if any of its age calculations overflows, it &MUST; transmit an Age header with a
905  field-value of 2147483648 (2<x:sup>31</x:sup>). Caches &SHOULD; use an arithmetic type
906  of at least 31 bits of range.
907</t>
908<t>
909  The presence of an Age header field in a response implies that a response is not
910  first-hand. However, the converse is not true, since HTTP/1.0 caches may not implement the
911  Age header field.
912</t>
913</section>
914
915<section anchor="header.cache-control" title="Cache-Control">
916  <iref item="Cache-Control header" primary="true" x:for-anchor="" />
917  <iref item="Headers" primary="true" subitem="Cache-Control" x:for-anchor="" />
918  <x:anchor-alias value="Cache-Control"/>
919  <x:anchor-alias value="Cache-Control-v"/>
920  <x:anchor-alias value="cache-directive"/>
921  <x:anchor-alias value="cache-extension"/>
922  <x:anchor-alias value="cache-request-directive"/>
923  <x:anchor-alias value="cache-response-directive"/>
924<t>
925  The general-header field "Cache-Control" is used to specify directives that &MUST; be
926  obeyed by all caches along the request/response chain. The directives specify behavior
927  intended to prevent caches from adversely interfering with the request or response. Cache
928  directives are unidirectional in that the presence of a directive in a request does not
929  imply that the same directive is to be given in the response.
930</t>
931<x:note>
932  <t>
933    Note that HTTP/1.0 caches might not implement Cache-Control and might only implement
934    Pragma: no-cache (see <xref target="header.pragma" />).
935  </t>
936</x:note>
937<t>
938  Cache directives &MUST; be passed through by a proxy or gateway application,
939  regardless of their significance to that application, since the directives might be
940  applicable to all recipients along the request/response chain. It is not possible to
941  target a directive to a specific cache.
942</t>
943<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Cache-Control"/><iref primary="true" item="Grammar" subitem="Cache-Control-v"/><iref primary="true" item="Grammar" subitem="cache-extension"/>
944  <x:ref>Cache-Control</x:ref>   = "Cache-Control" ":" <x:ref>OWS</x:ref> <x:ref>Cache-Control-v</x:ref>
945  <x:ref>Cache-Control-v</x:ref> = 1#<x:ref>cache-directive</x:ref>
946
947  <x:ref>cache-directive</x:ref> = <x:ref>cache-request-directive</x:ref>
948     / <x:ref>cache-response-directive</x:ref>
949
950  <x:ref>cache-extension</x:ref> = <x:ref>token</x:ref> [ "=" ( <x:ref>token</x:ref> / <x:ref>quoted-string</x:ref> ) ]
951</artwork></figure>
952
953<section anchor="cache-request-directive" title="Request Cache-Control Directives">
954  <x:anchor-alias value="cache-request-directive" />
955
956<figure><artwork type="abnf2616"><iref item="Grammar" primary="true" subitem="cache-request-directive" />
957  <x:ref>cache-request-directive</x:ref> =
958       "no-cache"
959     / "no-store"
960     / "max-age" "=" <x:ref>delta-seconds</x:ref>
961     / "max-stale" [ "=" <x:ref>delta-seconds</x:ref> ]
962     / "min-fresh" "=" <x:ref>delta-seconds</x:ref>
963     / "no-transform"
964     / "only-if-cached"
965     / <x:ref>cache-extension</x:ref>
966</artwork></figure>
967
968<t>
969  <iref item="Cache Directives" primary="true" subitem="no-cache" />
970  <iref item="no-cache" primary="true" subitem="Cache Directive" />
971  no-cache
972  <list>
973    <t>The no-cache request directive indicates that a stored response &MUST-NOT; be
974      used to satisfy the request without successful validation on the origin server.</t>
975  </list>
976</t>
977<t>
978  <iref item="Cache Directives" primary="true" subitem="no-store" />
979  <iref item="no-store" primary="true" subitem="Cache Directive" />
980  no-store
981  <list>
982    <t>The no-store request directive indicates that a cache &MUST-NOT; store any part
983      of either this request or any response to it. This directive applies to both
984      non-shared and shared caches. "&MUST-NOT; store" in this context means that the
985      cache &MUST-NOT; intentionally store the information in non-volatile storage,
986      and &MUST; make a best-effort attempt to remove the information from volatile
987      storage as promptly as possible after forwarding it.</t>
988    <t>This directive is NOT a reliable or sufficient mechanism for ensuring privacy. In
989      particular, malicious or compromised caches might not recognize or obey this
990      directive, and communications networks may be vulnerable to eavesdropping.</t>
991  </list>
992</t>
993<t>
994  <iref item="Cache Directives" primary="true" subitem="max-age" />
995  <iref item="max-age" primary="true" subitem="Cache Directive" />
996  max-age
997  <list>
998    <t>The max-age request directive indicates that the client is willing to accept a
999      response whose age is no greater than the specified time in seconds. Unless
1000      max-stale directive is also included, the client is not willing to accept a stale
1001      response.</t>
1002  </list>
1003</t>
1004<t>
1005  <iref item="Cache Directives" primary="true" subitem="max-stale" />
1006  <iref item="max-stale" primary="true" subitem="Cache Directive" />
1007  max-stale
1008  <list>
1009    <t>The max-stale request directive indicates that the client is willing to accept a
1010      response that has exceeded its expiration time. If max-stale is assigned a value,
1011      then the client is willing to accept a response that has exceeded its expiration
1012      time by no more than the specified number of seconds. If no value is assigned to
1013      max-stale, then the client is willing to accept a stale response of any age. <cref source="mnot">of any staleness?</cref></t>
1014  </list>
1015</t>
1016<t>
1017  <iref item="Cache Directives" primary="true" subitem="min-fresh" />
1018  <iref item="min-fresh" primary="true" subitem="Cache Directive" />
1019  min-fresh
1020  <list>
1021    <t>The min-fresh request directive indicates that the client is willing to accept a
1022      response whose freshness lifetime is no less than its current age plus the specified
1023      time in seconds. That is, the client wants a response that will still be fresh for
1024      at least the specified number of seconds.</t>
1025  </list>
1026</t>
1027<t>
1028  <iref item="Cache Directives" primary="true" subitem="no-transform" />
1029  <iref item="no-transform" primary="true" subitem="Cache Directive" />
1030  no-transform
1031  <list>
1032    <t>The no-transform request directive indicates that an intermediate cache or proxy
1033      &MUST-NOT; change the Content-Encoding, Content-Range or Content-Type request
1034      headers, nor the request entity-body.</t>
1035  </list>
1036</t>
1037<t>
1038  <iref item="Cache Directives" primary="true" subitem="only-if-cached" />
1039  <iref item="only-if-cached" primary="true" subitem="Cache Directive" />
1040  only-if-cached
1041  <list>
1042    <t>The only-if-cached request directive indicates that the client only wishes to
1043      return a stored response. If it receives this directive, a cache &SHOULD; either
1044      respond using a stored response that is consistent with the other constraints of the
1045      request, or respond with a 504 (Gateway Timeout) status. If a group of caches is
1046      being operated as a unified system with good internal connectivity, such a request
1047      &MAY; be forwarded within that group of caches.</t>
1048  </list>
1049</t>
1050</section>
1051
1052<section anchor="cache-response-directive" title="Response Cache-Control Directives">
1053  <x:anchor-alias value="cache-response-directive" />
1054
1055<figure><artwork type="abnf2616"><iref item="Grammar" primary="true" subitem="cache-response-directive" />
1056  <x:ref>cache-response-directive</x:ref> =
1057       "public"
1058     / "private" [ "=" <x:ref>DQUOTE</x:ref> 1#<x:ref>field-name</x:ref> <x:ref>DQUOTE</x:ref> ]
1059     / "no-cache" [ "=" <x:ref>DQUOTE</x:ref> 1#<x:ref>field-name</x:ref> <x:ref>DQUOTE</x:ref> ]
1060     / "no-store"
1061     / "no-transform"
1062     / "must-revalidate"
1063     / "proxy-revalidate"
1064     / "max-age" "=" <x:ref>delta-seconds</x:ref>
1065     / "s-maxage" "=" <x:ref>delta-seconds</x:ref>
1066     / <x:ref>cache-extension</x:ref>
1067</artwork></figure>
1068
1069<t>
1070  <iref item="Cache Directives" primary="true" subitem="public" />
1071  <iref item="public" primary="true" subitem="Cache Directive" />
1072  public
1073  <list>
1074    <t>The public response directive indicates that the response &MAY; be cached, even
1075      if it would normally be non-cacheable or cacheable only within a non-shared cache.
1076      (See also Authorization, &header-authorization;, for additional details.) </t>
1077  </list>
1078</t>
1079<t>
1080  <iref item="Cache Directives" primary="true" subitem="private" />
1081  <iref item="private" primary="true" subitem="Cache Directive" />
1082  private
1083  <list>
1084    <t>The private response directive indicates that the response message is intended for
1085      a single user and &MUST-NOT; be stored by a shared cache. A private (non-shared)
1086      cache &MAY; store the response.</t>
1087    <t>If the private response directive specifies one or more field-names, this
1088      requirement is limited to the field-values associated with the listed response
1089      headers. That is, the specified field-names(s) &MUST-NOT; be stored by a shared
1090      cache, whereas the remainder of the response message &MAY; be.</t>
1091    <t>
1092      <x:h>Note:</x:h> This usage of the word private only controls where the response may
1093      be stored, and cannot ensure the privacy of the message content.</t>
1094  </list>
1095</t>
1096<t>
1097  <iref item="Cache Directives" primary="true" subitem="no-cache" />
1098  <iref item="no-cache" primary="true" subitem="Cache Directive" />
1099  no-cache
1100  <list>
1101    <t>The no-cache response directive indicates that the response &MUST-NOT; be used to
1102      satisfy a subsequent request without successful validation on the origin server.
1103      This allows an origin server to prevent caching even by caches that have been
1104      configured to return stale responses.</t>
1105    <t>If the no-cache response directive specifies one or more field-names, this
1106      requirement is limited to the field-values associated with the listed response
1107      headers. That is, the specified field-name(s) &MUST-NOT; be sent in the response
1108      to a subsequent request without successful validation on the origin server. This
1109      allows an origin server to prevent the re-use of certain header fields in a
1110      response, while still allowing caching of the rest of the response.</t>
1111    <t>
1112      <x:h>Note:</x:h> Most HTTP/1.0 caches will not recognize or obey this directive.
1113    </t>
1114  </list>
1115</t>
1116
1117<t>
1118  <iref item="Cache Directives" primary="true" subitem="no-store" />
1119  <iref item="no-store" primary="true" subitem="Cache Directive" />
1120  no-store
1121  <list>
1122    <t>The no-store response directive indicates that a cache &MUST-NOT; store any
1123      part of either the immediate request or response. This directive applies to both
1124      non-shared and shared caches. "&MUST-NOT; store" in this context means that the
1125      cache &MUST-NOT; intentionally store the information in non-volatile storage,
1126      and &MUST; make a best-effort attempt to remove the information from volatile
1127      storage as promptly as possible after forwarding it.</t>
1128    <t>This directive is NOT a reliable or sufficient mechanism for ensuring privacy. In
1129      particular, malicious or compromised caches might not recognize or obey this
1130      directive, and communications networks may be vulnerable to eavesdropping.</t>
1131  </list>
1132</t>
1133<t>
1134  <iref item="Cache Directives" primary="true" subitem="must-revalidate" />
1135  <iref item="must-revalidate" primary="true" subitem="Cache Directive" />
1136  must-revalidate
1137  <list>
1138    <t>The must-revalidate response directive indicates that once it has become stale, the response &MUST-NOT; be
1139     used to satisfy subsequent requests without successful validation on the origin server.</t>
1140    <t>The must-revalidate directive is necessary to support reliable operation for
1141      certain protocol features. In all circumstances an HTTP/1.1 cache &MUST; obey
1142      the must-revalidate directive; in particular, if the cache cannot reach the origin
1143      server for any reason, it &MUST; generate a 504 (Gateway Timeout) response.</t>
1144    <t>Servers &SHOULD; send the must-revalidate directive if and only if failure to
1145      validate a request on the entity could result in incorrect operation, such as a
1146      silently unexecuted financial transaction.</t>
1147  </list>
1148</t>
1149<t>
1150  <iref item="Cache Directives" primary="true" subitem="proxy-revalidate" />
1151  <iref item="proxy-revalidate" primary="true" subitem="Cache Directive" />
1152  proxy-revalidate
1153  <list>
1154    <t>The proxy-revalidate response directive has the same meaning as the must-revalidate
1155      response directive, except that it does not apply to non-shared caches.</t>
1156  </list>
1157</t>
1158<t>
1159  <iref item="Cache Directives" primary="true" subitem="max-age" />
1160  <iref item="max-age" primary="true" subitem="Cache Directive" />
1161  max-age
1162  <list>
1163    <t>The max-age response directive indicates that response is to be considered stale
1164      after its age is greater than the specified number of seconds.</t>
1165  </list>
1166</t>
1167<t>
1168  <iref item="Cache Directives" primary="true" subitem="s-maxage" />
1169  <iref item="s-maxage" primary="true" subitem="Cache Directive" />
1170  s-maxage
1171  <list>
1172    <t>The s-maxage response directive indicates that, in shared caches, the maximum age
1173      specified by this directive overrides the maximum age specified by either the
1174      max-age directive or the Expires header. The s-maxage directive also implies the
1175      semantics of the proxy-revalidate response directive.</t>
1176  </list>
1177</t>
1178<t>
1179  <iref item="Cache Directives" primary="true" subitem="no-transform" />
1180  <iref item="no-transform" primary="true" subitem="Cache Directive" />
1181  no-transform
1182  <list>
1183    <t>The no-transform response directive indicates that an intermediate cache or proxy
1184      &MUST-NOT; change the Content-Encoding, Content-Range or Content-Type response
1185      headers, nor the response entity-body.</t>
1186  </list>
1187</t>
1188
1189</section>
1190
1191<section anchor="cache.control.extensions" title="Cache Control Extensions">
1192<t>
1193  The Cache-Control header field can be extended through the use of one or more
1194  cache-extension tokens, each with an optional value. Informational extensions (those
1195  that do not require a change in cache behavior) can be added without changing the
1196  semantics of other directives. Behavioral extensions are designed to work by acting as
1197  modifiers to the existing base of cache directives. Both the new directive and the
1198  standard directive are supplied, such that applications that do not understand the new
1199  directive will default to the behavior specified by the standard directive, and those
1200  that understand the new directive will recognize it as modifying the requirements
1201  associated with the standard directive. In this way, extensions to the cache-control
1202  directives can be made without requiring changes to the base protocol.
1203</t>
1204<t>
1205  This extension mechanism depends on an HTTP cache obeying all of the cache-control
1206  directives defined for its native HTTP-version, obeying certain extensions, and ignoring
1207  all directives that it does not understand.
1208</t>
1209<t>
1210  For example, consider a hypothetical new response directive called "community" that
1211  acts as a modifier to the private directive. We define this new directive to mean that,
1212  in addition to any non-shared cache, any cache that is shared only by members of the
1213  community named within its value may cache the response. An origin server wishing to
1214  allow the UCI community to use an otherwise private response in their shared cache(s)
1215  could do so by including
1216</t>
1217<figure><artwork type="example">
1218  Cache-Control: private, community="UCI"
1219</artwork></figure>
1220<t>
1221  A cache seeing this header field will act correctly even if the cache does not
1222  understand the community cache-extension, since it will also see and understand the
1223  private directive and thus default to the safe behavior.
1224</t>
1225<t>
1226  Unrecognized cache directives &MUST; be ignored; it is assumed that any cache
1227  directive likely to be unrecognized by an HTTP/1.1 cache will be combined with standard
1228  directives (or the response's default cacheability) such that the cache behavior will
1229  remain minimally correct even if the cache does not understand the extension(s).
1230</t>
1231</section>
1232
1233</section>
1234
1235<section anchor="header.expires" title="Expires">
1236  <iref item="Expires header" primary="true" x:for-anchor="" />
1237  <iref item="Headers" primary="true" subitem="Expires" x:for-anchor="" />
1238  <x:anchor-alias value="Expires"/>
1239  <x:anchor-alias value="Expires-v"/>
1240<t>
1241  The entity-header field "Expires" gives the date/time after which the response is
1242  considered stale. See <xref target="expiration.model" /> for further discussion of the
1243  freshness model.
1244</t>
1245<t>
1246  The presence of an Expires field does not imply that the original resource will change or
1247  cease to exist at, before, or after that time.
1248</t>
1249<t>
1250  The field-value is an absolute date and time as defined by HTTP-date in &full-date;;
1251  it &MUST; be sent in rfc1123-date format.
1252</t>
1253<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Expires"/><iref primary="true" item="Grammar" subitem="Expires-v"/>
1254  <x:ref>Expires</x:ref>   = "Expires" ":" <x:ref>OWS</x:ref> <x:ref>Expires-v</x:ref>
1255  <x:ref>Expires-v</x:ref> = <x:ref>HTTP-date</x:ref>
1256</artwork></figure>
1257<figure>
1258  <preamble>For example</preamble>
1259<artwork type="example">
1260  Expires: Thu, 01 Dec 1994 16:00:00 GMT
1261</artwork></figure>
1262<x:note>
1263  <t>
1264    <x:h>Note:</x:h> if a response includes a Cache-Control field with the max-age
1265    directive (see <xref target="cache-response-directive" />), that directive overrides
1266    the Expires field. Likewise, the s-maxage directive overrides Expires in shared caches.
1267  </t>
1268</x:note>
1269<t>
1270  HTTP/1.1 servers &SHOULD-NOT; send Expires dates more than one year in the future.
1271</t>
1272<t>
1273  HTTP/1.1 clients and caches &MUST; treat other invalid date formats, especially
1274  including the value "0", as in the past (i.e., "already expired").
1275</t>
1276</section>
1277
1278<section anchor="header.pragma" title="Pragma">
1279  <iref item="Pragma header" primary="true" x:for-anchor="" />
1280  <iref item="Headers" primary="true" subitem="Pragma" x:for-anchor="" />
1281  <x:anchor-alias value="extension-pragma"/>
1282  <x:anchor-alias value="Pragma"/>
1283  <x:anchor-alias value="Pragma-v"/>
1284  <x:anchor-alias value="pragma-directive"/>
1285<t>
1286  The general-header field "Pragma" is used to include implementation-specific directives
1287  that might apply to any recipient along the request/response chain. All pragma directives
1288  specify optional behavior from the viewpoint of the protocol; however, some systems
1289  &MAY; require that behavior be consistent with the directives.
1290</t>
1291<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Pragma"/><iref primary="true" item="Grammar" subitem="Pragma-v"/><iref primary="true" item="Grammar" subitem="pragma-directive"/><iref primary="true" item="Grammar" subitem="extension-pragma"/>
1292  <x:ref>Pragma</x:ref>            = "Pragma" ":" <x:ref>OWS</x:ref> <x:ref>Pragma-v</x:ref>
1293  <x:ref>Pragma-v</x:ref>          = 1#<x:ref>pragma-directive</x:ref>
1294  <x:ref>pragma-directive</x:ref>  = "no-cache" / <x:ref>extension-pragma</x:ref>
1295  <x:ref>extension-pragma</x:ref>  = <x:ref>token</x:ref> [ "=" ( <x:ref>token</x:ref> / <x:ref>quoted-string</x:ref> ) ]
1296</artwork></figure>
1297<t>
1298  When the no-cache directive is present in a request message, an application &SHOULD;
1299  forward the request toward the origin server even if it has a cached copy of what is being
1300  requested. This pragma directive has the same semantics as the no-cache response directive
1301  (see <xref target="cache-response-directive" />) and is defined here for backward
1302  compatibility with HTTP/1.0. Clients &SHOULD; include both header fields when a
1303  no-cache request is sent to a server not known to be HTTP/1.1 compliant. HTTP/1.1 caches
1304  &SHOULD; treat "Pragma: no-cache" as if the client had sent "Cache-Control: no-cache".
1305</t>
1306<x:note>
1307  <t>
1308    <x:h>Note:</x:h> because the meaning of "Pragma: no-cache" as a response-header field
1309    is not actually specified, it does not provide a reliable replacement for
1310    "Cache-Control: no-cache" in a response.
1311  </t>
1312</x:note>
1313<t>
1314  This mechanism is deprecated; no new Pragma directives will be defined in HTTP.
1315</t>
1316</section>
1317
1318<section anchor="header.vary" title="Vary">
1319  <iref item="Vary header" primary="true" x:for-anchor="" />
1320  <iref item="Headers" primary="true" subitem="Vary" x:for-anchor="" />
1321  <x:anchor-alias value="Vary"/>
1322  <x:anchor-alias value="Vary-v"/>
1323<t>
1324  The "Vary" response-header field's value indicates the set of request-header fields that
1325  determines, while the response is fresh, whether a cache is permitted to use the
1326  response to reply to a subsequent request without validation; see <xref 
1327  target="caching.negotiated.responses" />.
1328</t>
1329<t>
1330  In uncacheable or stale responses, the Vary field value advises the user agent about
1331  the criteria that were used to select the representation.
1332</t>
1333<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Vary"/><iref primary="true" item="Grammar" subitem="Vary-v"/>
1334  <x:ref>Vary</x:ref>   = "Vary" ":" <x:ref>OWS</x:ref> <x:ref>Vary-v</x:ref>
1335  <x:ref>Vary-v</x:ref> = "*" / 1#<x:ref>field-name</x:ref>
1336</artwork></figure>
1337<t>
1338  The set of header fields named by the Vary field value is known as the selecting
1339  request-headers.
1340</t>
1341<t>
1342  Servers &SHOULD; include a Vary header field with any cacheable response that is
1343  subject to server-driven negotiation. Doing so allows a cache to properly interpret future
1344  requests on that resource and informs the user agent about the presence of negotiation on
1345  that resource. A server &MAY; include a Vary header field with a non-cacheable
1346  response that is subject to server-driven negotiation, since this might provide the user
1347  agent with useful information about the dimensions over which the response varies at the
1348  time of the response.
1349</t>
1350<t>
1351  A Vary field value of "*" signals that unspecified parameters not limited to the
1352  request-headers (e.g., the network address of the client), play a role in the selection of
1353  the response representation; therefore, a cache cannot determine whether this response is
1354  appropriate. The "*" value &MUST-NOT; be generated by a proxy server;
1355  it may only be generated by an origin server.
1356</t>
1357<t>
1358  The field-names given are not limited to the set of standard request-header fields
1359  defined by this specification. Field names are case-insensitive.
1360</t>
1361</section>
1362
1363<section anchor="header.warning" title="Warning">
1364  <iref item="Warning header" primary="true" x:for-anchor="" />
1365  <iref item="Headers" primary="true" subitem="Warning" x:for-anchor="" />
1366  <x:anchor-alias value="Warning"/>
1367  <x:anchor-alias value="Warning-v"/>
1368  <x:anchor-alias value="warning-value"/>
1369  <x:anchor-alias value="warn-agent"/>
1370  <x:anchor-alias value="warn-code"/>
1371  <x:anchor-alias value="warn-date"/>
1372  <x:anchor-alias value="warn-text"/>
1373<t>
1374  The general-header field "Warning" is used to carry additional information about the status
1375  or transformation of a message that might not be reflected in the message. This
1376  information is typically used to warn about possible incorrectness introduced by caching
1377  operations or transformations applied to the entity body of the message.
1378</t>
1379<t>
1380  Warnings can be used for other purposes, both cache-related and otherwise. The use of a
1381  warning, rather than an error status code, distinguish these responses from true failures.
1382</t>
1383<t>
1384  Warning headers can in general be applied to any message, however some warn-codes are
1385  specific to caches and can only be applied to response messages.
1386</t>
1387<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Warning"/><iref primary="true" item="Grammar" subitem="Warning-v"/><iref primary="true" item="Grammar" subitem="warning-value"/><iref primary="true" item="Grammar" subitem="warn-code"/><iref primary="true" item="Grammar" subitem="warn-agent"/><iref primary="true" item="Grammar" subitem="warn-text"/><iref primary="true" item="Grammar" subitem="warn-date"/>
1388  <x:ref>Warning</x:ref>    = "Warning" ":" <x:ref>OWS</x:ref> <x:ref>Warning-v</x:ref>
1389  <x:ref>Warning-v</x:ref>  = 1#<x:ref>warning-value</x:ref>
1390 
1391  <x:ref>warning-value</x:ref> = <x:ref>warn-code</x:ref> <x:ref>SP</x:ref> <x:ref>warn-agent</x:ref> <x:ref>SP</x:ref> <x:ref>warn-text</x:ref>
1392                                        [<x:ref>SP</x:ref> <x:ref>warn-date</x:ref>]
1393 
1394  <x:ref>warn-code</x:ref>  = 3<x:ref>DIGIT</x:ref>
1395  <x:ref>warn-agent</x:ref> = ( <x:ref>uri-host</x:ref> [ ":" <x:ref>port</x:ref> ] ) / <x:ref>pseudonym</x:ref>
1396                  ; the name or pseudonym of the server adding
1397                  ; the Warning header, for use in debugging
1398  <x:ref>warn-text</x:ref>  = <x:ref>quoted-string</x:ref>
1399  <x:ref>warn-date</x:ref>  = <x:ref>DQUOTE</x:ref> <x:ref>HTTP-date</x:ref> <x:ref>DQUOTE</x:ref>
1400</artwork></figure>
1401<t>
1402  Multiple warnings can be attached to a response (either by the origin server or by
1403  a cache), including multiple warnings with the same code number. For example, a server
1404  might provide the same warning with texts in both English and Basque.
1405</t>
1406<t>
1407  When this occurs, the user agent &SHOULD; inform the user of as many of them as
1408  possible, in the order that they appear in the response. If it is not possible to inform
1409  the user of all of the warnings, the user agent &SHOULD; follow these heuristics:
1410  <list style="symbols">
1411    <t>Warnings that appear early in the response take priority over those appearing later
1412      in the response.</t>
1413    <t>Warnings in the user's preferred character set take priority over warnings in other
1414      character sets but with identical warn-codes and warn-agents.</t>
1415  </list>
1416</t>
1417<t>
1418  Systems that generate multiple Warning headers &SHOULD; order them with this user
1419  agent behavior in mind. New Warning headers &SHOULD; be added after any existing
1420  Warning headers.
1421</t>
1422<t>
1423  Warnings are assigned three digit warn-codes. The first digit indicates whether the
1424  Warning is required to be deleted from a stored response after validation:
1425  <list style="symbols">
1426    <t>1xx Warnings that describe the freshness or validation status of the response, and so
1427      &MUST; be deleted by caches after validation. They &MUST-NOT; be generated by a cache
1428      except when validating a cached entry, and &MUST-NOT; be generated by clients.</t>
1429    <t>2xx Warnings that describe some aspect of the entity body or entity headers that is
1430      not rectified by a validation (for example, a lossy compression of the entity bodies)
1431      and &MUST-NOT; be deleted by caches after validation, unless a full response is
1432      returned, in which case they &MUST; be.</t>
1433  </list>
1434</t>
1435<t>
1436  The warn-text &SHOULD; be in a natural language and character set that is most likely
1437  to be intelligible to the human user receiving the response. This decision can be based on
1438  any available knowledge, such as the location of the cache or user, the Accept-Language
1439  field in a request, the Content-Language field in a response, etc. The default language is
1440  English and the default character set is ISO-8859-1 (<xref target="ISO-8859-1" />).
1441</t>
1442<t>
1443  If a character set other than ISO-8859-1 is used, it &MUST; be encoded in the
1444  warn-text using the method described in <xref target="RFC2047" />.
1445</t>
1446<t>
1447  If an implementation sends a message with one or more Warning headers to a receiver whose
1448  version is HTTP/1.0 or lower, then the sender &MUST; include in each warning-value a
1449  warn-date that matches the Date header in the message.
1450</t>
1451<t>
1452  If an implementation receives a message with a warning-value that includes a warn-date,
1453  and that warn-date is different from the Date value in the response, then that
1454  warning-value &MUST; be deleted from the message before storing, forwarding, or using
1455  it. (preventing the consequences of naive caching of Warning header fields.) If all of the
1456  warning-values are deleted for this reason, the Warning header &MUST; be deleted as
1457  well.
1458</t>
1459<t>
1460  The following warn-codes are defined by this specification, each with a recommended
1461  warn-text in English, and a description of its meaning.
1462</t>
1463<t><?rfc needLines="4"?>
1464  110 Response is stale
1465  <list>
1466    <t>&SHOULD; be included whenever the returned response is stale.</t>
1467  </list>
1468</t>
1469<t><?rfc needLines="4"?>
1470  111 Revalidation failed
1471  <list>
1472    <t>&SHOULD; be included if a cache returns a stale response because an attempt to
1473      validate the response failed, due to an inability to reach the server.</t>
1474  </list>
1475</t>
1476<t><?rfc needLines="4"?>
1477  112 Disconnected operation
1478  <list>
1479    <t>&SHOULD; be included if the cache is intentionally disconnected from the rest of
1480      the network for a period of time.</t>
1481  </list>
1482</t>
1483<t><?rfc needLines="4"?>
1484  113 Heuristic expiration
1485  <list>
1486    <t>&SHOULD; be included if the cache heuristically chose a freshness lifetime
1487      greater than 24 hours and the response's age is greater than 24 hours.</t>
1488  </list>
1489</t>
1490<t><?rfc needLines="4"?>
1491  199 Miscellaneous warning
1492  <list>
1493    <t>The warning text can include arbitrary information to be presented to a human
1494      user, or logged. A system receiving this warning &MUST-NOT; take any automated
1495      action, besides presenting the warning to the user.</t>
1496  </list>
1497</t>
1498<t><?rfc needLines="4"?>
1499  214 Transformation applied
1500  <list>
1501    <t>&MUST; be added by an intermediate cache or proxy if it applies any
1502      transformation changing the content-coding (as specified in the Content-Encoding
1503      header) or media-type (as specified in the Content-Type header) of the response, or
1504      the entity-body of the response, unless this Warning code already appears in the
1505      response.</t>
1506  </list>
1507</t>
1508<t><?rfc needLines="4"?>
1509  299 Miscellaneous persistent warning
1510  <list>
1511    <t>The warning text can include arbitrary information to be presented to a human
1512      user, or logged. A system receiving this warning &MUST-NOT; take any automated
1513      action.</t>
1514  </list>
1515</t>
1516</section>
1517
1518</section>
1519
1520<section anchor="history.lists" title="History Lists">
1521<t>
1522  User agents often have history mechanisms, such as "Back" buttons and history lists, that
1523  can be used to redisplay an entity retrieved earlier in a session.
1524</t>
1525<t>
1526  History mechanisms and caches are different. In particular history mechanisms
1527  &SHOULD-NOT; try to show a correct view of the current state of a resource. Rather, a
1528  history mechanism is meant to show exactly what the user saw at the time when the resource
1529  was retrieved.
1530</t>
1531<t>
1532  By default, an expiration time does not apply to history mechanisms. If the entity is still
1533  in storage, a history mechanism &SHOULD; display it even if the entity has expired,
1534  unless the user has specifically configured the agent to refresh expired history documents.
1535</t>
1536<t>
1537  This is not to be construed to prohibit the history mechanism from telling the user that a
1538  view might be stale.
1539</t>
1540<x:note>
1541  <t>
1542    <x:h>Note:</x:h> if history list mechanisms unnecessarily prevent users from viewing
1543    stale resources, this will tend to force service authors to avoid using HTTP expiration
1544    controls and cache controls when they would otherwise like to. Service authors may
1545    consider it important that users not be presented with error messages or warning
1546    messages when they use navigation controls (such as BACK) to view previously fetched
1547    resources. Even though sometimes such resources ought not be cached, or ought to expire
1548    quickly, user interface considerations may force service authors to resort to other
1549    means of preventing caching (e.g. "once-only" URLs) in order not to suffer the effects
1550    of improperly functioning history mechanisms.
1551  </t>
1552</x:note>
1553</section>
1554
1555
1556<section anchor="IANA.considerations" title="IANA Considerations">
1557
1558<section anchor="message.header.registration" title="Message Header Registration">
1559<t>
1560  The Message Header Registry located at <eref
1561  target="http://www.iana.org/assignments/message-headers/message-header-index.html" />
1562  should be updated with the permanent registrations below (see <xref target="RFC3864" />):
1563</t>
1564
1565<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
1566<texttable align="left" anchor="iana.header.registration.table" suppress-title="true">
1567  <ttcol>Header Field Name</ttcol>
1568  <ttcol>Protocol</ttcol>
1569  <ttcol>Status</ttcol>
1570  <ttcol>Reference</ttcol>
1571
1572  <c>Age</c>
1573  <c>http</c>
1574  <c>standard</c>
1575  <c>
1576    <xref target="header.age" />
1577  </c>
1578
1579  <c>Cache-Control</c>
1580  <c>http</c>
1581  <c>standard</c>
1582  <c>
1583    <xref target="header.cache-control" />
1584  </c>
1585
1586  <c>Expires</c>
1587  <c>http</c>
1588  <c>standard</c>
1589  <c>
1590    <xref target="header.expires" />
1591  </c>
1592
1593  <c>Pragma</c>
1594  <c>http</c>
1595  <c>standard</c>
1596  <c>
1597    <xref target="header.pragma" />
1598  </c>
1599
1600  <c>Vary</c>
1601  <c>http</c>
1602  <c>standard</c>
1603  <c>
1604    <xref target="header.vary" />
1605  </c>
1606
1607  <c>Warning</c>
1608  <c>http</c>
1609  <c>standard</c>
1610  <c>
1611    <xref target="header.warning" />
1612  </c>
1613</texttable>
1614<!--(END)-->
1615<t>
1616  The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".
1617</t>
1618</section>
1619
1620</section>
1621
1622<section anchor="security.considerations" title="Security Considerations">
1623<t>
1624  Caches expose additional potential vulnerabilities, since the contents of the cache
1625  represent an attractive target for malicious exploitation. Because cache contents persist
1626  after an HTTP request is complete, an attack on the cache can reveal information long after
1627  a user believes that the information has been removed from the network. Therefore, cache
1628  contents should be protected as sensitive information.
1629</t>
1630</section>
1631
1632<section anchor="ack" title="Acknowledgments">
1633<t>
1634  Much of the content and presentation of the caching design is due to suggestions and
1635  comments from individuals including: Shel Kaphan, Paul Leach, Koen Holtman, David Morris,
1636  and Larry Masinter.
1637</t>
1638</section>
1639
1640</middle>
1641
1642<back>
1643<references title="Normative References">
1644
1645  <reference anchor="ISO-8859-1">
1646    <front>
1647      <title> Information technology -- 8-bit single-byte coded graphic character sets -- Part
1648        1: Latin alphabet No. 1 </title>
1649      <author>
1650        <organization>International Organization for Standardization</organization>
1651      </author>
1652      <date year="1998" />
1653    </front>
1654    <seriesInfo name="ISO/IEC" value="8859-1:1998" />
1655  </reference>
1656
1657  <reference anchor="Part1">
1658    <front>
1659      <title abbrev="HTTP/1.1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title>
1660      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
1661        <organization abbrev="Day Software">Day Software</organization>
1662        <address><email>fielding@gbiv.com</email></address>
1663      </author>
1664      <author fullname="Jim Gettys" initials="J." surname="Gettys">
1665        <organization>One Laptop per Child</organization>
1666        <address><email>jg@laptop.org</email></address>
1667      </author>
1668      <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
1669        <organization abbrev="HP">Hewlett-Packard Company</organization>
1670        <address><email>JeffMogul@acm.org</email></address>
1671      </author>
1672      <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
1673        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1674        <address><email>henrikn@microsoft.com</email></address>
1675      </author>
1676      <author fullname="Larry Masinter" initials="L." surname="Masinter">
1677        <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1678        <address><email>LMM@acm.org</email></address>
1679      </author>
1680      <author fullname="Paul J. Leach" initials="P." surname="Leach">
1681        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1682        <address><email>paulle@microsoft.com</email></address>
1683      </author>
1684      <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
1685        <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1686        <address><email>timbl@w3.org</email></address>
1687      </author>
1688      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
1689        <organization abbrev="W3C">World Wide Web Consortium</organization>
1690        <address><email>ylafon@w3.org</email></address>
1691      </author>
1692      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
1693        <organization abbrev="greenbytes">greenbytes GmbH</organization>
1694        <address><email>julian.reschke@greenbytes.de</email></address>
1695      </author>
1696      <date month="&ID-MONTH;" year="&ID-YEAR;" />
1697    </front>
1698    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;" />
1699    <x:source basename="p1-messaging" href="p1-messaging.xml" />
1700  </reference>
1701
1702  <reference anchor="Part2">
1703    <front>
1704      <title abbrev="HTTP/1.1">HTTP/1.1, part 2: Message Semantics</title>
1705      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
1706        <organization abbrev="Day Software">Day Software</organization>
1707        <address><email>fielding@gbiv.com</email></address>
1708      </author>
1709      <author fullname="Jim Gettys" initials="J." surname="Gettys">
1710        <organization>One Laptop per Child</organization>
1711        <address><email>jg@laptop.org</email></address>
1712      </author>
1713      <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
1714        <organization abbrev="HP">Hewlett-Packard Company</organization>
1715        <address><email>JeffMogul@acm.org</email></address>
1716      </author>
1717      <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
1718        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1719        <address><email>henrikn@microsoft.com</email></address>
1720      </author>
1721      <author fullname="Larry Masinter" initials="L." surname="Masinter">
1722        <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1723        <address><email>LMM@acm.org</email></address>
1724      </author>
1725      <author fullname="Paul J. Leach" initials="P." surname="Leach">
1726        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1727        <address><email>paulle@microsoft.com</email></address>
1728      </author>
1729      <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
1730        <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1731        <address><email>timbl@w3.org</email></address>
1732      </author>
1733      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
1734        <organization abbrev="W3C">World Wide Web Consortium</organization>
1735        <address><email>ylafon@w3.org</email></address>
1736      </author>
1737      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
1738        <organization abbrev="greenbytes">greenbytes GmbH</organization>
1739        <address><email>julian.reschke@greenbytes.de</email></address>
1740      </author>
1741      <date month="&ID-MONTH;" year="&ID-YEAR;" />
1742    </front>
1743    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-&ID-VERSION;" />
1744    <x:source basename="p2-semantics" href="p2-semantics.xml" />
1745  </reference>
1746
1747  <reference anchor="Part3">
1748    <front>
1749      <title abbrev="HTTP/1.1">HTTP/1.1, part 3: Message Payload and Content Negotiation</title>
1750      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
1751        <organization abbrev="Day Software">Day Software</organization>
1752        <address><email>fielding@gbiv.com</email></address>
1753      </author>
1754      <author fullname="Jim Gettys" initials="J." surname="Gettys">
1755        <organization>One Laptop per Child</organization>
1756        <address><email>jg@laptop.org</email></address>
1757      </author>
1758      <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
1759        <organization abbrev="HP">Hewlett-Packard Company</organization>
1760        <address><email>JeffMogul@acm.org</email></address>
1761      </author>
1762      <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
1763        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1764        <address><email>henrikn@microsoft.com</email></address>
1765      </author>
1766      <author fullname="Larry Masinter" initials="L." surname="Masinter">
1767        <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1768        <address><email>LMM@acm.org</email></address>
1769      </author>
1770      <author fullname="Paul J. Leach" initials="P." surname="Leach">
1771        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1772        <address><email>paulle@microsoft.com</email></address>
1773      </author>
1774      <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
1775        <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1776        <address><email>timbl@w3.org</email></address>
1777      </author>
1778      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
1779        <organization abbrev="W3C">World Wide Web Consortium</organization>
1780        <address><email>ylafon@w3.org</email></address>
1781      </author>
1782      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
1783        <organization abbrev="greenbytes">greenbytes GmbH</organization>
1784        <address><email>julian.reschke@greenbytes.de</email></address>
1785      </author>
1786      <date month="&ID-MONTH;" year="&ID-YEAR;" />
1787    </front>
1788    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p3-payload-&ID-VERSION;" />
1789    <x:source basename="p3-payload" href="p3-payload.xml" />
1790  </reference>
1791
1792  <reference anchor="Part4">
1793    <front>
1794      <title abbrev="HTTP/1.1">HTTP/1.1, part 4: Conditional Requests</title>
1795      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
1796        <organization abbrev="Day Software">Day Software</organization>
1797        <address><email>fielding@gbiv.com</email></address>
1798      </author>
1799      <author fullname="Jim Gettys" initials="J." surname="Gettys">
1800        <organization>One Laptop per Child</organization>
1801        <address><email>jg@laptop.org</email></address>
1802      </author>
1803      <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
1804        <organization abbrev="HP">Hewlett-Packard Company</organization>
1805        <address><email>JeffMogul@acm.org</email></address>
1806      </author>
1807      <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
1808        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1809        <address><email>henrikn@microsoft.com</email></address>
1810      </author>
1811      <author fullname="Larry Masinter" initials="L." surname="Masinter">
1812        <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1813        <address><email>LMM@acm.org</email></address>
1814      </author>
1815      <author fullname="Paul J. Leach" initials="P." surname="Leach">
1816        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1817        <address><email>paulle@microsoft.com</email></address>
1818      </author>
1819      <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
1820        <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1821        <address><email>timbl@w3.org</email></address>
1822      </author>
1823      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
1824        <organization abbrev="W3C">World Wide Web Consortium</organization>
1825        <address><email>ylafon@w3.org</email></address>
1826      </author>
1827      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
1828        <organization abbrev="greenbytes">greenbytes GmbH</organization>
1829        <address><email>julian.reschke@greenbytes.de</email></address>
1830      </author>
1831      <date month="&ID-MONTH;" year="&ID-YEAR;" />
1832    </front>
1833    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p4-conditional-&ID-VERSION;" />
1834    <x:source basename="p4-conditional" href="p4-conditional.xml" />
1835  </reference>
1836
1837  <reference anchor="Part5">
1838    <front>
1839      <title abbrev="HTTP/1.1">HTTP/1.1, part 5: Range Requests and Partial Responses</title>
1840      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
1841        <organization abbrev="Day Software">Day Software</organization>
1842        <address><email>fielding@gbiv.com</email></address>
1843      </author>
1844      <author fullname="Jim Gettys" initials="J." surname="Gettys">
1845        <organization>One Laptop per Child</organization>
1846        <address><email>jg@laptop.org</email></address>
1847      </author>
1848      <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
1849        <organization abbrev="HP">Hewlett-Packard Company</organization>
1850        <address><email>JeffMogul@acm.org</email></address>
1851      </author>
1852      <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
1853        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1854        <address><email>henrikn@microsoft.com</email></address>
1855      </author>
1856      <author fullname="Larry Masinter" initials="L." surname="Masinter">
1857        <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1858        <address><email>LMM@acm.org</email></address>
1859      </author>
1860      <author fullname="Paul J. Leach" initials="P." surname="Leach">
1861        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1862        <address><email>paulle@microsoft.com</email></address>
1863      </author>
1864      <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
1865        <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1866        <address><email>timbl@w3.org</email></address>
1867      </author>
1868      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
1869        <organization abbrev="W3C">World Wide Web Consortium</organization>
1870        <address><email>ylafon@w3.org</email></address>
1871      </author>
1872      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
1873        <organization abbrev="greenbytes">greenbytes GmbH</organization>
1874        <address><email>julian.reschke@greenbytes.de</email></address>
1875      </author>
1876      <date month="&ID-MONTH;" year="&ID-YEAR;" />
1877    </front>
1878    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-&ID-VERSION;" />
1879    <x:source basename="p5-range" href="p5-range.xml" />
1880  </reference>
1881
1882  <reference anchor="Part7">
1883    <front>
1884      <title abbrev="HTTP/1.1">HTTP/1.1, part 7: Authentication</title>
1885      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
1886        <organization abbrev="Day Software">Day Software</organization>
1887        <address><email>fielding@gbiv.com</email></address>
1888      </author>
1889      <author fullname="Jim Gettys" initials="J." surname="Gettys">
1890        <organization>One Laptop per Child</organization>
1891        <address><email>jg@laptop.org</email></address>
1892      </author>
1893      <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
1894        <organization abbrev="HP">Hewlett-Packard Company</organization>
1895        <address><email>JeffMogul@acm.org</email></address>
1896      </author>
1897      <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
1898        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1899        <address><email>henrikn@microsoft.com</email></address>
1900      </author>
1901      <author fullname="Larry Masinter" initials="L." surname="Masinter">
1902        <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1903        <address><email>LMM@acm.org</email></address>
1904      </author>
1905      <author fullname="Paul J. Leach" initials="P." surname="Leach">
1906        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1907        <address><email>paulle@microsoft.com</email></address>
1908      </author>
1909      <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
1910        <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1911        <address><email>timbl@w3.org</email></address>
1912      </author>
1913      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
1914        <organization abbrev="W3C">World Wide Web Consortium</organization>
1915        <address><email>ylafon@w3.org</email></address>
1916      </author>
1917      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
1918        <organization abbrev="greenbytes">greenbytes GmbH</organization>
1919        <address><email>julian.reschke@greenbytes.de</email></address>
1920      </author>
1921      <date month="&ID-MONTH;" year="&ID-YEAR;" />
1922    </front>
1923    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p7-auth-&ID-VERSION;" />
1924    <x:source basename="p7-auth" href="p7-auth.xml" />
1925  </reference>
1926
1927  <reference anchor="RFC2047">
1928    <front>
1929      <title abbrev="Message Header Extensions">MIME (Multipurpose Internet Mail Extensions)
1930        Part Three: Message Header Extensions for Non-ASCII Text</title>
1931      <author fullname="Keith Moore" initials="K." surname="Moore">
1932        <organization>University of Tennessee</organization>
1933        <address><email>moore@cs.utk.edu</email></address>
1934      </author>
1935      <date month="November" year="1996" />
1936    </front>
1937    <seriesInfo name="RFC" value="2047" />
1938  </reference>
1939
1940  <reference anchor="RFC2119">
1941    <front>
1942      <title>Key words for use in RFCs to Indicate Requirement Levels</title>
1943      <author fullname="Scott Bradner" initials="S." surname="Bradner">
1944        <organization>Harvard University</organization>
1945        <address><email>sob@harvard.edu</email></address>
1946      </author>
1947      <date month="March" year="1997" />
1948    </front>
1949    <seriesInfo name="BCP" value="14" />
1950    <seriesInfo name="RFC" value="2119" />
1951  </reference>
1952
1953  <reference anchor="RFC5234">
1954    <front>
1955      <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
1956      <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
1957        <organization>Brandenburg InternetWorking</organization>
1958        <address>
1959        <postal>
1960        <street>675 Spruce Dr.</street>
1961        <city>Sunnyvale</city>
1962        <region>CA</region>
1963        <code>94086</code>
1964        <country>US</country></postal>
1965        <phone>+1.408.246.8253</phone>
1966        <email>dcrocker@bbiw.net</email></address> 
1967      </author>
1968      <author initials="P." surname="Overell" fullname="Paul Overell">
1969        <organization>THUS plc.</organization>
1970        <address>
1971        <postal>
1972        <street>1/2 Berkeley Square</street>
1973        <street>99 Berkely Street</street>
1974        <city>Glasgow</city>
1975        <code>G3 7HR</code>
1976        <country>UK</country></postal>
1977        <email>paul.overell@thus.net</email></address>
1978      </author>
1979      <date month="January" year="2008"/>
1980    </front>
1981    <seriesInfo name="STD" value="68"/>
1982    <seriesInfo name="RFC" value="5234"/>
1983  </reference>
1984 
1985</references>
1986
1987<references title="Informative References">
1988
1989  <reference anchor="RFC1305">
1990    <front>
1991      <title>Network Time Protocol (Version 3) Specification, Implementation</title>
1992      <author fullname="David L. Mills" initials="D." surname="Mills">
1993        <organization>University of Delaware, Electrical Engineering Department</organization>
1994        <address><email>mills@udel.edu</email></address>
1995      </author>
1996      <date month="March" year="1992" />
1997    </front>
1998    <seriesInfo name="RFC" value="1305" />
1999  </reference>
2000
2001  <reference anchor="RFC2616">
2002    <front>
2003      <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
2004      <author fullname="R. Fielding" initials="R." surname="Fielding">
2005        <organization>University of California, Irvine</organization>
2006        <address><email>fielding@ics.uci.edu</email></address>
2007      </author>
2008      <author fullname="J. Gettys" initials="J." surname="Gettys">
2009        <organization>W3C</organization>
2010        <address><email>jg@w3.org</email></address>
2011      </author>
2012      <author fullname="J. Mogul" initials="J." surname="Mogul">
2013        <organization>Compaq Computer Corporation</organization>
2014        <address><email>mogul@wrl.dec.com</email></address>
2015      </author>
2016      <author fullname="H. Frystyk" initials="H." surname="Frystyk">
2017        <organization>MIT Laboratory for Computer Science</organization>
2018        <address><email>frystyk@w3.org</email></address>
2019      </author>
2020      <author fullname="L. Masinter" initials="L." surname="Masinter">
2021        <organization>Xerox Corporation</organization>
2022        <address><email>masinter@parc.xerox.com</email></address>
2023      </author>
2024      <author fullname="P. Leach" initials="P." surname="Leach">
2025        <organization>Microsoft Corporation</organization>
2026        <address><email>paulle@microsoft.com</email></address>
2027      </author>
2028      <author fullname="T. Berners-Lee" initials="T." surname="Berners-Lee">
2029        <organization>W3C</organization>
2030        <address><email>timbl@w3.org</email></address>
2031      </author>
2032      <date month="June" year="1999" />
2033    </front>
2034    <seriesInfo name="RFC" value="2616" />
2035  </reference>
2036
2037  <reference anchor="RFC3864">
2038    <front>
2039      <title>Registration Procedures for Message Header Fields</title>
2040      <author fullname="G. Klyne" initials="G." surname="Klyne">
2041        <organization>Nine by Nine</organization>
2042        <address><email>GK-IETF@ninebynine.org</email></address>
2043      </author>
2044      <author fullname="M. Nottingham" initials="M." surname="Nottingham">
2045        <organization>BEA Systems</organization>
2046        <address><email>mnot@pobox.com</email></address>
2047      </author>
2048      <author fullname="J. Mogul" initials="J." surname="Mogul">
2049        <organization>HP Labs</organization>
2050        <address><email>JeffMogul@acm.org</email></address>
2051      </author>
2052      <date month="September" year="2004" />
2053    </front>
2054    <seriesInfo name="BCP" value="90" />
2055    <seriesInfo name="RFC" value="3864" />
2056  </reference>
2057
2058</references>
2059
2060<section anchor="compatibility" title="Compatibility with Previous Versions">
2061
2062<section anchor="changes.from.rfc.2068" title="Changes from RFC 2068">
2063<t>
2064  A case was missed in the Cache-Control model of HTTP/1.1; s-maxage was introduced to add
2065  this missing case.
2066  (Sections <xref format="counter" target="response.cacheability" />, <xref format="counter" target="header.cache-control" />).
2067</t>
2068<t>
2069  Transfer-coding and message lengths all interact in ways that required fixing exactly
2070  when chunked encoding is used (to allow for transfer encoding that may not be self
2071  delimiting); it was important to straighten out exactly how message lengths are computed.
2072  (see also <xref target="Part1" />, <xref target="Part3" /> and <xref target="Part5" />)
2073  <cref source="jre">This used to refer to the text about non-modifiable headers, and will have to be updated later on.</cref>
2074</t>
2075<t>
2076  Proxies should be able to add Content-Length when appropriate.
2077  <cref source="jre">This used to refer to the text about non-modifiable headers, and will have to be updated later on.</cref>
2078</t>
2079<t
2080  >Range request responses would become very verbose if all meta-data were always returned;
2081  by allowing the server to only send needed headers in a 206 response, this problem can be
2082  avoided.
2083  (<xref target="combining.headers" />)
2084</t>
2085<t>
2086  The Cache-Control: max-age directive was not properly defined for responses.
2087  (<xref target="cache-response-directive"/>)
2088</t>
2089<t>
2090  Warnings could be cached incorrectly, or not updated appropriately. (Section <xref
2091    format="counter" target="expiration.model" />, <xref format="counter"
2092    target="combining.headers" />, <xref format="counter" target="header.cache-control" />,
2093  and <xref format="counter" target="header.warning" />) Warning also needed to be a general
2094  header, as PUT or other methods may have need for it in requests.
2095</t>
2096</section>
2097
2098<section anchor="changes.from.rfc.2616" title="Changes from RFC 2616">
2099<t>
2100  Clarify denial of service attack avoidance requirement.
2101  (<xref target="invalidation.after.updates.or.deletions" />)
2102</t>
2103</section>
2104
2105    </section>
2106
2107<section xmlns:x="http://purl.org/net/xml2rfc/ext" title="Collected ABNF" anchor="collected.abnf">
2108<figure>
2109<artwork type="abnf" name="p6-cache.parsed-abnf">
2110<x:ref>Age</x:ref> = "Age:" OWS Age-v
2111<x:ref>Age-v</x:ref> = delta-seconds
2112
2113<x:ref>Cache-Control</x:ref> = "Cache-Control:" OWS Cache-Control-v
2114<x:ref>Cache-Control-v</x:ref> = *( "," OWS ) cache-directive *( OWS "," [ OWS
2115 cache-directive ] )
2116
2117<x:ref>Expires</x:ref> = "Expires:" OWS Expires-v
2118<x:ref>Expires-v</x:ref> = HTTP-date
2119
2120<x:ref>HTTP-date</x:ref> = &lt;HTTP-date, defined in [Part1], Section 3.2&gt;
2121
2122<x:ref>OWS</x:ref> = &lt;OWS, defined in [Part1], Section 1.2.2&gt;
2123
2124<x:ref>Pragma</x:ref> = "Pragma:" OWS Pragma-v
2125<x:ref>Pragma-v</x:ref> = *( "," OWS ) pragma-directive *( OWS "," [ OWS
2126 pragma-directive ] )
2127
2128<x:ref>Vary</x:ref> = "Vary:" OWS Vary-v
2129<x:ref>Vary-v</x:ref> = "*" / ( *( "," OWS ) field-name *( OWS "," [ OWS field-name
2130 ] ) )
2131
2132<x:ref>Warning</x:ref> = "Warning:" OWS Warning-v
2133<x:ref>Warning-v</x:ref> = *( "," OWS ) warning-value *( OWS "," [ OWS warning-value
2134 ] )
2135
2136<x:ref>cache-directive</x:ref> = cache-request-directive / cache-response-directive
2137<x:ref>cache-extension</x:ref> = token [ "=" ( token / quoted-string ) ]
2138<x:ref>cache-request-directive</x:ref> = "no-cache" / "no-store" / ( "max-age="
2139 delta-seconds ) / ( "max-stale" [ "=" delta-seconds ] ) / (
2140 "min-fresh=" delta-seconds ) / "no-transform" / "only-if-cached" /
2141 cache-extension
2142<x:ref>cache-response-directive</x:ref> = "public" / ( "private" [ "=" DQUOTE *( ","
2143 OWS ) field-name *( OWS "," [ OWS field-name ] ) DQUOTE ] ) / (
2144 "no-cache" [ "=" DQUOTE *( "," OWS ) field-name *( OWS "," [ OWS
2145 field-name ] ) DQUOTE ] ) / "no-store" / "no-transform" /
2146 "must-revalidate" / "proxy-revalidate" / ( "max-age=" delta-seconds
2147 ) / ( "s-maxage=" delta-seconds ) / cache-extension
2148
2149<x:ref>delta-seconds</x:ref> = 1*DIGIT
2150
2151<x:ref>extension-pragma</x:ref> = token [ "=" ( token / quoted-string ) ]
2152
2153<x:ref>field-name</x:ref> = &lt;field-name, defined in [Part1], Section 4.2&gt;
2154
2155<x:ref>port</x:ref> = &lt;port, defined in [Part1], Section 2.1&gt;
2156<x:ref>pragma-directive</x:ref> = "no-cache" / extension-pragma
2157<x:ref>pseudonym</x:ref> = &lt;pseudonym, defined in [Part1], Section 8.9&gt;
2158
2159<x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in [Part1], Section 1.2.2&gt;
2160
2161<x:ref>token</x:ref> = &lt;token, defined in [Part1], Section 1.2.2&gt;
2162
2163<x:ref>uri-host</x:ref> = &lt;uri-host, defined in [Part1], Section 2.1&gt;
2164
2165<x:ref>warn-agent</x:ref> = ( uri-host [ ":" port ] ) / pseudonym
2166<x:ref>warn-code</x:ref> = 3DIGIT
2167<x:ref>warn-date</x:ref> = DQUOTE HTTP-date DQUOTE
2168<x:ref>warn-text</x:ref> = quoted-string
2169<x:ref>warning-value</x:ref> = warn-code SP warn-agent SP warn-text [ SP warn-date
2170 ]
2171
2172
2173</artwork>
2174</figure>
2175<figure><preamble>ABNF diagnostics:</preamble><artwork type="inline">
2176; Age defined but not used
2177; Cache-Control defined but not used
2178; Expires defined but not used
2179; Pragma defined but not used
2180; Vary defined but not used
2181; Warning defined but not used
2182</artwork></figure></section>
2183
2184<section anchor="change.log" title="Change Log (to be removed by RFC Editor before publication)">
2185
2186<section title="Since RFC2616">
2187  <t>Extracted relevant partitions from <xref target="RFC2616" />.</t>
2188</section>
2189
2190<section title="Since draft-ietf-httpbis-p6-cache-00">
2191<t>
2192  Closed issues:
2193  <list style="symbols">
2194    <t>
2195      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/9" />: "Trailer" (<eref target="http://purl.org/NET/http-errata#trailer-hop" />)</t>
2196    <t>
2197      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/12" />: "Invalidation after Update or Delete" (<eref target="http://purl.org/NET/http-errata#invalidupd" />)</t>
2198    <t>
2199      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/35" />: "Normative and Informative references"</t>
2200    <t>
2201      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/48" />: "Date reference typo"</t>
2202    <t>
2203      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/49" />: "Connection header text"</t>
2204    <t>
2205      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/65" />: "Informative references"</t>
2206    <t>
2207      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/66" />: "ISO-8859-1 Reference"</t>
2208    <t>
2209      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/86" />: "Normative up-to-date references"</t>
2210    <t>
2211      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/87" />: "typo in 13.2.2"</t>
2212  </list>
2213</t>
2214<t>
2215  Other changes:
2216  <list style="symbols">
2217    <t>Use names of RFC4234 core rules DQUOTE and HTAB (work in progress on <eref
2218        target="http://tools.ietf.org/wg/httpbis/trac/ticket/36" />)</t>
2219  </list>
2220</t>
2221</section>
2222
2223<section title="Since draft-ietf-httpbis-p6-cache-01">
2224<t>
2225  Closed issues:
2226  <list style="symbols">
2227    <t>
2228      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/82" />: "rel_path not used"</t>
2229  </list>
2230</t>
2231<t>
2232  Other changes:
2233  <list style="symbols">
2234    <t>Get rid of duplicate BNF rule names ("host" -&gt; "uri-host") (work in progress
2235      on <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36" />)</t>
2236    <t>Add explicit references to BNF syntax and rules imported from other parts of the
2237      specification.</t>
2238  </list>
2239</t>
2240</section>
2241
2242<section anchor="changes.since.02" title="Since draft-ietf-httpbis-p6-cache-02">
2243<t>
2244  Ongoing work on IANA Message Header Registration (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/40" />):
2245  <list style="symbols">
2246    <t>Reference RFC 3984, and update header registrations for headers defined in this
2247      document.</t>
2248  </list>
2249</t>
2250</section>
2251
2252<section anchor="changes.since.03" title="Since draft-ietf-httpbis-p6-cache-03">
2253<t>
2254  Closed issues:
2255  <list style="symbols">
2256    <t>
2257      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/106" />: "Vary header classification"</t>
2258  </list>
2259</t>
2260</section>
2261
2262<section anchor="changes.since.04" title="Since draft-ietf-httpbis-p6-cache-04">
2263<t>
2264  Ongoing work on ABNF conversion (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>):
2265  <list style="symbols"> 
2266    <t>
2267      Use "/" instead of "|" for alternatives.
2268    </t>
2269    <t>
2270      Introduce new ABNF rules for "bad" whitespace ("BWS"), optional
2271      whitespace ("OWS") and required whitespace ("RWS").
2272    </t>
2273    <t>
2274      Rewrite ABNFs to spell out whitespace rules, factor out
2275      header value format definitions.
2276    </t>
2277  </list>
2278</t>
2279</section>
2280
2281<section anchor="changes.since.05" title="Since draft-ietf-httpbis-p6-cache-05">
2282<t>
2283  This is a total rewrite of this part of the specification.
2284</t>
2285<t>
2286  Affected issues:
2287  <list style="symbols">
2288    <t>
2289      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/54" />: "Definition of 1xx Warn-Codes"</t>
2290    <t>
2291      <eref target="http://trac.tools.ietf.org/wg/httpbis/trac/ticket/60" />: "Placement of 13.5.1 and 13.5.2"</t>
2292    <t>
2293      <eref target="http://trac.tools.ietf.org/wg/httpbis/trac/ticket/138" />: "The role of Warning and Semantic Transparency in Caching"</t>
2294    <t>
2295      <eref target="http://trac.tools.ietf.org/wg/httpbis/trac/ticket/139" />: "Methods and Caching"</t>
2296  </list>
2297</t>
2298<t>
2299  In addition: Final work on ABNF conversion (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>):
2300  <list style="symbols"> 
2301    <t>
2302      Add appendix containing collected and expanded ABNF, reorganize ABNF introduction.
2303    </t>
2304  </list>
2305</t>
2306</section>
2307
2308<section anchor="changes.since.06" title="Since draft-ietf-httpbis-p6-cache-06">
2309<t>
2310  Closed issues:
2311  <list style="symbols"> 
2312    <t>
2313      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/161"/>:
2314      "base for numeric protocol elements"
2315    </t>
2316  </list>
2317</t>
2318</section>
2319
2320</section>
2321  </back>
2322</rfc>
Note: See TracBrowser for help on using the repository browser.