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

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

bump up document dates

  • Property svn:eol-style set to native
File size: 137.9 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<?xml-stylesheet type='text/xsl' href='../myxml2rfc.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 "January">
16  <!ENTITY ID-YEAR "2009">
17  <!ENTITY notation                    "<xref target='Part1' x:rel='#notation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
18  <!ENTITY notation-abnf               "<xref target='Part1' x:rel='#notation.abnf' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
19  <!ENTITY basic-rules                 "<xref target='Part1' x:rel='#basic.rules' 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 combining-byte-ranges       "<xref target='Part5' x:rel='#combining.byte.ranges' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
23  <!ENTITY entity-length               "<xref target='Part3' x:rel='#entity.length' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
24  <!ENTITY full-date                   "<xref target='Part1' x:rel='#full.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
25  <!ENTITY header-authorization        "<xref target='Part7' x:rel='#header.authorization' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
26  <!ENTITY header-connection           "<xref target='Part1' x:rel='#header.connection' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
27  <!ENTITY header-date                 "<xref target='Part1' x:rel='#header.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
28  <!ENTITY header-via                  "<xref target='Part1' x:rel='#header.via' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
29  <!ENTITY message-headers             "<xref target='Part1' x:rel='#message.headers' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
30  <!ENTITY message-length              "<xref target='Part1' x:rel='#message.length' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
31  <!ENTITY safe-methods                "<xref target='Part2' x:rel='#safe.methods' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
32  <!ENTITY server-driven-negotiation   "<xref target='Part3' x:rel='#server-driven.negotiation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
33  <!ENTITY uri                         "<xref target='Part1' x:rel='#uri' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
34]>
35<?rfc toc="yes" ?>
36<?rfc symrefs="yes" ?>
37<?rfc sortrefs="yes" ?>
38<?rfc compact="yes"?>
39<?rfc subcompact="no" ?>
40<?rfc linkmailto="no" ?>
41<?rfc editing="no" ?>
42<?rfc comments="yes"?>
43<?rfc inline="yes"?>
44<?rfc-ext allow-markup-in-artwork="yes" ?>
45<?rfc-ext include-references-in-index="yes" ?>
46<rfc obsoletes="2616" category="std" x:maturity-level="draft"
47     ipr="full3978" docName="draft-ietf-httpbis-p6-cache-&ID-VERSION;"
48     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 initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
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 initials="J." surname="Gettys" fullname="Jim 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 initials="J." surname="Mogul" fullname="Jeffrey C. 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 initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
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 initials="L." surname="Masinter" fullname="Larry 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 initials="P." surname="Leach" fullname="Paul J. 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 initials="T." surname="Berners-Lee" fullname="Tim 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 initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
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 initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
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
192<abstract>
193<t>
194   The Hypertext Transfer Protocol (HTTP) is an application-level
195   protocol for distributed, collaborative, hypermedia information
196   systems. HTTP has been in use by the World Wide Web global information
197   initiative since 1990. This document is Part 6 of the seven-part specification
198   that defines the protocol referred to as "HTTP/1.1" and, taken together,
199   obsoletes RFC 2616.  Part 6 defines requirements on HTTP caches
200   and the associated header fields that control cache behavior or indicate
201   cacheable response messages.
202</t>
203</abstract>
204
205<note title="Editorial Note (To be removed by RFC Editor)">
206  <t>
207    Discussion of this draft should take place on the HTTPBIS working group
208    mailing list (ietf-http-wg@w3.org). The current issues list is
209    at <eref target="http://tools.ietf.org/wg/httpbis/trac/report/11"/>
210    and related documents (including fancy diffs) can be found at
211    <eref target="http://tools.ietf.org/wg/httpbis/"/>.
212  </t>
213  <t>
214    The changes in this draft are summarized in <xref target="changes.since.05"/>.
215  </t>
216</note>
217</front>
218<middle>
219<section title="Introduction" anchor="caching">
220<t>
221   HTTP is typically used for distributed information systems, where
222   performance can be improved by the use of response caches, and includes
223   a number of elements intended to make caching work as well as possible.
224   Because these elements interact with each other, it is useful to describe
225   the caching design of HTTP separately.  This document defines aspects of
226   HTTP/1.1 related to caching and reusing response messages.
227</t>
228
229<section title="Purpose" anchor="intro.purpose">
230<iref item="cache"/>
231<t>
232   An HTTP <x:dfn>cache</x:dfn> is a local store of response messages
233   and the subsystem that controls its message storage, retrieval, and
234   deletion. A cache stores cacheable responses in order to reduce the
235   response time and network bandwidth consumption on future, equivalent
236   requests. Any client or server may include a cache, though a cache
237   cannot be used by a server that is acting as a tunnel.
238</t>
239<t>
240   Caching would be useless if it did not significantly improve
241   performance. The goal of caching in HTTP/1.1 is to reuse a prior response
242   message to satisfy a current request.  In some cases, the existing response
243   can be reused without the need for a network request, reducing latency and
244   network round-trips; we use an "expiration" mechanism for this purpose
245   (see <xref target="expiration.model"/>).  Even when a new request is required,
246   it is often possible to reuse all or parts of the payload of a prior response
247   to satisfy the request, thereby reducing network bandwidth usage; we use a
248   "validation" mechanism for this purpose (see <xref target="validation.model"/>).
249</t>
250<iref item="semantically transparent"/>
251<t>
252   A cache behaves in a "<x:dfn>semantically transparent</x:dfn>" manner, with
253   respect to a particular response, when its use affects neither the
254   requesting client nor the origin server, except to improve
255   performance. When a cache is semantically transparent, the client
256   receives exactly the same response status and payload
257   that it would have received had its request been handled directly
258   by the origin server.
259</t>
260<t>
261   In an ideal world, all interactions with an HTTP cache would be
262   semantically transparent.  However, for some resources, semantic
263   transparency is not always necessary and can be effectively traded
264   for the sake of bandwidth scaling, disconnected operation, and
265   high availability.  HTTP/1.1 allows origin servers, caches,
266   and clients to explicitly reduce transparency when necessary.
267   However, because non-transparent operation may confuse non-expert
268   users and might be incompatible with certain server applications
269   (such as those for ordering merchandise), the protocol requires that
270   transparency be relaxed
271  <list style="symbols">
272     <t>only by an explicit protocol-level request when relaxed by
273        client or origin server</t>
274
275     <t>only with an explicit warning to the end user when relaxed by
276        cache or client</t>
277  </list>
278</t>
279<t>
280   Therefore, HTTP/1.1 provides these important elements:
281  <list style="numbers">
282      <t>Protocol features that provide full semantic transparency when
283         this is required by all parties.</t>
284
285      <t>Protocol features that allow an origin server or user agent to
286         explicitly request and control non-transparent operation.</t>
287
288      <t>Protocol features that allow a cache to attach warnings to
289         responses that do not preserve the requested approximation of
290         semantic transparency.</t>
291  </list>
292</t>
293<t>
294   A basic principle is that it must be possible for the clients to
295   detect any potential relaxation of semantic transparency.
296  <list><t>
297      <x:h>Note:</x:h> The server, cache, or client implementor might be faced with
298      design decisions not explicitly discussed in this specification.
299      If a decision might affect semantic transparency, the implementor
300      ought to err on the side of maintaining transparency unless a
301      careful and complete analysis shows significant benefits in
302      breaking transparency.
303    </t></list>
304</t>
305</section>
306
307<section title="Terminology" anchor="intro.terminology">
308<t>
309   This specification uses a number of terms to refer to the roles
310   played by participants in, and objects of, HTTP caching.
311</t>
312<t>
313  <iref item="cacheable"/>
314  <x:dfn>cacheable</x:dfn>
315  <list>
316    <t>
317      A response is cacheable if a cache is allowed to store a copy of
318      the response message for use in answering subsequent requests.
319      Even when a response is cacheable, there may
320      be additional constraints on whether a cache can use the cached
321      copy for a particular request.
322    </t>
323  </list>
324</t>
325<t>
326  <iref item="first-hand"/>
327  <x:dfn>first-hand</x:dfn>
328  <list>
329    <t>
330      A response is first-hand if it comes directly and without
331      unnecessary delay from the origin server, perhaps via one or more
332      proxies. A response is also first-hand if its validity has just
333      been checked directly with the origin server.
334    </t>
335  </list>
336</t>
337<t>
338  <iref item="explicit expiration time"/>
339  <x:dfn>explicit expiration time</x:dfn>
340  <list>
341    <t>
342      The time at which the origin server intends that an entity should
343      no longer be returned by a cache without further validation.
344    </t>
345  </list>
346</t>
347<t>
348  <iref item="heuristic expiration time"/>
349  <x:dfn>heuristic expiration time</x:dfn>
350  <list>
351    <t>
352      An expiration time assigned by a cache when no explicit expiration
353      time is available.
354    </t>
355  </list>
356</t>
357<t>
358  <iref item="age"/>
359  <x:dfn>age</x:dfn>
360  <list>
361    <t>
362      The age of a response is the time since it was sent by, or
363      successfully validated with, the origin server.
364    </t>
365  </list>
366</t>
367<t>
368  <iref item="freshness lifetime"/>
369  <x:dfn>freshness lifetime</x:dfn>
370  <list>
371    <t>
372      The length of time between the generation of a response and its
373      expiration time.
374    </t>
375  </list>
376</t>
377<t>
378  <iref item="fresh"/>
379  <x:dfn>fresh</x:dfn>
380  <list>
381    <t>
382      A response is fresh if its age has not yet exceeded its freshness
383      lifetime.
384    </t>
385  </list>
386</t>
387<t>
388  <iref item="stale"/>
389  <x:dfn>stale</x:dfn>
390  <list>
391    <t>
392      A response is stale if its age has passed its freshness lifetime.
393    </t>
394  </list>
395</t>
396<t>
397  <iref item="validator"/>
398  <x:dfn>validator</x:dfn>
399  <list>
400    <t>
401      A protocol element (e.g., an entity tag or a Last-Modified time)
402      that is used to find out whether a cache entry is an equivalent
403      copy of an entity.
404    </t>
405  </list>
406</t>
407</section>
408
409<section title="Requirements" anchor="intro.requirements">
410<t>
411   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
412   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
413   document are to be interpreted as described in <xref target="RFC2119"/>.
414</t>
415<t>
416   An implementation is not compliant if it fails to satisfy one or more
417   of the &MUST; or &REQUIRED; level requirements for the protocols it
418   implements. An implementation that satisfies all the &MUST; or &REQUIRED;
419   level and all the &SHOULD; level requirements for its protocols is said
420   to be "unconditionally compliant"; one that satisfies all the &MUST;
421   level requirements but not all the &SHOULD; level requirements for its
422   protocols is said to be "conditionally compliant."
423</t>
424</section>
425
426<section title="Syntax Notation" anchor="notation">
427  <x:anchor-alias value="ALPHA"/>
428  <x:anchor-alias value="CR"/>
429  <x:anchor-alias value="DIGIT"/>
430  <x:anchor-alias value="DQUOTE"/>
431  <x:anchor-alias value="LF"/>
432  <x:anchor-alias value="OCTET"/>
433  <x:anchor-alias value="SP"/>
434  <x:anchor-alias value="VCHAR"/>
435  <x:anchor-alias value="WSP"/>
436<t>
437  This specification uses the ABNF syntax defined in &notation;.
438  The following core rules are included by
439  reference, as defined in <xref target="RFC5234" x:fmt="," x:sec="B.1"/>:
440  ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls),
441  DIGIT (decimal 0-9), DQUOTE (double quote),
442  HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed),
443  OCTET (any 8-bit sequence of data), SP (space),
444  VCHAR (any visible USASCII character),
445  and WSP (whitespace).
446</t>
447
448<section title="Core Rules" anchor="core.rules">
449  <x:anchor-alias value="quoted-string"/>
450  <x:anchor-alias value="token"/>
451  <x:anchor-alias value="OWS"/>
452<t>
453  The core rules below are defined in &basic-rules;:
454</t>
455<figure><artwork type="abnf2616">
456  <x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in &basic-rules;&gt;
457  <x:ref>token</x:ref>         = &lt;token, defined in &basic-rules;&gt;
458  <x:ref>OWS</x:ref>           = &lt;OWS, defined in &basic-rules;&gt;
459</artwork></figure>
460</section>
461
462<section title="ABNF Rules defined in other Parts of the Specification" anchor="abnf.dependencies">
463  <x:anchor-alias value="field-name"/>
464  <x:anchor-alias value="HTTP-date"/>
465  <x:anchor-alias value="port"/>
466  <x:anchor-alias value="pseudonym"/>
467  <x:anchor-alias value="uri-host"/>
468<t>
469  The ABNF rules below are defined in other parts:
470</t>
471<figure><!--Part1--><artwork type="abnf2616">
472  <x:ref>field-name</x:ref>    = &lt;field-name, defined in &message-headers;&gt;
473  <x:ref>HTTP-date</x:ref>     = &lt;HTTP-date, defined in &full-date;&gt;
474  <x:ref>port</x:ref>          = &lt;port, defined in &uri;&gt;
475  <x:ref>pseudonym</x:ref>     = &lt;pseudonym, defined in &header-via;&gt; 
476  <x:ref>uri-host</x:ref>      = &lt;uri-host, defined in &uri;&gt;
477</artwork></figure>
478</section>
479
480</section>
481
482</section>
483
484
485<section title="Overview" anchor="caching.overview">
486<section title="Cache Correctness" anchor="cache.correctness">
487<t>
488   A correct cache &MUST; respond to a request with the most up-to-date
489   response held by the cache that is appropriate to the request (see
490   Sections <xref target="disambiguating.expiration.values" format="counter"/>,
491   <xref target="disambiguating.multiple.responses" format="counter"/>,
492   and <xref target="cache.replacement" format="counter"/>) which meets one of the following
493   conditions:
494  <list style="numbers">
495      <t>It has been checked for equivalence with what the origin server
496         would have returned by revalidating the response with the
497         origin server (<xref target="validation.model"/>);</t>
498
499      <t>It is "fresh enough" (see <xref target="expiration.model"/>). In the default case,
500         this means it meets the least restrictive freshness requirement
501         of the client, origin server, and cache (see <xref target="header.cache-control"/>); if
502         the origin server so specifies, it is the freshness requirement
503         of the origin server alone.
504
505         If a stored response is not "fresh enough" by the most
506         restrictive freshness requirement of both the client and the
507         origin server, in carefully considered circumstances the cache
508         &MAY; still return the response with the appropriate Warning
509         header (see Sections <xref target="exceptions.to.the.rules.and.warnings" format="counter"/>
510         and <xref target="header.warning" format="counter"/>), unless such a response
511         is prohibited (e.g., by a "no-store" cache-directive, or by a
512         "no-cache" cache-request-directive; see <xref target="header.cache-control"/>).</t>
513
514      <t>It is an appropriate 304 (Not Modified), 305 (Use Proxy),
515         or error (4xx or 5xx) response message.</t>
516  </list>
517</t>
518<t>
519   If the cache can not communicate with the origin server, then a
520   correct cache &SHOULD; respond as above if the response can be
521   correctly served from the cache; if not it &MUST; return an error or
522   warning indicating that there was a communication failure.
523</t>
524<t>
525   If a cache receives a response (either an entire response, or a 304
526   (Not Modified) response) that it would normally forward to the
527   requesting client, and the received response is no longer fresh, the
528   cache &SHOULD; forward it to the requesting client without adding a new
529   Warning (but without removing any existing Warning headers). A cache
530   &SHOULD-NOT;  attempt to revalidate a response simply because that
531   response became stale in transit; this might lead to an infinite
532   loop. A user agent that receives a stale response without a Warning
533   &MAY; display a warning indication to the user.
534</t>
535</section>
536
537<section title="Warnings" anchor="warnings">
538<t>
539   Whenever a cache returns a response that is neither first-hand nor
540   "fresh enough" (in the sense of condition 2 in <xref target="cache.correctness"/>), it
541   &MUST; attach a warning to that effect, using a Warning general-header.
542   The Warning header and the currently defined warnings are described
543   in <xref target="header.warning"/>. The warning allows clients to take appropriate
544   action.
545</t>
546<t>
547   Warnings &MAY; be used for other purposes, both cache-related and
548   otherwise. The use of a warning, rather than an error status code,
549   distinguish these responses from true failures.
550</t>
551<t>
552   Warnings are assigned three digit warn-codes. The first digit
553   indicates whether the Warning &MUST; or &MUST-NOT; be deleted from a
554   stored cache entry after a successful revalidation:
555</t>
556<t>
557  <list style="hanging">
558    <t hangText="1xx">Warnings that describe the freshness or revalidation status of
559     the response, and so &MUST; be deleted after a successful
560     revalidation. 1xx warn-codes &MAY; be generated by a cache only when
561     validating a cached entry. It &MUST-NOT; be generated by clients.</t>
562
563    <t hangText="2xx">Warnings that describe some aspect of the entity body or entity
564     headers that is not rectified by a revalidation (for example, a
565     lossy compression of the entity bodies) and which &MUST-NOT; be
566     deleted after a successful revalidation.</t>
567    </list>
568</t>
569<t>
570   See <xref target="header.warning"/> for the definitions of the codes themselves.
571</t>
572<t>
573   HTTP/1.0 caches will cache all Warnings in responses, without
574   deleting the ones in the first category. Warnings in responses that
575   are passed to HTTP/1.0 caches carry an extra warning-date field,
576   which prevents a future HTTP/1.1 recipient from believing an
577   erroneously cached Warning.
578</t>
579<t>
580   Warnings also carry a warning text. The text &MAY; be in any
581   appropriate natural language (perhaps based on the client's Accept
582   headers), and include an &OPTIONAL; indication of what character set is
583   used.
584</t>
585<t>
586   Multiple warnings &MAY; be attached to a response (either by the origin
587   server or by a cache), including multiple warnings with the same code
588   number. For example, a server might provide the same warning with
589   texts in both English and Basque.
590</t>
591<t>
592   When multiple warnings are attached to a response, it might not be
593   practical or reasonable to display all of them to the user. This
594   version of HTTP does not specify strict priority rules for deciding
595   which warnings to display and in what order, but does suggest some
596   heuristics.
597</t>
598</section>
599
600<section title="Cache-control Mechanisms" anchor="cache-control.mechanisms">
601<t>
602   The basic cache mechanisms in HTTP/1.1 (server-specified expiration
603   times and validators) are implicit directives to caches. In some
604   cases, a server or client might need to provide explicit directives
605   to the HTTP caches. We use the Cache-Control header for this purpose.
606</t>
607<t>
608   The Cache-Control header allows a client or server to transmit a
609   variety of directives in either requests or responses. These
610   directives typically override the default caching algorithms. As a
611   general rule, if there is any apparent conflict between header
612   values, the most restrictive interpretation is applied (that is, the
613   one that is most likely to preserve semantic transparency). However,
614   in some cases, cache-control directives are explicitly specified as
615   weakening the approximation of semantic transparency (for example,
616   "max-stale" or "public").
617</t>
618<t>
619   The cache-control directives are described in detail in <xref target="header.cache-control"/>.
620</t>
621</section>
622
623<section title="Explicit User Agent Warnings" anchor="explicit.ua.warnings">
624<t>
625   Many user agents make it possible for users to override the basic
626   caching mechanisms. For example, the user agent might allow the user
627   to specify that cached entities (even explicitly stale ones) are
628   never validated. Or the user agent might habitually add "Cache-Control:
629   max-stale=3600" to every request. The user agent &SHOULD-NOT; 
630   default to either non-transparent behavior, or behavior that results
631   in abnormally ineffective caching, but &MAY; be explicitly configured
632   to do so by an explicit action of the user.
633</t>
634<t>
635   If the user has overridden the basic caching mechanisms, the user
636   agent &SHOULD; explicitly indicate to the user whenever this results in
637   the display of information that might not meet the server's
638   transparency requirements (in particular, if the displayed entity is
639   known to be stale). Since the protocol normally allows the user agent
640   to determine if responses are stale or not, this indication need only
641   be displayed when this actually happens. The indication need not be a
642   dialog box; it could be an icon (for example, a picture of a rotting
643   fish) or some other indicator.
644</t>
645<t>
646   If the user has overridden the caching mechanisms in a way that would
647   abnormally reduce the effectiveness of caches, the user agent &SHOULD;
648   continually indicate this state to the user (for example, by a
649   display of a picture of currency in flames) so that the user does not
650   inadvertently consume excess resources or suffer from excessive
651   latency.
652</t>
653</section>
654
655<section title="Exceptions to the Rules and Warnings" anchor="exceptions.to.the.rules.and.warnings">
656<t>
657   In some cases, the operator of a cache &MAY; choose to configure it to
658   return stale responses even when not requested by clients. This
659   decision ought not be made lightly, but may be necessary for reasons
660   of availability or performance, especially when the cache is poorly
661   connected to the origin server. Whenever a cache returns a stale
662   response, it &MUST; mark it as such (using a Warning header) enabling
663   the client software to alert the user that there might be a potential
664   problem.
665</t>
666<t>
667   It also allows the user agent to take steps to obtain a first-hand or
668   fresh response. For this reason, a cache &SHOULD-NOT;  return a stale
669   response if the client explicitly requests a first-hand or fresh one,
670   unless it is impossible to comply for technical or policy reasons.
671</t>
672</section>
673
674<section title="Client-controlled Behavior" anchor="client-controlled.behavior">
675<t>
676   While the origin server (and to a lesser extent, intermediate caches,
677   by their contribution to the age of a response) are the primary
678   source of expiration information, in some cases the client might need
679   to control a cache's decision about whether to return a cached
680   response without validating it. Clients do this using several
681   directives of the Cache-Control header.
682</t>
683<t>
684   A client's request &MAY; specify the maximum age it is willing to
685   accept of an unvalidated response; specifying a value of zero forces
686   the cache(s) to revalidate all responses. A client &MAY; also specify
687   the minimum time remaining before a response expires. Both of these
688   options increase constraints on the behavior of caches, and so cannot
689   further relax the cache's approximation of semantic transparency.
690</t>
691<t>
692   A client &MAY; also specify that it will accept stale responses, up to
693   some maximum amount of staleness. This loosens the constraints on the
694   caches, and so might violate the origin server's specified
695   constraints on semantic transparency, but might be necessary to
696   support disconnected operation, or high availability in the face of
697   poor connectivity.
698</t>
699</section>
700</section>
701
702<section title="Expiration Model" anchor="expiration.model">
703
704<section title="Server-Specified Expiration" anchor="server-specified.expiration">
705<t>
706   HTTP caching works best when caches can entirely avoid making
707   requests to the origin server. The primary mechanism for avoiding
708   requests is for an origin server to provide an explicit expiration
709   time in the future, indicating that a response &MAY; be used to satisfy
710   subsequent requests. In other words, a cache can return a fresh
711   response without first contacting the server.
712</t>
713<t>
714   Our expectation is that servers will assign future explicit
715   expiration times to responses in the belief that the entity is not
716   likely to change, in a semantically significant way, before the
717   expiration time is reached. This normally preserves semantic
718   transparency, as long as the server's expiration times are carefully
719   chosen.
720</t>
721<t>
722   The expiration mechanism applies only to responses taken from a cache
723   and not to first-hand responses forwarded immediately to the
724   requesting client.
725</t>
726<t>
727   If an origin server wishes to force a semantically transparent cache
728   to validate every request, it &MAY; assign an explicit expiration time
729   in the past. This means that the response is always stale, and so the
730   cache &SHOULD; validate it before using it for subsequent requests. See
731   <xref target="cache.revalidation.and.reload.controls"/> for a more restrictive way to force revalidation.
732</t>
733<t>
734   If an origin server wishes to force any HTTP/1.1 cache, no matter how
735   it is configured, to validate every request, it &SHOULD; use the "must-revalidate"
736   cache-control directive (see <xref target="header.cache-control"/>).
737</t>
738<t>
739   Servers specify explicit expiration times using either the Expires
740   header, or the max-age directive of the Cache-Control header.
741</t>
742<t>
743   An expiration time cannot be used to force a user agent to refresh
744   its display or reload a resource; its semantics apply only to caching
745   mechanisms, and such mechanisms need only check a resource's
746   expiration status when a new request for that resource is initiated.
747   See <xref target="history.lists"/> for an explanation of the difference between caches
748   and history mechanisms.
749</t>
750</section>
751
752<section title="Heuristic Expiration" anchor="heuristic.expiration">
753<t>
754   Since origin servers do not always provide explicit expiration times,
755   HTTP caches typically assign heuristic expiration times, employing
756   algorithms that use other header values (such as the Last-Modified
757   time) to estimate a plausible expiration time. The HTTP/1.1
758   specification does not provide specific algorithms, but does impose
759   worst-case constraints on their results. Since heuristic expiration
760   times might compromise semantic transparency, they ought to be used
761   cautiously, and we encourage origin servers to provide explicit
762   expiration times as much as possible.
763</t>
764</section>
765
766<section title="Age Calculations" anchor="age.calculations">
767<t>
768   In order to know if a cached entry is fresh, a cache needs to know if
769   its age exceeds its freshness lifetime. We discuss how to calculate
770   the latter in <xref target="expiration.calculations"/>; this section describes how to calculate
771   the age of a response or cache entry.
772</t>
773<t>
774   In this discussion, we use the term "now" to mean "the current value
775   of the clock at the host performing the calculation." Hosts that use
776   HTTP, but especially hosts running origin servers and caches, &SHOULD;
777   use NTP <xref target="RFC1305"/> or some similar protocol to synchronize their clocks to
778   a globally accurate time standard.
779</t>
780<t>
781   HTTP/1.1 requires origin servers to send a Date header, if possible,
782   with every response, giving the time at which the response was
783   generated (see &header-date;). We use the term "date_value" to denote
784   the value of the Date header, in a form appropriate for arithmetic
785   operations.
786</t>
787<t>
788   HTTP/1.1 uses the Age response-header to convey the estimated age of
789   the response message when obtained from a cache. The Age field value
790   is the cache's estimate of the amount of time since the response was
791   generated or revalidated by the origin server.
792</t>
793<t>
794   In essence, the Age value is the sum of the time that the response
795   has been resident in each of the caches along the path from the
796   origin server, plus the amount of time it has been in transit along
797   network paths.
798</t>
799<t>
800   We use the term "age_value" to denote the value of the Age header, in
801   a form appropriate for arithmetic operations.
802</t>
803<t>
804   A response's age can be calculated in two entirely independent ways:
805  <list style="numbers">
806      <t>now minus date_value, if the local clock is reasonably well
807         synchronized to the origin server's clock. If the result is
808         negative, the result is replaced by zero.</t>
809
810      <t>age_value, if all of the caches along the response path
811         implement HTTP/1.1.</t>
812  </list>
813</t>
814<t>
815   Given that we have two independent ways to compute the age of a
816   response when it is received, we can combine these as
817</t>
818<figure><artwork type="code">
819    corrected_received_age = max(now - date_value, age_value)
820</artwork></figure>
821<t>
822   and as long as we have either nearly synchronized clocks or all-HTTP/1.1
823   paths, one gets a reliable (conservative) result.
824</t>
825<t>
826   Because of network-imposed delays, some significant interval might
827   pass between the time that a server generates a response and the time
828   it is received at the next outbound cache or client. If uncorrected,
829   this delay could result in improperly low ages.
830</t>
831<t>
832   Because the request that resulted in the returned Age value must have
833   been initiated prior to that Age value's generation, we can correct
834   for delays imposed by the network by recording the time at which the
835   request was initiated. Then, when an Age value is received, it &MUST;
836   be interpreted relative to the time the request was initiated, not
837   the time that the response was received. This algorithm results in
838   conservative behavior no matter how much delay is experienced. So, we
839   compute:
840</t>
841<figure><artwork type="code">
842   corrected_initial_age = corrected_received_age
843                         + (now - request_time)
844</artwork></figure>
845<t>
846   where "request_time" is the time (according to the local clock) when
847   the request that elicited this response was sent.
848</t>
849<t>
850   Summary of age calculation algorithm, when a cache receives a
851   response:
852</t>
853<figure><artwork type="code">
854   /*
855    * age_value
856    *      is the value of Age: header received by the cache with
857    *              this response.
858    * date_value
859    *      is the value of the origin server's Date: header
860    * request_time
861    *      is the (local) time when the cache made the request
862    *              that resulted in this cached response
863    * response_time
864    *      is the (local) time when the cache received the
865    *              response
866    * now
867    *      is the current (local) time
868    */
869
870   apparent_age = max(0, response_time - date_value);
871   corrected_received_age = max(apparent_age, age_value);
872   response_delay = response_time - request_time;
873   corrected_initial_age = corrected_received_age + response_delay;
874   resident_time = now - response_time;
875   current_age   = corrected_initial_age + resident_time;
876</artwork></figure>
877<t>
878   The current_age of a cache entry is calculated by adding the amount
879   of time (in seconds) since the cache entry was last validated by the
880   origin server to the corrected_initial_age. When a response is
881   generated from a cache entry, the cache &MUST; include a single Age
882   header field in the response with a value equal to the cache entry's
883   current_age.
884</t>
885<t>
886   The presence of an Age header field in a response implies that a
887   response is not first-hand. However, the converse is not true, since
888   the lack of an Age header field in a response does not imply that the
889   response is first-hand unless all caches along the request path are
890   compliant with HTTP/1.1 (i.e., older HTTP caches did not implement
891   the Age header field).
892</t>
893</section>
894
895<section title="Expiration Calculations" anchor="expiration.calculations">
896<t>
897   In order to decide whether a response is fresh or stale, we need to
898   compare its freshness lifetime to its age. The age is calculated as
899   described in <xref target="age.calculations"/>; this section describes how to calculate
900   the freshness lifetime, and to determine if a response has expired.
901   In the discussion below, the values can be represented in any form
902   appropriate for arithmetic operations.
903</t>
904<t>
905   We use the term "expires_value" to denote the value of the Expires
906   header. We use the term "max_age_value" to denote an appropriate
907   value of the number of seconds carried by the "max-age" directive of
908   the Cache-Control header in a response (see <xref target="modifications.of.the.basic.expiration.mechanism"/>).
909</t>
910<t>
911   The max-age directive takes priority over Expires, so if max-age is
912   present in a response, the calculation is simply:
913</t>
914<figure><artwork type="code">
915   freshness_lifetime = max_age_value
916</artwork></figure>
917<t>
918   Otherwise, if Expires is present in the response, the calculation is:
919</t>
920<figure><artwork type="code">
921   freshness_lifetime = expires_value - date_value
922</artwork></figure>
923<t>
924   Note that neither of these calculations is vulnerable to clock skew,
925   since all of the information comes from the origin server.
926</t>
927<t>
928   If none of Expires, Cache-Control: max-age, or Cache-Control: s-maxage
929   (see <xref target="modifications.of.the.basic.expiration.mechanism"/>) appears in the response, and the response
930   does not include other restrictions on caching, the cache &MAY; compute
931   a freshness lifetime using a heuristic. The cache &MUST; attach Warning
932   113 to any response whose age is more than 24 hours if such warning
933   has not already been added.
934</t>
935<t>
936   Also, if the response does have a Last-Modified time, the heuristic
937   expiration value &SHOULD; be no more than some fraction of the interval
938   since that time. A typical setting of this fraction might be 10%.
939</t>
940<t>
941   The calculation to determine if a response has expired is quite
942   simple:
943</t>
944<figure><artwork type="code">
945   response_is_fresh = (freshness_lifetime &gt; current_age)
946</artwork></figure>
947</section>
948
949<section title="Disambiguating Expiration Values" anchor="disambiguating.expiration.values">
950<t>
951   Because expiration values are assigned optimistically, it is possible
952   for two caches to contain fresh values for the same resource that are
953   different.
954</t>
955<t>
956   If a client performing a retrieval receives a non-first-hand response
957   for a request that was already fresh in its own cache, and the Date
958   header in its existing cache entry is newer than the Date on the new
959   response, then the client &MAY; ignore the response. If so, it &MAY;
960   retry the request with a "Cache-Control: max-age=0" directive (see
961   <xref target="header.cache-control"/>), to force a check with the origin server.
962</t>
963<t>
964   If a cache has two fresh responses for the same representation with
965   different validators, it &MUST; use the one with the more recent Date
966   header. This situation might arise because the cache is pooling
967   responses from other caches, or because a client has asked for a
968   reload or a revalidation of an apparently fresh cache entry.
969</t>
970</section>
971
972<section title="Disambiguating Multiple Responses" anchor="disambiguating.multiple.responses">
973<t>
974   Because a client might be receiving responses via multiple paths, so
975   that some responses flow through one set of caches and other
976   responses flow through a different set of caches, a client might
977   receive responses in an order different from that in which the origin
978   server sent them. We would like the client to use the most recently
979   generated response, even if older responses are still apparently
980   fresh.
981</t>
982<t>
983   Neither the entity tag nor the expiration value can impose an
984   ordering on responses, since it is possible that a later response
985   intentionally carries an earlier expiration time. The Date values are
986   ordered to a granularity of one second.
987</t>
988<t>
989   When a client tries to revalidate a cache entry, and the response it
990   receives contains a Date header that appears to be older than the one
991   for the existing entry, then the client &SHOULD; repeat the request
992   unconditionally, and include
993</t>
994<figure><artwork type="example">
995    Cache-Control: max-age=0
996</artwork></figure>
997<t>
998   to force any intermediate caches to validate their copies directly
999   with the origin server, or
1000</t>
1001<figure><artwork type="example">
1002    Cache-Control: no-cache
1003</artwork></figure>
1004<t>
1005   to force any intermediate caches to obtain a new copy from the origin
1006   server.
1007</t>
1008<t>
1009   If the Date values are equal, then the client &MAY; use either response
1010   (or &MAY;, if it is being extremely prudent, request a new response).
1011   Servers &MUST-NOT; depend on clients being able to choose
1012   deterministically between responses generated during the same second,
1013   if their expiration times overlap.
1014</t>
1015</section>
1016</section>
1017
1018<section title="Validation Model" anchor="validation.model">
1019<t>
1020   When a cache has a stale entry that it would like to use as a
1021   response to a client's request, it first has to check with the origin
1022   server (or possibly an intermediate cache with a fresh response) to
1023   see if its cached entry is still usable. We call this "validating"
1024   the cache entry.
1025</t>
1026<t>
1027   HTTP's conditional request mechanism, defined in &conditional;, is
1028   used to avoid retransmitting the response payload when the cached entry
1029   is valid.  When a cached response includes one or more "cache validators,"
1030   such as the field values of an ETag or Last-Modified header field, then
1031   a validating GET request &SHOULD; be made conditional to those field values.
1032   The server checks the conditional request's validator against the current
1033   state of the requested resource and, if they match, the server responds
1034   with a 304 (Not Modified) status code to indicate that the cached response
1035   can be refreshed and reused without retransmitting the response payload.
1036   If the validator does not match the current state of the requested
1037   resource, then the server returns a full response, including payload,
1038   so that the request can be satisfied and the cache entry supplanted
1039   without the need for an additional network round-trip.
1040</t>
1041</section>
1042
1043<section title="Response Cacheability" anchor="response.cacheability">
1044<t>
1045   Unless specifically constrained by a cache-control (<xref target="header.cache-control"/>)
1046   directive, a caching system &MAY; always store a successful response
1047   (see <xref target="errors.or.incomplete.response.cache.behavior"/>) as a cache entry, &MAY; return it without validation
1048   if it is fresh, and &MAY; return it after successful validation. If
1049   there is neither a cache validator nor an explicit expiration time
1050   associated with a response, we do not expect it to be cached, but
1051   certain caches &MAY; violate this expectation (for example, when little
1052   or no network connectivity is available). A client can usually detect
1053   that such a response was taken from a cache by comparing the Date
1054   header to the current time.
1055  <list><t>
1056      <x:h>Note:</x:h> some HTTP/1.0 caches are known to violate this expectation
1057      without providing any Warning.
1058  </t></list>
1059</t>
1060<t>
1061   However, in some cases it might be inappropriate for a cache to
1062   retain an entity, or to return it in response to a subsequent
1063   request. This might be because absolute semantic transparency is
1064   deemed necessary by the service author, or because of security or
1065   privacy considerations. Certain cache-control directives are
1066   therefore provided so that the server can indicate that certain
1067   resource entities, or portions thereof, are not to be cached
1068   regardless of other considerations.
1069</t>
1070<t>
1071   Note that &header-authorization; normally prevents a shared cache from saving
1072   and returning a response to a previous request if that request
1073   included an Authorization header.
1074</t>
1075<t>
1076   A response received with a status code of 200, 203, 206, 300, 301 or
1077   410 &MAY; be stored by a cache and used in reply to a subsequent
1078   request, subject to the expiration mechanism, unless a cache-control
1079   directive prohibits caching. However, a cache that does not support
1080   the Range and Content-Range headers &MUST-NOT; cache 206 (Partial
1081   Content) responses.
1082</t>
1083<t>
1084   A response received with any other status code (e.g. status codes 302
1085   and 307) &MUST-NOT; be returned in a reply to a subsequent request
1086   unless there are cache-control directives or another header(s) that
1087   explicitly allow it. For example, these include the following: an
1088   Expires header (<xref target="header.expires"/>); a "max-age", "s-maxage",  "must-revalidate",
1089   "proxy-revalidate", "public" or "private" cache-control
1090   directive (<xref target="header.cache-control"/>).
1091</t>
1092</section>
1093
1094<section title="Constructing Responses From Caches" anchor="constructing.responses.from.caches">
1095<t>
1096   The purpose of an HTTP cache is to store information received in
1097   response to requests for use in responding to future requests. In
1098   many cases, a cache simply returns the appropriate parts of a
1099   response to the requester. However, if the cache holds a cache entry
1100   based on a previous response, it might have to combine parts of a new
1101   response with what is held in the cache entry.
1102</t>
1103
1104<section title="End-to-end and Hop-by-hop Headers" anchor="end-to-end.and.hop-by-hop.headers">
1105<t>
1106   For the purpose of defining the behavior of caches and non-caching
1107   proxies, we divide HTTP headers into two categories:
1108  <list style="symbols">
1109      <t>End-to-end headers, which are  transmitted to the ultimate
1110        recipient of a request or response. End-to-end headers in
1111        responses &MUST; be stored as part of a cache entry and &MUST; be
1112        transmitted in any response formed from a cache entry.</t>
1113
1114      <t>Hop-by-hop headers, which are meaningful only for a single
1115        transport-level connection, and are not stored by caches or
1116        forwarded by proxies.</t>
1117  </list>
1118</t>
1119<t>
1120   The following HTTP/1.1 headers are hop-by-hop headers:
1121  <list style="symbols">
1122      <t>Connection</t>
1123      <t>Keep-Alive</t>
1124      <t>Proxy-Authenticate</t>
1125      <t>Proxy-Authorization</t>
1126      <t>TE</t>
1127      <t>Trailer</t>
1128      <t>Transfer-Encoding</t>
1129      <t>Upgrade</t>
1130  </list>
1131</t>
1132<t>
1133   All other headers defined by HTTP/1.1 are end-to-end headers.
1134</t>
1135<t>
1136   Other hop-by-hop headers &MUST; be listed in a Connection header
1137   (&header-connection;).
1138</t>
1139</section>
1140
1141<section title="Non-modifiable Headers" anchor="non-modifiable.headers">
1142<t>
1143   Some features of HTTP/1.1, such as Digest
1144   Authentication, depend on the value of certain end-to-end headers. A
1145   transparent proxy &SHOULD-NOT;  modify an end-to-end header unless the
1146   definition of that header requires or specifically allows that.
1147</t>
1148<t>
1149   A transparent proxy &MUST-NOT; modify any of the following fields in a
1150   request or response, and it &MUST-NOT; add any of these fields if not
1151   already present:
1152  <list style="symbols">
1153      <t>Content-Location</t>
1154      <t>Content-MD5</t>
1155      <t>ETag</t>
1156      <t>Last-Modified</t>
1157  </list>
1158</t>
1159<t>
1160   A transparent proxy &MUST-NOT; modify any of the following fields in a
1161   response:
1162  <list style="symbols">
1163    <t>Expires</t>
1164  </list>
1165</t>
1166<t>
1167   but it &MAY; add any of these fields if not already present. If an
1168   Expires header is added, it &MUST; be given a field-value identical to
1169   that of the Date header in that response.
1170</t>
1171<t>
1172   A  proxy &MUST-NOT; modify or add any of the following fields in a
1173   message that contains the no-transform cache-control directive, or in
1174   any request:
1175  <list style="symbols">
1176    <t>Content-Encoding</t>
1177    <t>Content-Range</t>
1178    <t>Content-Type</t>
1179  </list>
1180</t>
1181<t>
1182   A non-transparent proxy &MAY; modify or add these fields to a message
1183   that does not include no-transform, but if it does so, it &MUST; add a
1184   Warning 214 (Transformation applied) if one does not already appear
1185   in the message (see <xref target="header.warning"/>).
1186  <list><t>
1187      Warning: unnecessary modification of end-to-end headers might
1188      cause authentication failures if stronger authentication
1189      mechanisms are introduced in later versions of HTTP. Such
1190      authentication mechanisms &MAY; rely on the values of header fields
1191      not listed here.
1192    </t></list>
1193</t>
1194<t>
1195   The Content-Length field of a request or response is added or deleted
1196   according to the rules in &message-length;. A transparent proxy &MUST;
1197   preserve the entity-length (&entity-length;) of the entity-body,
1198   although it &MAY; change the transfer-length (&message-length;).
1199</t>
1200</section>
1201
1202<section title="Combining Headers" anchor="combining.headers">
1203<t>
1204   When a cache makes a validating request to a server, and the server
1205   provides a 304 (Not Modified) response or a 206 (Partial Content)
1206   response, the cache then constructs a response to send to the
1207   requesting client.
1208</t>
1209<t>
1210   If the status code is 304 (Not Modified), the cache uses the entity-body
1211   stored in the cache entry as the entity-body of this outgoing
1212   response. If the status code is 206 (Partial Content) and the ETag or
1213   Last-Modified headers match exactly, the cache &MAY; combine the
1214   contents stored in the cache entry with the new contents received in
1215   the response and use the result as the entity-body of this outgoing
1216   response, (see &combining-byte-ranges;).
1217</t>
1218<t>
1219   The end-to-end headers stored in the cache entry are used for the
1220   constructed response, except that
1221  <list style="symbols">
1222    <t>any stored Warning headers with warn-code 1xx (see <xref target="header.warning"/>)
1223      &MUST; be deleted from the cache entry and the forwarded response.</t>
1224    <t>any stored Warning headers with warn-code 2xx &MUST; be retained
1225        in the cache entry and the forwarded response.</t>
1226    <t>any end-to-end headers provided in the 304 or 206 response &MUST;
1227        replace the corresponding headers from the cache entry.</t>
1228  </list>
1229</t>
1230<t>
1231   Unless the cache decides to remove the cache entry, it &MUST; also
1232   replace the end-to-end headers stored with the cache entry with
1233   corresponding headers received in the incoming response, except for
1234   Warning headers as described immediately above. If a header field-name
1235   in the incoming response matches more than one header in the
1236   cache entry, all such old headers &MUST; be replaced.
1237</t>
1238<t>
1239   In other words, the set of end-to-end headers received in the
1240   incoming response overrides all corresponding end-to-end headers
1241   stored with the cache entry (except for stored Warning headers with
1242   warn-code 1xx, which are deleted even if not overridden).
1243  <list><t>
1244      <x:h>Note:</x:h> this rule allows an origin server to use a 304 (Not
1245      Modified) or a 206 (Partial Content) response to update any header
1246      associated with a previous response for the same entity or sub-ranges
1247      thereof, although it might not always be meaningful or
1248      correct to do so. This rule does not allow an origin server to use
1249      a 304 (Not Modified) or a 206 (Partial Content) response to
1250      entirely delete a header that it had provided with a previous
1251      response.
1252  </t></list>
1253</t>
1254</section>
1255
1256</section>
1257
1258<section title="Caching Negotiated Responses" anchor="caching.negotiated.responses">
1259<t>
1260   Use of server-driven content negotiation (&server-driven-negotiation;), as indicated
1261   by the presence of a Vary header field in a response, alters the
1262   conditions and procedure by which a cache can use the response for
1263   subsequent requests. See <xref target="header.vary"/> for use of the Vary header
1264   field by servers.
1265</t>
1266<t>
1267   A server &SHOULD; use the Vary header field to inform a cache of what
1268   request-header fields were used to select among multiple
1269   representations of a cacheable response subject to server-driven
1270   negotiation. The set of header fields named by the Vary field value
1271   is known as the "selecting" request-headers.
1272</t>
1273<t>
1274   When the cache receives a subsequent request whose request-target
1275   specifies one or more cache entries including a Vary header field,
1276   the cache &MUST-NOT; use such a cache entry to construct a response to
1277   the new request unless all of the selecting request-headers present
1278   in the new request match the corresponding stored request-headers in
1279   the original request.
1280</t>
1281<t>
1282   The selecting request-headers from two requests are defined to match
1283   if and only if the selecting request-headers in the first request can
1284   be transformed to the selecting request-headers in the second request
1285   by adding or removing linear whitespace (LWS) at places where this
1286   is allowed by the corresponding BNF, and/or combining multiple
1287   message-header fields with the same field name following the rules
1288   about message headers in &message-headers;.
1289</t>
1290<t>
1291   A Vary header field-value of "*" always fails to match and subsequent
1292   requests on that resource can only be properly interpreted by the
1293   origin server.
1294</t>
1295<t>
1296   If the selecting request header fields for the cached entry do not
1297   match the selecting request header fields of the new request, then
1298   the cache &MUST-NOT; use a cached entry to satisfy the request unless
1299   it first relays the new request to the origin server in a conditional
1300   request and the server responds with 304 (Not Modified), including an
1301   entity tag or Content-Location that indicates the entity to be used.
1302</t>
1303<t>
1304   If an entity tag was assigned to a cached representation, the
1305   forwarded request &SHOULD; be conditional and include the entity tags
1306   in an If-None-Match header field from all its cache entries for the
1307   resource. This conveys to the server the set of entities currently
1308   held by the cache, so that if any one of these entities matches the
1309   requested entity, the server can use the ETag header field in its 304
1310   (Not Modified) response to tell the cache which entry is appropriate.
1311   If the entity-tag of the new response matches that of an existing
1312   entry, the new response &SHOULD; be used to update the header fields of
1313   the existing entry, and the result &MUST; be returned to the client.
1314</t>
1315<t>
1316   If any of the existing cache entries contains only partial content
1317   for the associated entity, its entity-tag &SHOULD-NOT;  be included in
1318   the If-None-Match header field unless the request is for a range that
1319   would be fully satisfied by that entry.
1320</t>
1321<t>
1322   If a cache receives a successful response whose Content-Location
1323   field matches that of an existing cache entry for the same request-target,
1324   whose entity-tag differs from that of the existing entry, and
1325   whose Date is more recent than that of the existing entry, the
1326   existing entry &SHOULD-NOT;  be returned in response to future requests
1327   and &SHOULD; be deleted from the cache.
1328</t>
1329</section>
1330
1331<section title="Shared and Non-Shared Caches" anchor="shared.and.non-shared.caches">
1332<t>
1333   For reasons of security and privacy, it is necessary to make a
1334   distinction between "shared" and "non-shared" caches. A non-shared
1335   cache is one that is accessible only to a single user. Accessibility
1336   in this case &SHOULD; be enforced by appropriate security mechanisms.
1337   All other caches are considered to be "shared." Other sections of
1338   this specification place certain constraints on the operation of
1339   shared caches in order to prevent loss of privacy or failure of
1340   access controls.
1341</t>
1342</section>
1343
1344<section title="Errors or Incomplete Response Cache Behavior" anchor="errors.or.incomplete.response.cache.behavior">
1345<t>
1346   A cache that receives an incomplete response (for example, with fewer
1347   bytes of data than specified in a Content-Length header) &MAY; store
1348   the response. However, the cache &MUST; treat this as a partial
1349   response. Partial responses &MAY; be combined as described in &combining-byte-ranges;;
1350   the result might be a full response or might still be
1351   partial. A cache &MUST-NOT; return a partial response to a client
1352   without explicitly marking it as such, using the 206 (Partial
1353   Content) status code. A cache &MUST-NOT; return a partial response
1354   using a status code of 200 (OK).
1355</t>
1356<t>
1357   If a cache receives a 5xx response while attempting to revalidate an
1358   entry, it &MAY; either forward this response to the requesting client,
1359   or act as if the server failed to respond. In the latter case, it &MAY;
1360   return a previously received response unless the cached entry
1361   includes the "must-revalidate" cache-control directive (see <xref target="header.cache-control"/>).
1362</t>
1363</section>
1364
1365<section title="Side Effects of GET and HEAD" anchor="side.effects.of.get.and.head">
1366<t>
1367   Unless the origin server explicitly prohibits the caching of their
1368   responses, the application of GET and HEAD methods to any resources
1369   &SHOULD-NOT;  have side effects that would lead to erroneous behavior if
1370   these responses are taken from a cache. They &MAY; still have side
1371   effects, but a cache is not required to consider such side effects in
1372   its caching decisions. Caches are always expected to observe an
1373   origin server's explicit restrictions on caching.
1374</t>
1375<t>
1376   We note one exception to this rule: since some applications have
1377   traditionally used GET and HEAD requests with URLs containing a query part
1378   to perform operations with significant side
1379   effects, caches &MUST-NOT; treat responses to such URIs as fresh unless
1380   the server provides an explicit expiration time. This specifically
1381   means that responses from HTTP/1.0 servers for such URIs &SHOULD-NOT; 
1382   be taken from a cache. See &safe-methods; for related information.
1383</t>
1384</section>
1385
1386<section title="Invalidation After Updates or Deletions" anchor="invalidation.after.updates.or.deletions">
1387<t>
1388   The effect of certain methods performed on a resource at the origin
1389   server might cause one or more existing cache entries to become non-transparently
1390   invalid. That is, although they might continue to be
1391   "fresh," they do not accurately reflect what the origin server would
1392   return for a new request on that resource.
1393</t>
1394<t>
1395   There is no way for HTTP to guarantee that all such
1396   cache entries are marked invalid. For example, the request that
1397   caused the change at the origin server might not have gone through
1398   the proxy where a cache entry is stored. However, several rules help
1399   reduce the likelihood of erroneous behavior.
1400</t>
1401<t>
1402   In this section, the phrase "invalidate an entity" means that the
1403   cache will either remove all instances of that entity from its
1404   storage, or will mark these as "invalid" and in need of a mandatory
1405   revalidation before they can be returned in response to a subsequent
1406   request.
1407</t>
1408<t>
1409   Some HTTP methods &MUST; cause a cache to invalidate an entity. This is
1410   either the entity referred to by the request-target, or by the Location
1411   or Content-Location headers (if present). These methods are:
1412  <list style="symbols">
1413      <t>PUT</t>
1414      <t>DELETE</t>
1415      <t>POST</t>
1416  </list>
1417</t> 
1418<t>
1419   An invalidation based
1420   on the URI in a Location or Content-Location header &MUST-NOT; be
1421   performed if the host part of that URI differs from the host part
1422   in the request-target. This helps prevent denial of service attacks.
1423</t>
1424<t>
1425   A cache that passes through requests for methods it does not
1426   understand &SHOULD; invalidate any entities referred to by the
1427   request-target.
1428</t>
1429</section>
1430
1431<section title="Write-Through Mandatory" anchor="write-through.mandatory">
1432<t>
1433   All methods that might be expected to cause modifications to the
1434   origin server's resources &MUST; be written through to the origin
1435   server. This currently includes all methods except for GET and HEAD.
1436   A cache &MUST-NOT; reply to such a request from a client before having
1437   transmitted the request to the inbound server, and having received a
1438   corresponding response from the inbound server. This does not prevent
1439   a proxy cache from sending a 100 (Continue) response before the
1440   inbound server has sent its final reply.
1441</t>
1442<t>
1443   The alternative (known as "write-back" or "copy-back" caching) is not
1444   allowed in HTTP/1.1, due to the difficulty of providing consistent
1445   updates and the problems arising from server, cache, or network
1446   failure prior to write-back.
1447</t>
1448</section>
1449
1450<section title="Cache Replacement" anchor="cache.replacement">
1451<t>
1452   If a new cacheable (see Sections <xref target="what.may.be.stored.by.caches" format="counter"/>,
1453   <xref target="disambiguating.expiration.values" format="counter"/>,
1454   <xref target="disambiguating.multiple.responses" format="counter"/>
1455   and <xref target="errors.or.incomplete.response.cache.behavior" format="counter"/>)
1456   response is received from a resource while any existing responses for
1457   the same resource are cached, the cache &SHOULD; use the new response
1458   to reply to the current request. It &MAY; insert it into cache storage
1459   and &MAY;, if it meets all other requirements, use it to respond to any
1460   future requests that would previously have caused the old response to
1461   be returned. If it inserts the new response into cache storage  the
1462   rules in <xref target="combining.headers"/> apply.
1463  <list><t>
1464      <x:h>Note:</x:h> a new response that has an older Date header value than
1465      existing cached responses is not cacheable.
1466  </t></list>
1467</t>
1468</section>
1469
1470<section title="History Lists" anchor="history.lists">
1471<t>
1472   User agents often have history mechanisms, such as "Back" buttons and
1473   history lists, which can be used to redisplay an entity retrieved
1474   earlier in a session.
1475</t>
1476<t>
1477   History mechanisms and caches are different. In particular history
1478   mechanisms &SHOULD-NOT;  try to show a semantically transparent view of
1479   the current state of a resource. Rather, a history mechanism is meant
1480   to show exactly what the user saw at the time when the resource was
1481   retrieved.
1482</t>
1483<t>
1484   By default, an expiration time does not apply to history mechanisms.
1485   If the entity is still in storage, a history mechanism &SHOULD; display
1486   it even if the entity has expired, unless the user has specifically
1487   configured the agent to refresh expired history documents.
1488</t>
1489<t>
1490   This is not to be construed to prohibit the history mechanism from
1491   telling the user that a view might be stale.
1492  <list><t>
1493      <x:h>Note:</x:h> if history list mechanisms unnecessarily prevent users from
1494      viewing stale resources, this will tend to force service authors
1495      to avoid using HTTP expiration controls and cache controls when
1496      they would otherwise like to. Service authors may consider it
1497      important that users not be presented with error messages or
1498      warning messages when they use navigation controls (such as BACK)
1499      to view previously fetched resources. Even though sometimes such
1500      resources ought not be cached, or ought to expire quickly, user
1501      interface considerations may force service authors to resort to
1502      other means of preventing caching (e.g. "once-only" URLs) in order
1503      not to suffer the effects of improperly functioning history
1504      mechanisms.
1505  </t></list>
1506</t>
1507</section>
1508
1509<section title="Header Field Definitions" anchor="header.fields">
1510<t>
1511   This section defines the syntax and semantics of HTTP/1.1 header fields
1512   related to caching.
1513</t>
1514<t>
1515   For entity-header fields, both sender and recipient refer to either the
1516   client or the server, depending on who sends and who receives the entity.
1517</t>
1518
1519<section title="Age" anchor="header.age">
1520  <iref primary="true" item="Age header" x:for-anchor=""/>
1521  <iref primary="true" item="Headers" subitem="Age" x:for-anchor=""/>
1522  <x:anchor-alias value="Age"/>
1523  <x:anchor-alias value="Age-v"/>
1524  <x:anchor-alias value="age-value"/>
1525<t>
1526      The response-header field "Age" conveys the sender's estimate of the
1527      amount of time since the response (or its revalidation) was
1528      generated at the origin server. A cached response is "fresh" if
1529      its age does not exceed its freshness lifetime. Age values are
1530      calculated as specified in <xref target="age.calculations"/>.
1531</t>
1532<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Age"/><iref primary="true" item="Grammar" subitem="Age-v"/>
1533  <x:ref>Age</x:ref>   = "Age" ":" <x:ref>OWS</x:ref> <x:ref>Age-v</x:ref>
1534  <x:ref>Age-v</x:ref> = <x:ref>delta-seconds</x:ref>
1535</artwork></figure>
1536<t anchor="rule.delta-seconds">
1537  <x:anchor-alias value="delta-seconds"/>
1538      Age values are non-negative decimal integers, representing time in
1539      seconds.
1540</t>
1541<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="delta-seconds"/>
1542  <x:ref>delta-seconds</x:ref>  = 1*<x:ref>DIGIT</x:ref>
1543</artwork></figure>
1544<t>
1545      If a cache receives a value larger than the largest positive
1546      integer it can represent, or if any of its age calculations
1547      overflows, it &MUST; transmit an Age header with a value of
1548      2147483648 (2<x:sup>31</x:sup>). An HTTP/1.1 server that includes a cache &MUST;
1549      include an Age header field in every response generated from its
1550      own cache. Caches &SHOULD; use an arithmetic type of at least 31
1551      bits of range.
1552</t>
1553</section>
1554
1555<section title="Cache-Control" anchor="header.cache-control">
1556  <iref primary="true" item="Cache-Control header" x:for-anchor=""/>
1557  <iref primary="true" item="Headers" subitem="Cache-Control" x:for-anchor=""/>
1558  <x:anchor-alias value="Cache-Control"/>
1559  <x:anchor-alias value="Cache-Control-v"/>
1560  <x:anchor-alias value="cache-directive"/>
1561  <x:anchor-alias value="cache-extension"/>
1562  <x:anchor-alias value="cache-request-directive"/>
1563  <x:anchor-alias value="cache-response-directive"/>
1564<t>
1565   The general-header field "Cache-Control" is used to specify directives
1566   that &MUST; be obeyed by all caching mechanisms along the
1567   request/response chain. The directives specify behavior intended to
1568   prevent caches from adversely interfering with the request or
1569   response. These directives typically override the default caching
1570   algorithms. Cache directives are unidirectional in that the presence
1571   of a directive in a request does not imply that the same directive is
1572   to be given in the response.
1573  <list><t>
1574      Note that HTTP/1.0 caches might not implement Cache-Control and
1575      might only implement Pragma: no-cache (see <xref target="header.pragma"/>).
1576  </t></list>
1577</t>
1578<t>
1579   Cache directives &MUST; be passed through by a proxy or gateway
1580   application, regardless of their significance to that application,
1581   since the directives might be applicable to all recipients along the
1582   request/response chain. It is not possible to specify a cache-directive
1583   for a specific cache.
1584</t>
1585<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-directive"/><iref primary="true" item="Grammar" subitem="cache-request-directive"/><iref primary="true" item="Grammar" subitem="cache-response-directive"/><iref primary="true" item="Grammar" subitem="cache-extension"/>
1586  <x:ref>Cache-Control</x:ref>   = "Cache-Control" ":" <x:ref>OWS</x:ref> <x:ref>Cache-Control-v</x:ref>
1587  <x:ref>Cache-Control-v</x:ref> = 1#<x:ref>cache-directive</x:ref>
1588
1589  <x:ref>cache-directive</x:ref> = <x:ref>cache-request-directive</x:ref>
1590     / <x:ref>cache-response-directive</x:ref>
1591
1592  <x:ref>cache-request-directive</x:ref> =
1593       "no-cache"                          ; <xref target="what.is.cacheable"/>
1594     / "no-store"                          ; <xref target="what.may.be.stored.by.caches"/>
1595     / "max-age" "=" <x:ref>delta-seconds</x:ref>         ; <xref target="modifications.of.the.basic.expiration.mechanism"/>, <xref format="counter" target="cache.revalidation.and.reload.controls"/>
1596     / "max-stale" [ "=" <x:ref>delta-seconds</x:ref> ]   ; <xref target="modifications.of.the.basic.expiration.mechanism"/>
1597     / "min-fresh" "=" <x:ref>delta-seconds</x:ref>       ; <xref target="modifications.of.the.basic.expiration.mechanism"/>
1598     / "no-transform"                      ; <xref target="no-transform.directive"/>
1599     / "only-if-cached"                    ; <xref target="cache.revalidation.and.reload.controls"/>
1600     / <x:ref>cache-extension</x:ref>                     ; <xref target="cache.control.extensions"/>
1601
1602  <x:ref>cache-response-directive</x:ref> =
1603       "public"                               ; <xref target="what.is.cacheable"/>
1604     / "private" [ "=" <x:ref>DQUOTE</x:ref> 1#<x:ref>field-name</x:ref> <x:ref>DQUOTE</x:ref> ] ; <xref target="what.is.cacheable"/>
1605     / "no-cache" [ "=" <x:ref>DQUOTE</x:ref> 1#<x:ref>field-name</x:ref> <x:ref>DQUOTE</x:ref> ] ; <xref target="what.is.cacheable"/>
1606     / "no-store"                             ; <xref target="what.may.be.stored.by.caches"/>
1607     / "no-transform"                         ; <xref target="no-transform.directive"/>
1608     / "must-revalidate"                      ; <xref target="cache.revalidation.and.reload.controls"/>
1609     / "proxy-revalidate"                     ; <xref target="cache.revalidation.and.reload.controls"/>
1610     / "max-age" "=" <x:ref>delta-seconds</x:ref>            ; <xref target="modifications.of.the.basic.expiration.mechanism"/>
1611     / "s-maxage" "=" <x:ref>delta-seconds</x:ref>           ; <xref target="modifications.of.the.basic.expiration.mechanism"/>
1612     / <x:ref>cache-extension</x:ref>                        ; <xref target="cache.control.extensions"/>
1613
1614  <x:ref>cache-extension</x:ref> = <x:ref>token</x:ref> [ "=" ( <x:ref>token</x:ref> / <x:ref>quoted-string</x:ref> ) ]
1615</artwork></figure>
1616<t>
1617   When a directive appears without any 1#field-name parameter, the
1618   directive applies to the entire request or response. When such a
1619   directive appears with a 1#field-name parameter, it applies only to
1620   the named field or fields, and not to the rest of the request or
1621   response. This mechanism supports extensibility; implementations of
1622   future versions of HTTP might apply these directives to
1623   header fields not defined in HTTP/1.1.
1624</t>
1625<t>
1626   The cache-control directives can be broken down into these general
1627   categories:
1628  <list style="symbols">
1629     <t>Restrictions on what are cacheable; these may only be imposed by
1630        the origin server.</t>
1631
1632     <t>Restrictions on what may be stored by a cache; these may be
1633        imposed by either the origin server or the user agent.</t>
1634
1635     <t>Modifications of the basic expiration mechanism; these may be
1636        imposed by either the origin server or the user agent.</t>
1637
1638     <t>Controls over cache revalidation and reload; these may only be
1639        imposed by a user agent.</t>
1640
1641     <t>Control over transformation of entities.</t>
1642
1643     <t>Extensions to the caching system.</t>
1644  </list>
1645</t>
1646
1647<section title="What is Cacheable" anchor="what.is.cacheable">
1648<t>
1649   By default, a response is cacheable if the requirements of the
1650   request method, request header fields, and the response status
1651   indicate that it is cacheable. <xref target="response.cacheability"/> summarizes these defaults
1652   for cacheability. The following Cache-Control response directives
1653   allow an origin server to override the default cacheability of a
1654   response:
1655</t>
1656<t>
1657  <iref item="Cache Directives" subitem="public" primary="true"/>
1658  <iref item="public" subitem="Cache Directive" primary="true"/>
1659   public
1660  <list><t>
1661      Indicates that the response &MAY; be cached by any cache, even if it
1662      would normally be non-cacheable or cacheable only within a non-shared
1663      cache. (See also Authorization, &header-authorization;, for
1664      additional details.)
1665  </t></list>
1666</t>
1667<t>
1668  <iref item="Cache Directives" subitem="private" primary="true"/>
1669  <iref item="private" subitem="Cache Directive" primary="true"/>
1670   private
1671  <list><t>
1672      Indicates that all or part of the response message is intended for
1673      a single user and &MUST-NOT; be cached by a shared cache. This
1674      allows an origin server to state that the specified parts of the
1675      response are intended for only one user and are not a valid
1676      response for requests by other users. A private (non-shared) cache
1677      &MAY; cache the response.
1678    </t><t>
1679       <x:h>Note:</x:h> This usage of the word private only controls where the
1680       response may be cached, and cannot ensure the privacy of the
1681       message content.
1682  </t></list>
1683</t>
1684<t>
1685  <iref item="Cache Directives" subitem="no-cache" primary="true"/>
1686  <iref item="no-cache" subitem="Cache Directive" primary="true"/>
1687   no-cache
1688  <list><t>
1689       If the no-cache directive does not specify a field-name, then a
1690      cache &MUST-NOT; use the response to satisfy a subsequent request
1691      without successful revalidation with the origin server. This
1692      allows an origin server to prevent caching even by caches that
1693      have been configured to return stale responses to client requests.
1694    </t><t>
1695      If the no-cache directive does specify one or more field-names,
1696      then a cache &MAY; use the response to satisfy a subsequent request,
1697      subject to any other restrictions on caching. However, the
1698      specified field-name(s) &MUST-NOT; be sent in the response to a
1699      subsequent request without successful revalidation with the origin
1700      server. This allows an origin server to prevent the re-use of
1701      certain header fields in a response, while still allowing caching
1702      of the rest of the response.
1703    <list><t>
1704       <x:h>Note:</x:h> Most HTTP/1.0 caches will not recognize or obey this
1705       directive.
1706    </t></list>
1707  </t></list>
1708</t>
1709</section>
1710
1711<section title="What May be Stored by Caches" anchor="what.may.be.stored.by.caches">
1712<t>
1713  <iref item="Cache Directives" subitem="no-store" primary="true"/>
1714  <iref item="no-store" subitem="Cache Directive" primary="true"/>
1715   no-store
1716  <list><t>   
1717      The purpose of the no-store directive is to prevent the
1718      inadvertent release or retention of sensitive information (for
1719      example, on backup tapes). The no-store directive applies to the
1720      entire message, and &MAY; be sent either in a response or in a
1721      request. If sent in a request, a cache &MUST-NOT; store any part of
1722      either this request or any response to it. If sent in a response,
1723      a cache &MUST-NOT; store any part of either this response or the
1724      request that elicited it. This directive applies to both non-shared
1725      and shared caches. "&MUST-NOT; store" in this context means
1726      that the cache &MUST-NOT; intentionally store the information in
1727      non-volatile storage, and &MUST; make a best-effort attempt to
1728      remove the information from volatile storage as promptly as
1729      possible after forwarding it.
1730  </t><t>
1731      Even when this directive is associated with a response, users
1732      might explicitly store such a response outside of the caching
1733      system (e.g., with a "Save As" dialog). History buffers &MAY; store
1734      such responses as part of their normal operation.
1735  </t><t>
1736      The purpose of this directive is to meet the stated requirements
1737      of certain users and service authors who are concerned about
1738      accidental releases of information via unanticipated accesses to
1739      cache data structures. While the use of this directive might
1740      improve privacy in some cases, we caution that it is NOT in any
1741      way a reliable or sufficient mechanism for ensuring privacy. In
1742      particular, malicious or compromised caches might not recognize or
1743      obey this directive, and communications networks might be
1744      vulnerable to eavesdropping.
1745  </t></list>
1746</t>
1747</section>
1748
1749<section title="Modifications of the Basic Expiration Mechanism" anchor="modifications.of.the.basic.expiration.mechanism">
1750<t>
1751   The expiration time of an entity &MAY; be specified by the origin
1752   server using the Expires header (see <xref target="header.expires"/>). Alternatively,
1753   it &MAY; be specified using the max-age directive in a response. When
1754   the max-age cache-control directive is present in a cached response,
1755   the response is stale if its current age is greater than the age
1756   value given (in seconds) at the time of a new request for that
1757   resource. The max-age directive on a response implies that the
1758   response is cacheable (i.e., "public") unless some other, more
1759   restrictive cache directive is also present.
1760</t>
1761<t>
1762   If a response includes both an Expires header and a max-age
1763   directive, the max-age directive overrides the Expires header, even
1764   if the Expires header is more restrictive. This rule allows an origin
1765   server to provide, for a given response, a longer expiration time to
1766   an HTTP/1.1 (or later) cache than to an HTTP/1.0 cache. This might be
1767   useful if certain HTTP/1.0 caches improperly calculate ages or
1768   expiration times, perhaps due to desynchronized clocks.
1769</t>
1770<t>
1771   Many HTTP/1.0 cache implementations will treat an Expires value that
1772   is less than or equal to the response Date value as being equivalent
1773   to the Cache-Control response directive "no-cache". If an HTTP/1.1
1774   cache receives such a response, and the response does not include a
1775   Cache-Control header field, it &SHOULD; consider the response to be
1776   non-cacheable in order to retain compatibility with HTTP/1.0 servers.
1777  <list><t>
1778       <x:h>Note:</x:h> An origin server might wish to use a relatively new HTTP
1779       cache control feature, such as the "private" directive, on a
1780       network including older caches that do not understand that
1781       feature. The origin server will need to combine the new feature
1782       with an Expires field whose value is less than or equal to the
1783       Date value. This will prevent older caches from improperly
1784       caching the response.
1785  </t></list>
1786</t>
1787<t>
1788  <iref item="Cache Directives" subitem="s-maxage" primary="true"/>
1789  <iref item="s-maxage" subitem="Cache Directive" primary="true"/>
1790   s-maxage
1791  <list><t>
1792       If a response includes an s-maxage directive, then for a shared
1793       cache (but not for a private cache), the maximum age specified by
1794       this directive overrides the maximum age specified by either the
1795       max-age directive or the Expires header. The s-maxage directive
1796       also implies the semantics of the proxy-revalidate directive (see
1797       <xref target="cache.revalidation.and.reload.controls"/>), i.e., that the shared cache must not use the
1798       entry after it becomes stale to respond to a subsequent request
1799       without first revalidating it with the origin server. The s-maxage
1800       directive is always ignored by a private cache.
1801  </t></list>
1802</t>
1803<t>
1804   Note that most older caches, not compliant with this specification,
1805   do not implement any cache-control directives. An origin server
1806   wishing to use a cache-control directive that restricts, but does not
1807   prevent, caching by an HTTP/1.1-compliant cache &MAY; exploit the
1808   requirement that the max-age directive overrides the Expires header,
1809   and the fact that pre-HTTP/1.1-compliant caches do not observe the
1810   max-age directive.
1811</t>
1812<t>
1813   Other directives allow a user agent to modify the basic expiration
1814   mechanism. These directives &MAY; be specified on a request:
1815</t>
1816<t>
1817  <iref item="Cache Directives" subitem="max-age" primary="true"/>
1818  <iref item="max-age" subitem="Cache Directive" primary="true"/>
1819   max-age
1820  <list><t>
1821      Indicates that the client is willing to accept a response whose
1822      age is no greater than the specified time in seconds. Unless max-stale
1823      directive is also included, the client is not willing to
1824      accept a stale response.
1825  </t></list>
1826</t>
1827<t>
1828  <iref item="Cache Directives" subitem="min-fresh" primary="true"/>
1829  <iref item="min-fresh" subitem="Cache Directive" primary="true"/>
1830   min-fresh
1831  <list><t>
1832      Indicates that the client is willing to accept a response whose
1833      freshness lifetime is no less than its current age plus the
1834      specified time in seconds. That is, the client wants a response
1835      that will still be fresh for at least the specified number of
1836      seconds.
1837  </t></list>
1838</t>
1839<t>
1840  <iref item="Cache Directives" subitem="max-stale" primary="true"/>
1841  <iref item="max-stale" subitem="Cache Directive" primary="true"/>
1842   max-stale
1843  <list><t>
1844      Indicates that the client is willing to accept a response that has
1845      exceeded its expiration time. If max-stale is assigned a value,
1846      then the client is willing to accept a response that has exceeded
1847      its expiration time by no more than the specified number of
1848      seconds. If no value is assigned to max-stale, then the client is
1849      willing to accept a stale response of any age.
1850  </t></list>
1851</t>
1852<t>
1853   If a cache returns a stale response, either because of a max-stale
1854   directive on a request, or because the cache is configured to
1855   override the expiration time of a response, the cache &MUST; attach a
1856   Warning header to the stale response, using Warning 110 (Response is
1857   stale).
1858</t>
1859<t>
1860   A cache &MAY; be configured to return stale responses without
1861   validation, but only if this does not conflict with any "MUST"-level
1862   requirements concerning cache validation (e.g., a "must-revalidate"
1863   cache-control directive).
1864</t>
1865<t>
1866   If both the new request and the cached entry include "max-age"
1867   directives, then the lesser of the two values is used for determining
1868   the freshness of the cached entry for that request.
1869</t>
1870</section>
1871
1872<section title="Cache Revalidation and Reload Controls" anchor="cache.revalidation.and.reload.controls">
1873<t>
1874   Sometimes a user agent might want or need to insist that a cache
1875   revalidate its cache entry with the origin server (and not just with
1876   the next cache along the path to the origin server), or to reload its
1877   cache entry from the origin server. End-to-end revalidation might be
1878   necessary if either the cache or the origin server has overestimated
1879   the expiration time of the cached response. End-to-end reload may be
1880   necessary if the cache entry has become corrupted for some reason.
1881</t>
1882<t>
1883   End-to-end revalidation may be requested either when the client does
1884   not have its own local cached copy, in which case we call it
1885   "unspecified end-to-end revalidation", or when the client does have a
1886   local cached copy, in which case we call it "specific end-to-end
1887   revalidation."
1888</t>
1889<t>
1890   The client can specify these three kinds of action using Cache-Control
1891   request directives:
1892</t>
1893<t>
1894   End-to-end reload
1895  <list><t>
1896      The request includes a "no-cache" cache-control directive or, for
1897      compatibility with HTTP/1.0 clients, "Pragma: no-cache". Field
1898      names &MUST-NOT; be included with the no-cache directive in a
1899      request. The server &MUST-NOT; use a cached copy when responding to
1900      such a request.
1901  </t></list>
1902</t>
1903<t>
1904   Specific end-to-end revalidation
1905  <list><t>
1906      The request includes a "max-age=0" cache-control directive, which
1907      forces each cache along the path to the origin server to
1908      revalidate its own entry, if any, with the next cache or server.
1909      The initial request includes a cache-validating conditional with
1910      the client's current validator.
1911  </t></list>
1912</t>
1913<t>
1914   Unspecified end-to-end revalidation
1915  <list><t>
1916      The request includes "max-age=0" cache-control directive, which
1917      forces each cache along the path to the origin server to
1918      revalidate its own entry, if any, with the next cache or server.
1919      The initial request does not include a cache-validating
1920      conditional; the first cache along the path (if any) that holds a
1921      cache entry for this resource includes a cache-validating
1922      conditional with its current validator.
1923  </t></list>
1924</t>
1925<t>
1926  <iref item="Cache Directives" subitem="max-age" primary="true"/>
1927  <iref item="max-age" subitem="Cache Directive" primary="true"/>
1928   max-age
1929  <list><t>
1930      When an intermediate cache is forced, by means of a max-age=0
1931      directive, to revalidate its own cache entry, and the client has
1932      supplied its own validator in the request, the supplied validator
1933      might differ from the validator currently stored with the cache
1934      entry. In this case, the cache &MAY; use either validator in making
1935      its own request without affecting semantic transparency.
1936  </t><t>
1937      However, the choice of validator might affect performance. The
1938      best approach is for the intermediate cache to use its own
1939      validator when making its request. If the server replies with 304
1940      (Not Modified), then the cache can return its now validated copy
1941      to the client with a 200 (OK) response. If the server replies with
1942      a new entity and cache validator, however, the intermediate cache
1943      can compare the returned validator with the one provided in the
1944      client's request, using the strong comparison function. If the
1945      client's validator is equal to the origin server's, then the
1946      intermediate cache simply returns 304 (Not Modified). Otherwise,
1947      it returns the new entity with a 200 (OK) response.
1948  </t><t>
1949      If a request includes the no-cache directive, it &SHOULD-NOT; 
1950      include min-fresh, max-stale, or max-age.
1951  </t></list>
1952</t>
1953<t>
1954  <iref item="Cache Directives" subitem="only-if-cached" primary="true"/>
1955  <iref item="only-if-cached" subitem="Cache Directive" primary="true"/>
1956   only-if-cached
1957  <list><t>
1958      In some cases, such as times of extremely poor network
1959      connectivity, a client may want a cache to return only those
1960      responses that it currently has stored, and not to reload or
1961      revalidate with the origin server. To do this, the client may
1962      include the only-if-cached directive in a request. If it receives
1963      this directive, a cache &SHOULD; either respond using a cached entry
1964      that is consistent with the other constraints of the request, or
1965      respond with a 504 (Gateway Timeout) status. However, if a group
1966      of caches is being operated as a unified system with good internal
1967      connectivity, such a request &MAY; be forwarded within that group of
1968      caches.
1969  </t></list>
1970</t>
1971<t>
1972  <iref item="Cache Directives" subitem="must-revalidate" primary="true"/>
1973  <iref item="must-revalidate" subitem="Cache Directive" primary="true"/>
1974   must-revalidate
1975  <list><t>
1976      Because a cache &MAY; be configured to ignore a server's specified
1977      expiration time, and because a client request &MAY; include a max-stale
1978      directive (which has a similar effect), the protocol also
1979      includes a mechanism for the origin server to require revalidation
1980      of a cache entry on any subsequent use. When the must-revalidate
1981      directive is present in a response received by a cache, that cache
1982      &MUST-NOT; use the entry after it becomes stale to respond to a
1983      subsequent request without first revalidating it with the origin
1984      server. (I.e., the cache &MUST; do an end-to-end revalidation every
1985      time, if, based solely on the origin server's Expires or max-age
1986      value, the cached response is stale.)
1987  </t><t>
1988      The must-revalidate directive is necessary to support reliable
1989      operation for certain protocol features. In all circumstances an
1990      HTTP/1.1 cache &MUST; obey the must-revalidate directive; in
1991      particular, if the cache cannot reach the origin server for any
1992      reason, it &MUST; generate a 504 (Gateway Timeout) response.
1993  </t><t>
1994      Servers &SHOULD; send the must-revalidate directive if and only if
1995      failure to revalidate a request on the entity could result in
1996      incorrect operation, such as a silently unexecuted financial
1997      transaction. Recipients &MUST-NOT; take any automated action that
1998      violates this directive, and &MUST-NOT; automatically provide an
1999      unvalidated copy of the entity if revalidation fails.
2000  </t><t>
2001      Although this is not recommended, user agents operating under
2002      severe connectivity constraints &MAY; violate this directive but, if
2003      so, &MUST; explicitly warn the user that an unvalidated response has
2004      been provided. The warning &MUST; be provided on each unvalidated
2005      access, and &SHOULD; require explicit user confirmation.
2006  </t></list>
2007</t>
2008<t>
2009  <iref item="Cache Directives" subitem="proxy-revalidate" primary="true"/>
2010  <iref item="proxy-revalidate" subitem="Cache Directive" primary="true"/>
2011   proxy-revalidate
2012  <list><t>
2013      The proxy-revalidate directive has the same meaning as the must-revalidate
2014      directive, except that it does not apply to non-shared
2015      user agent caches. It can be used on a response to an
2016      authenticated request to permit the user's cache to store and
2017      later return the response without needing to revalidate it (since
2018      it has already been authenticated once by that user), while still
2019      requiring proxies that service many users to revalidate each time
2020      (in order to make sure that each user has been authenticated).
2021      Note that such authenticated responses also need the public cache
2022      control directive in order to allow them to be cached at all.
2023  </t></list>
2024</t>
2025</section>
2026
2027<section title="No-Transform Directive" anchor="no-transform.directive">
2028<t>
2029  <iref item="Cache Directives" subitem="no-transform" primary="true"/>
2030  <iref item="no-transform" subitem="Cache Directive" primary="true"/>
2031   no-transform
2032  <list><t>
2033      Implementors of intermediate caches (proxies) have found it useful
2034      to convert the media type of certain entity bodies. A non-transparent
2035      proxy might, for example, convert between image
2036      formats in order to save cache space or to reduce the amount of
2037      traffic on a slow link.
2038  </t><t>
2039      Serious operational problems occur, however, when these
2040      transformations are applied to entity bodies intended for certain
2041      kinds of applications. For example, applications for medical
2042      imaging, scientific data analysis and those using end-to-end
2043      authentication, all depend on receiving an entity body that is bit
2044      for bit identical to the original entity-body.
2045  </t><t>
2046      Therefore, if a message includes the no-transform directive, an
2047      intermediate cache or proxy &MUST-NOT; change those headers that are
2048      listed in <xref target="non-modifiable.headers"/> as being subject to the no-transform
2049      directive. This implies that the cache or proxy &MUST-NOT; change
2050      any aspect of the entity-body that is specified by these headers,
2051      including the value of the entity-body itself.
2052  </t></list>
2053</t>
2054</section>
2055
2056<section title="Cache Control Extensions" anchor="cache.control.extensions">
2057<t>
2058   The Cache-Control header field can be extended through the use of one
2059   or more cache-extension tokens, each with an optional assigned value.
2060   Informational extensions (those which do not require a change in
2061   cache behavior) &MAY; be added without changing the semantics of other
2062   directives. Behavioral extensions are designed to work by acting as
2063   modifiers to the existing base of cache directives. Both the new
2064   directive and the standard directive are supplied, such that
2065   applications which do not understand the new directive will default
2066   to the behavior specified by the standard directive, and those that
2067   understand the new directive will recognize it as modifying the
2068   requirements associated with the standard directive. In this way,
2069   extensions to the cache-control directives can be made without
2070   requiring changes to the base protocol.
2071</t>
2072<t>
2073   This extension mechanism depends on an HTTP cache obeying all of the
2074   cache-control directives defined for its native HTTP-version, obeying
2075   certain extensions, and ignoring all directives that it does not
2076   understand.
2077</t>
2078<t>
2079   For example, consider a hypothetical new response directive called
2080   community which acts as a modifier to the private directive. We
2081   define this new directive to mean that, in addition to any non-shared
2082   cache, any cache which is shared only by members of the community
2083   named within its value may cache the response. An origin server
2084   wishing to allow the UCI community to use an otherwise private
2085   response in their shared cache(s) could do so by including
2086</t>
2087<figure><artwork type="example">
2088    Cache-Control: private, community="UCI"
2089</artwork></figure>
2090<t>
2091   A cache seeing this header field will act correctly even if the cache
2092   does not understand the community cache-extension, since it will also
2093   see and understand the private directive and thus default to the safe
2094   behavior.
2095</t>
2096<t>
2097   Unrecognized cache-directives &MUST; be ignored; it is assumed that any
2098   cache-directive likely to be unrecognized by an HTTP/1.1 cache will
2099   be combined with standard directives (or the response's default
2100   cacheability) such that the cache behavior will remain minimally
2101   correct even if the cache does not understand the extension(s).
2102</t>
2103</section>
2104</section>
2105
2106<section title="Expires" anchor="header.expires">
2107  <iref primary="true" item="Expires header" x:for-anchor=""/>
2108  <iref primary="true" item="Headers" subitem="Expires" x:for-anchor=""/>
2109  <x:anchor-alias value="Expires"/>
2110  <x:anchor-alias value="Expires-v"/>
2111<t>
2112   The Expires entity-header field gives the date/time after which the
2113   response is considered stale. A stale cache entry may not normally be
2114   returned by a cache (either a proxy cache or a user agent cache)
2115   unless it is first validated with the origin server (or with an
2116   intermediate cache that has a fresh copy of the entity). See <xref target="expiration.model"/>
2117   for further discussion of the expiration model.
2118</t>
2119<t>
2120   The presence of an Expires field does not imply that the original
2121   resource will change or cease to exist at, before, or after that
2122   time.
2123</t>
2124<t>
2125   The format is an absolute date and time as defined by HTTP-date in
2126   &full-date;; it &MUST; be sent in rfc1123-date format.
2127</t>
2128<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Expires"/><iref primary="true" item="Grammar" subitem="Expires-v"/>
2129  <x:ref>Expires</x:ref>   = "Expires" ":" <x:ref>OWS</x:ref> <x:ref>Expires-v</x:ref>
2130  <x:ref>Expires-v</x:ref> = <x:ref>HTTP-date</x:ref>
2131</artwork></figure>
2132<t>
2133   An example of its use is
2134</t>
2135<figure><artwork type="example">
2136  Expires: Thu, 01 Dec 1994 16:00:00 GMT
2137</artwork></figure>
2138<t>
2139  <list><t>
2140      <x:h>Note:</x:h> if a response includes a Cache-Control field with the max-age
2141      directive (see <xref target="modifications.of.the.basic.expiration.mechanism"/>), that directive overrides the
2142      Expires field.
2143  </t></list>
2144</t>
2145<t>
2146   HTTP/1.1 clients and caches &MUST; treat other invalid date formats,
2147   especially including the value "0", as in the past (i.e., "already
2148   expired").
2149</t>
2150<t>
2151   To mark a response as "already expired," an origin server sends an
2152   Expires date that is equal to the Date header value. (See the rules
2153   for expiration calculations in <xref target="expiration.calculations"/>.)
2154</t>
2155<t>
2156   To mark a response as "never expires," an origin server sends an
2157   Expires date approximately one year from the time the response is
2158   sent. HTTP/1.1 servers &SHOULD-NOT;  send Expires dates more than one
2159   year in the future.
2160</t>
2161<t>
2162   The presence of an Expires header field with a date value of some
2163   time in the future on a response that otherwise would by default be
2164   non-cacheable indicates that the response is cacheable, unless
2165   indicated otherwise by a Cache-Control header field (<xref target="header.cache-control"/>).
2166</t>
2167</section>
2168
2169<section title="Pragma" anchor="header.pragma">
2170  <iref primary="true" item="Pragma header" x:for-anchor=""/>
2171  <iref primary="true" item="Headers" subitem="Pragma" x:for-anchor=""/>
2172  <x:anchor-alias value="extension-pragma"/>
2173  <x:anchor-alias value="Pragma"/>
2174  <x:anchor-alias value="Pragma-v"/>
2175  <x:anchor-alias value="pragma-directive"/>
2176<t>
2177   The general-header field "Pragma" is used to include implementation-specific
2178   directives that might apply to any recipient along the
2179   request/response chain. All pragma directives specify optional
2180   behavior from the viewpoint of the protocol; however, some systems
2181   &MAY; require that behavior be consistent with the directives.
2182</t>
2183<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"/>
2184  <x:ref>Pragma</x:ref>            = "Pragma" ":" <x:ref>OWS</x:ref> <x:ref>Pragma-v</x:ref>
2185  <x:ref>Pragma-v</x:ref>          = 1#<x:ref>pragma-directive</x:ref>
2186  <x:ref>pragma-directive</x:ref>  = "no-cache" / <x:ref>extension-pragma</x:ref>
2187  <x:ref>extension-pragma</x:ref>  = <x:ref>token</x:ref> [ "=" ( <x:ref>token</x:ref> / <x:ref>quoted-string</x:ref> ) ]
2188</artwork></figure>
2189<t>
2190   When the no-cache directive is present in a request message, an
2191   application &SHOULD; forward the request toward the origin server even
2192   if it has a cached copy of what is being requested. This pragma
2193   directive has the same semantics as the no-cache cache-directive (see
2194   <xref target="header.cache-control"/>) and is defined here for backward compatibility with
2195   HTTP/1.0. Clients &SHOULD; include both header fields when a no-cache
2196   request is sent to a server not known to be HTTP/1.1 compliant.
2197</t>
2198<t>
2199   Pragma directives &MUST; be passed through by a proxy or gateway
2200   application, regardless of their significance to that application,
2201   since the directives might be applicable to all recipients along the
2202   request/response chain. It is not possible to specify a pragma for a
2203   specific recipient; however, any pragma directive not relevant to a
2204   recipient &SHOULD; be ignored by that recipient.
2205</t>
2206<t>
2207   HTTP/1.1 caches &SHOULD; treat "Pragma: no-cache" as if the client had
2208   sent "Cache-Control: no-cache". No new Pragma directives will be
2209   defined in HTTP.
2210  <list><t>
2211      <x:h>Note:</x:h> because the meaning of "Pragma: no-cache" as a
2212      response-header field is not actually specified, it does not provide a
2213      reliable replacement for "Cache-Control: no-cache" in a response.
2214  </t></list>
2215</t>
2216</section>
2217
2218<section title="Vary" anchor="header.vary">
2219  <iref primary="true" item="Vary header" x:for-anchor=""/>
2220  <iref primary="true" item="Headers" subitem="Vary" x:for-anchor=""/>
2221  <x:anchor-alias value="Vary"/>
2222  <x:anchor-alias value="Vary-v"/>
2223<t>
2224   The "Vary" response-header field's value indicates the set of request-header
2225   fields that fully determines, while the response is fresh, whether a cache
2226   is permitted to use the response to reply to a subsequent request
2227   without revalidation. For uncacheable or stale responses, the Vary
2228   field value advises the user agent about the criteria that were used
2229   to select the representation. A Vary field value of "*" implies that
2230   a cache cannot determine from the request headers of a subsequent
2231   request whether this response is the appropriate representation. See
2232   <xref target="caching.negotiated.responses"/> for use of the Vary header field by caches.
2233</t>
2234<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Vary"/><iref primary="true" item="Grammar" subitem="Vary-v"/>
2235  <x:ref>Vary</x:ref>   = "Vary" ":" <x:ref>OWS</x:ref> <x:ref>Vary-v</x:ref>
2236  <x:ref>Vary-v</x:ref> = "*" / 1#<x:ref>field-name</x:ref>
2237</artwork></figure>
2238<t>
2239   An HTTP/1.1 server &SHOULD; include a Vary header field with any
2240   cacheable response that is subject to server-driven negotiation.
2241   Doing so allows a cache to properly interpret future requests on that
2242   resource and informs the user agent about the presence of negotiation
2243   on that resource. A server &MAY; include a Vary header field with a
2244   non-cacheable response that is subject to server-driven negotiation,
2245   since this might provide the user agent with useful information about
2246   the dimensions over which the response varies at the time of the
2247   response.
2248</t>
2249<t>
2250   A Vary field value consisting of a list of field-names signals that
2251   the representation selected for the response is based on a selection
2252   algorithm which considers ONLY the listed request-header field values
2253   in selecting the most appropriate representation. A cache &MAY; assume
2254   that the same selection will be made for future requests with the
2255   same values for the listed field names, for the duration of time for
2256   which the response is fresh.
2257</t>
2258<t>
2259   The field-names given are not limited to the set of standard
2260   request-header fields defined by this specification. Field names are
2261   case-insensitive.
2262</t>
2263<t>
2264   A Vary field value of "*" signals that unspecified parameters not
2265   limited to the request-headers (e.g., the network address of the
2266   client), play a role in the selection of the response representation.
2267   The "*" value &MUST-NOT; be generated by a proxy server; it may only be
2268   generated by an origin server.
2269</t>
2270</section>
2271
2272<section title="Warning" anchor="header.warning">
2273  <iref primary="true" item="Warning header" x:for-anchor=""/>
2274  <iref primary="true" item="Headers" subitem="Warning" x:for-anchor=""/>
2275  <x:anchor-alias value="Warning"/>
2276  <x:anchor-alias value="Warning-v"/>
2277  <x:anchor-alias value="warning-value"/>
2278  <x:anchor-alias value="warn-agent"/>
2279  <x:anchor-alias value="warn-code"/>
2280  <x:anchor-alias value="warn-date"/>
2281  <x:anchor-alias value="warn-text"/>
2282<t>
2283   The general-header field "Warning" is used to carry additional
2284   information about the status or transformation of a message which
2285   might not be reflected in the message. This information is typically
2286   used to warn about a possible lack of semantic transparency from
2287   caching operations or transformations applied to the entity body of
2288   the message.
2289</t>
2290<t>
2291   Warning headers are sent with responses using:
2292</t>
2293<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"/>
2294  <x:ref>Warning</x:ref>    = "Warning" ":" <x:ref>OWS</x:ref> <x:ref>Warning-v</x:ref>
2295  <x:ref>Warning-v</x:ref>  = 1#<x:ref>warning-value</x:ref>
2296 
2297  <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>
2298                                        [<x:ref>SP</x:ref> <x:ref>warn-date</x:ref>]
2299 
2300  <x:ref>warn-code</x:ref>  = 3<x:ref>DIGIT</x:ref>
2301  <x:ref>warn-agent</x:ref> = ( <x:ref>uri-host</x:ref> [ ":" <x:ref>port</x:ref> ] ) / <x:ref>pseudonym</x:ref>
2302                  ; the name or pseudonym of the server adding
2303                  ; the Warning header, for use in debugging
2304  <x:ref>warn-text</x:ref>  = <x:ref>quoted-string</x:ref>
2305  <x:ref>warn-date</x:ref>  = <x:ref>DQUOTE</x:ref> <x:ref>HTTP-date</x:ref> <x:ref>DQUOTE</x:ref>
2306</artwork></figure>
2307<t>
2308   A response &MAY; carry more than one Warning header.
2309</t>
2310<t>
2311   The warn-text &SHOULD; be in a natural language and character set that
2312   is most likely to be intelligible to the human user receiving the
2313   response. This decision &MAY; be based on any available knowledge, such
2314   as the location of the cache or user, the Accept-Language field in a
2315   request, the Content-Language field in a response, etc. The default
2316   language is English and the default character set is ISO-8859-1 (<xref target="ISO-8859-1"/>).
2317</t>
2318<t>
2319   If a character set other than ISO-8859-1 is used, it &MUST; be encoded
2320   in the warn-text using the method described in <xref target="RFC2047"/>.
2321</t>
2322<t>
2323   Warning headers can in general be applied to any message, however
2324   some specific warn-codes are specific to caches and can only be
2325   applied to response messages. New Warning headers &SHOULD; be added
2326   after any existing Warning headers. A cache &MUST-NOT; delete any
2327   Warning header that it received with a message. However, if a cache
2328   successfully validates a cache entry, it &SHOULD; remove any Warning
2329   headers previously attached to that entry except as specified for
2330   specific Warning codes. It &MUST; then add any Warning headers received
2331   in the validating response. In other words, Warning headers are those
2332   that would be attached to the most recent relevant response.
2333</t>
2334<t>
2335   When multiple Warning headers are attached to a response, the user
2336   agent ought to inform the user of as many of them as possible, in the
2337   order that they appear in the response. If it is not possible to
2338   inform the user of all of the warnings, the user agent &SHOULD; follow
2339   these heuristics:
2340  <list style="symbols">
2341    <t>Warnings that appear early in the response take priority over
2342        those appearing later in the response.</t>
2343
2344    <t>Warnings in the user's preferred character set take priority
2345        over warnings in other character sets but with identical warn-codes
2346        and warn-agents.</t>
2347  </list>
2348</t>
2349<t>
2350   Systems that generate multiple Warning headers &SHOULD; order them with
2351   this user agent behavior in mind.
2352</t>
2353<t>
2354   Requirements for the behavior of caches with respect to Warnings are
2355   stated in <xref target="warnings"/>.
2356</t>
2357<t>
2358   This is a list of the currently-defined warn-codes, each with a
2359   recommended warn-text in English, and a description of its meaning.
2360</t>
2361<t>
2362   110 Response is stale
2363  <list><t>
2364     &MUST; be included whenever the returned response is stale.
2365  </t></list>
2366</t>
2367<t>
2368   111 Revalidation failed
2369  <list><t>
2370     &MUST; be included if a cache returns a stale response because an
2371     attempt to revalidate the response failed, due to an inability to
2372     reach the server.
2373  </t></list>
2374</t>
2375<t>
2376   112 Disconnected operation
2377  <list><t>
2378     &SHOULD; be included if the cache is intentionally disconnected from
2379     the rest of the network for a period of time.
2380  </t></list>
2381</t>
2382<t>
2383   113 Heuristic expiration
2384  <list><t>
2385     &MUST; be included if the cache heuristically chose a freshness
2386     lifetime greater than 24 hours and the response's age is greater
2387     than 24 hours.
2388  </t></list>
2389</t>
2390<t>
2391   199 Miscellaneous warning
2392  <list><t>
2393     The warning text &MAY; include arbitrary information to be presented
2394     to a human user, or logged. A system receiving this warning &MUST-NOT;
2395     take any automated action, besides presenting the warning to
2396     the user.
2397  </t></list>
2398</t>
2399<t>
2400   214 Transformation applied
2401  <list><t>
2402     &MUST; be added by an intermediate cache or proxy if it applies any
2403     transformation changing the content-coding (as specified in the
2404     Content-Encoding header) or media-type (as specified in the
2405     Content-Type header) of the response, or the entity-body of the
2406     response, unless this Warning code already appears in the response.
2407  </t></list>
2408</t>
2409<t>
2410   299 Miscellaneous persistent warning
2411  <list><t>
2412     The warning text &MAY; include arbitrary information to be presented
2413     to a human user, or logged. A system receiving this warning &MUST-NOT;
2414     take any automated action.
2415  </t></list>
2416</t>
2417<t>
2418   If an implementation sends a message with one or more Warning headers
2419   whose version is HTTP/1.0 or lower, then the sender &MUST; include in
2420   each warning-value a warn-date that matches the date in the response.
2421</t>
2422<t>
2423   If an implementation receives a message with a warning-value that
2424   includes a warn-date, and that warn-date is different from the Date
2425   value in the response, then that warning-value &MUST; be deleted from
2426   the message before storing, forwarding, or using it. (This prevents
2427   bad consequences of naive caching of Warning header fields.) If all
2428   of the warning-values are deleted for this reason, the Warning header
2429   &MUST; be deleted as well.
2430</t>
2431</section>
2432
2433</section>
2434
2435<section title="IANA Considerations" anchor="IANA.considerations">
2436<section title="Message Header Registration" anchor="message.header.registration">
2437<t>
2438   The Message Header Registry located at <eref target="http://www.iana.org/assignments/message-headers/message-header-index.html"/> should be updated
2439   with the permanent registrations below (see <xref target="RFC3864"/>):
2440</t>
2441<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
2442<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
2443   <ttcol>Header Field Name</ttcol>
2444   <ttcol>Protocol</ttcol>
2445   <ttcol>Status</ttcol>
2446   <ttcol>Reference</ttcol>
2447
2448   <c>Age</c>
2449   <c>http</c>
2450   <c>standard</c>
2451   <c>
2452      <xref target="header.age"/>
2453   </c>
2454   <c>Cache-Control</c>
2455   <c>http</c>
2456   <c>standard</c>
2457   <c>
2458      <xref target="header.cache-control"/>
2459   </c>
2460   <c>Expires</c>
2461   <c>http</c>
2462   <c>standard</c>
2463   <c>
2464      <xref target="header.expires"/>
2465   </c>
2466   <c>Pragma</c>
2467   <c>http</c>
2468   <c>standard</c>
2469   <c>
2470      <xref target="header.pragma"/>
2471   </c>
2472   <c>Vary</c>
2473   <c>http</c>
2474   <c>standard</c>
2475   <c>
2476      <xref target="header.vary"/>
2477   </c>
2478   <c>Warning</c>
2479   <c>http</c>
2480   <c>standard</c>
2481   <c>
2482      <xref target="header.warning"/>
2483   </c>
2484</texttable>
2485<!--(END)-->
2486<t>
2487   The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".
2488</t>
2489</section>
2490</section>
2491
2492<section title="Security Considerations" anchor="security.considerations">
2493<t>
2494   Caching proxies provide additional potential vulnerabilities, since
2495   the contents of the cache represent an attractive target for
2496   malicious exploitation. Because cache contents persist after an HTTP
2497   request is complete, an attack on the cache can reveal information
2498   long after a user believes that the information has been removed from
2499   the network. Therefore, cache contents should be protected as
2500   sensitive information.
2501</t>
2502</section>
2503
2504<section title="Acknowledgments" anchor="ack">
2505<t>
2506   Much of the content and presentation of the caching design is due to
2507   suggestions and comments from individuals including: Shel Kaphan,
2508   Paul Leach, Koen Holtman, David Morris, and Larry Masinter.
2509</t>
2510</section>
2511</middle>
2512<back>
2513
2514<references title="Normative References">
2515
2516<reference anchor="ISO-8859-1">
2517  <front>
2518    <title>
2519     Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1
2520    </title>
2521    <author>
2522      <organization>International Organization for Standardization</organization>
2523    </author>
2524    <date year="1998"/>
2525  </front>
2526  <seriesInfo name="ISO/IEC" value="8859-1:1998"/>
2527</reference>
2528
2529<reference anchor="Part1">
2530  <front>
2531    <title abbrev="HTTP/1.1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title>
2532    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2533      <organization abbrev="Day Software">Day Software</organization>
2534      <address><email>fielding@gbiv.com</email></address>
2535    </author>
2536    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2537      <organization>One Laptop per Child</organization>
2538      <address><email>jg@laptop.org</email></address>
2539    </author>
2540    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2541      <organization abbrev="HP">Hewlett-Packard Company</organization>
2542      <address><email>JeffMogul@acm.org</email></address>
2543    </author>
2544    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2545      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2546      <address><email>henrikn@microsoft.com</email></address>
2547    </author>
2548    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2549      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2550      <address><email>LMM@acm.org</email></address>
2551    </author>
2552    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2553      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2554      <address><email>paulle@microsoft.com</email></address>
2555    </author>
2556    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2557      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2558      <address><email>timbl@w3.org</email></address>
2559    </author>
2560    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2561      <organization abbrev="W3C">World Wide Web Consortium</organization>
2562      <address><email>ylafon@w3.org</email></address>
2563    </author>
2564    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2565      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2566      <address><email>julian.reschke@greenbytes.de</email></address>
2567    </author>
2568    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2569  </front>
2570  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;"/>
2571  <x:source href="p1-messaging.xml" basename="p1-messaging"/>
2572</reference>
2573
2574<reference anchor="Part2">
2575  <front>
2576    <title abbrev="HTTP/1.1">HTTP/1.1, part 2: Message Semantics</title>
2577    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2578      <organization abbrev="Day Software">Day Software</organization>
2579      <address><email>fielding@gbiv.com</email></address>
2580    </author>
2581    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2582      <organization>One Laptop per Child</organization>
2583      <address><email>jg@laptop.org</email></address>
2584    </author>
2585    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2586      <organization abbrev="HP">Hewlett-Packard Company</organization>
2587      <address><email>JeffMogul@acm.org</email></address>
2588    </author>
2589    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2590      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2591      <address><email>henrikn@microsoft.com</email></address>
2592    </author>
2593    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2594      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2595      <address><email>LMM@acm.org</email></address>
2596    </author>
2597    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2598      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2599      <address><email>paulle@microsoft.com</email></address>
2600    </author>
2601    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2602      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2603      <address><email>timbl@w3.org</email></address>
2604    </author>
2605    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2606      <organization abbrev="W3C">World Wide Web Consortium</organization>
2607      <address><email>ylafon@w3.org</email></address>
2608    </author>
2609    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2610      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2611      <address><email>julian.reschke@greenbytes.de</email></address>
2612    </author>
2613    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2614  </front>
2615  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-&ID-VERSION;"/>
2616  <x:source href="p2-semantics.xml" basename="p2-semantics"/>
2617</reference>
2618
2619<reference anchor="Part3">
2620  <front>
2621    <title abbrev="HTTP/1.1">HTTP/1.1, part 3: Message Payload and Content Negotiation</title>
2622    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2623      <organization abbrev="Day Software">Day Software</organization>
2624      <address><email>fielding@gbiv.com</email></address>
2625    </author>
2626    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2627      <organization>One Laptop per Child</organization>
2628      <address><email>jg@laptop.org</email></address>
2629    </author>
2630    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2631      <organization abbrev="HP">Hewlett-Packard Company</organization>
2632      <address><email>JeffMogul@acm.org</email></address>
2633    </author>
2634    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2635      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2636      <address><email>henrikn@microsoft.com</email></address>
2637    </author>
2638    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2639      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2640      <address><email>LMM@acm.org</email></address>
2641    </author>
2642    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2643      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2644      <address><email>paulle@microsoft.com</email></address>
2645    </author>
2646    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2647      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2648      <address><email>timbl@w3.org</email></address>
2649    </author>
2650    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2651      <organization abbrev="W3C">World Wide Web Consortium</organization>
2652      <address><email>ylafon@w3.org</email></address>
2653    </author>
2654    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2655      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2656      <address><email>julian.reschke@greenbytes.de</email></address>
2657    </author>
2658    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2659  </front>
2660  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p3-payload-&ID-VERSION;"/>
2661  <x:source href="p3-payload.xml" basename="p3-payload"/>
2662</reference>
2663
2664<reference anchor="Part4">
2665  <front>
2666    <title abbrev="HTTP/1.1">HTTP/1.1, part 4: Conditional Requests</title>
2667    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2668      <organization abbrev="Day Software">Day Software</organization>
2669      <address><email>fielding@gbiv.com</email></address>
2670    </author>
2671    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2672      <organization>One Laptop per Child</organization>
2673      <address><email>jg@laptop.org</email></address>
2674    </author>
2675    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2676      <organization abbrev="HP">Hewlett-Packard Company</organization>
2677      <address><email>JeffMogul@acm.org</email></address>
2678    </author>
2679    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2680      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2681      <address><email>henrikn@microsoft.com</email></address>
2682    </author>
2683    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2684      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2685      <address><email>LMM@acm.org</email></address>
2686    </author>
2687    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2688      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2689      <address><email>paulle@microsoft.com</email></address>
2690    </author>
2691    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2692      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2693      <address><email>timbl@w3.org</email></address>
2694    </author>
2695    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2696      <organization abbrev="W3C">World Wide Web Consortium</organization>
2697      <address><email>ylafon@w3.org</email></address>
2698    </author>
2699    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2700      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2701      <address><email>julian.reschke@greenbytes.de</email></address>
2702    </author>
2703    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2704  </front>
2705  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p4-conditional-&ID-VERSION;"/>
2706  <x:source href="p4-conditional.xml" basename="p4-conditional"/>
2707</reference>
2708
2709<reference anchor="Part5">
2710  <front>
2711    <title abbrev="HTTP/1.1">HTTP/1.1, part 5: Range Requests and Partial Responses</title>
2712    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2713      <organization abbrev="Day Software">Day Software</organization>
2714      <address><email>fielding@gbiv.com</email></address>
2715    </author>
2716    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2717      <organization>One Laptop per Child</organization>
2718      <address><email>jg@laptop.org</email></address>
2719    </author>
2720    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2721      <organization abbrev="HP">Hewlett-Packard Company</organization>
2722      <address><email>JeffMogul@acm.org</email></address>
2723    </author>
2724    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2725      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2726      <address><email>henrikn@microsoft.com</email></address>
2727    </author>
2728    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2729      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2730      <address><email>LMM@acm.org</email></address>
2731    </author>
2732    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2733      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2734      <address><email>paulle@microsoft.com</email></address>
2735    </author>
2736    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2737      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2738      <address><email>timbl@w3.org</email></address>
2739    </author>
2740    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2741      <organization abbrev="W3C">World Wide Web Consortium</organization>
2742      <address><email>ylafon@w3.org</email></address>
2743    </author>
2744    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2745      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2746      <address><email>julian.reschke@greenbytes.de</email></address>
2747    </author>
2748    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2749  </front>
2750  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-&ID-VERSION;"/>
2751  <x:source href="p5-range.xml" basename="p5-range"/>
2752</reference>
2753
2754<reference anchor="Part7">
2755  <front>
2756    <title abbrev="HTTP/1.1">HTTP/1.1, part 7: Authentication</title>
2757    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2758      <organization abbrev="Day Software">Day Software</organization>
2759      <address><email>fielding@gbiv.com</email></address>
2760    </author>
2761    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2762      <organization>One Laptop per Child</organization>
2763      <address><email>jg@laptop.org</email></address>
2764    </author>
2765    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2766      <organization abbrev="HP">Hewlett-Packard Company</organization>
2767      <address><email>JeffMogul@acm.org</email></address>
2768    </author>
2769    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2770      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2771      <address><email>henrikn@microsoft.com</email></address>
2772    </author>
2773    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2774      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2775      <address><email>LMM@acm.org</email></address>
2776    </author>
2777    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2778      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2779      <address><email>paulle@microsoft.com</email></address>
2780    </author>
2781    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2782      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2783      <address><email>timbl@w3.org</email></address>
2784    </author>
2785    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2786      <organization abbrev="W3C">World Wide Web Consortium</organization>
2787      <address><email>ylafon@w3.org</email></address>
2788    </author>
2789    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2790      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2791      <address><email>julian.reschke@greenbytes.de</email></address>
2792    </author>
2793    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2794  </front>
2795  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p7-auth-&ID-VERSION;"/>
2796  <x:source href="p7-auth.xml" basename="p7-auth"/>
2797</reference>
2798
2799<reference anchor="RFC2047">
2800  <front>
2801    <title abbrev="Message Header Extensions">MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text</title>
2802    <author initials="K." surname="Moore" fullname="Keith Moore">
2803      <organization>University of Tennessee</organization>
2804      <address><email>moore@cs.utk.edu</email></address>
2805    </author>
2806    <date month="November" year="1996"/>
2807  </front>
2808  <seriesInfo name="RFC" value="2047"/>
2809</reference>
2810
2811<reference anchor="RFC2119">
2812  <front>
2813    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
2814    <author initials="S." surname="Bradner" fullname="Scott Bradner">
2815      <organization>Harvard University</organization>
2816      <address><email>sob@harvard.edu</email></address>
2817    </author>
2818    <date month="March" year="1997"/>
2819  </front>
2820  <seriesInfo name="BCP" value="14"/>
2821  <seriesInfo name="RFC" value="2119"/>
2822</reference>
2823
2824<reference anchor="RFC5234">
2825  <front>
2826    <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
2827    <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
2828      <organization>Brandenburg InternetWorking</organization>
2829      <address>
2830      <postal>
2831      <street>675 Spruce Dr.</street>
2832      <city>Sunnyvale</city>
2833      <region>CA</region>
2834      <code>94086</code>
2835      <country>US</country></postal>
2836      <phone>+1.408.246.8253</phone>
2837      <email>dcrocker@bbiw.net</email></address> 
2838    </author>
2839    <author initials="P." surname="Overell" fullname="Paul Overell">
2840      <organization>THUS plc.</organization>
2841      <address>
2842      <postal>
2843      <street>1/2 Berkeley Square</street>
2844      <street>99 Berkely Street</street>
2845      <city>Glasgow</city>
2846      <code>G3 7HR</code>
2847      <country>UK</country></postal>
2848      <email>paul.overell@thus.net</email></address>
2849    </author>
2850    <date month="January" year="2008"/>
2851  </front>
2852  <seriesInfo name="STD" value="68"/>
2853  <seriesInfo name="RFC" value="5234"/>
2854</reference>
2855
2856</references>
2857
2858<references title="Informative References">
2859
2860<reference anchor="RFC1305">
2861  <front>
2862    <title>Network Time Protocol (Version 3) Specification, Implementation</title>
2863    <author initials="D." surname="Mills" fullname="David L. Mills">
2864      <organization>University of Delaware, Electrical Engineering Department</organization>
2865      <address><email>mills@udel.edu</email></address>
2866    </author>
2867    <date month="March" year="1992"/>
2868  </front>
2869  <seriesInfo name="RFC" value="1305"/>
2870</reference>
2871
2872<reference anchor="RFC2616">
2873  <front>
2874    <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
2875    <author initials="R." surname="Fielding" fullname="R. Fielding">
2876      <organization>University of California, Irvine</organization>
2877      <address><email>fielding@ics.uci.edu</email></address>
2878    </author>
2879    <author initials="J." surname="Gettys" fullname="J. Gettys">
2880      <organization>W3C</organization>
2881      <address><email>jg@w3.org</email></address>
2882    </author>
2883    <author initials="J." surname="Mogul" fullname="J. Mogul">
2884      <organization>Compaq Computer Corporation</organization>
2885      <address><email>mogul@wrl.dec.com</email></address>
2886    </author>
2887    <author initials="H." surname="Frystyk" fullname="H. Frystyk">
2888      <organization>MIT Laboratory for Computer Science</organization>
2889      <address><email>frystyk@w3.org</email></address>
2890    </author>
2891    <author initials="L." surname="Masinter" fullname="L. Masinter">
2892      <organization>Xerox Corporation</organization>
2893      <address><email>masinter@parc.xerox.com</email></address>
2894    </author>
2895    <author initials="P." surname="Leach" fullname="P. Leach">
2896      <organization>Microsoft Corporation</organization>
2897      <address><email>paulle@microsoft.com</email></address>
2898    </author>
2899    <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
2900      <organization>W3C</organization>
2901      <address><email>timbl@w3.org</email></address>
2902    </author>
2903    <date month="June" year="1999"/>
2904  </front>
2905  <seriesInfo name="RFC" value="2616"/>
2906</reference>
2907
2908<reference anchor='RFC3864'>
2909  <front>
2910    <title>Registration Procedures for Message Header Fields</title>
2911    <author initials='G.' surname='Klyne' fullname='G. Klyne'>
2912      <organization>Nine by Nine</organization>
2913      <address><email>GK-IETF@ninebynine.org</email></address>
2914    </author>
2915    <author initials='M.' surname='Nottingham' fullname='M. Nottingham'>
2916      <organization>BEA Systems</organization>
2917      <address><email>mnot@pobox.com</email></address>
2918    </author>
2919    <author initials='J.' surname='Mogul' fullname='J. Mogul'>
2920      <organization>HP Labs</organization>
2921      <address><email>JeffMogul@acm.org</email></address>
2922    </author>
2923    <date year='2004' month='September' />
2924  </front>
2925  <seriesInfo name='BCP' value='90' />
2926  <seriesInfo name='RFC' value='3864' />
2927</reference>
2928
2929</references>
2930
2931<section title="Compatibility with Previous Versions" anchor="compatibility">
2932
2933<section title="Changes from RFC 2068" anchor="changes.from.rfc.2068">
2934<t>
2935   A case was missed in the Cache-Control model of HTTP/1.1; s-maxage
2936   was introduced to add this missing case. (Sections <xref target="response.cacheability" format="counter"/>,
2937   <xref target="header.cache-control" format="counter"/>,
2938   <xref target="modifications.of.the.basic.expiration.mechanism" format="counter"/>)
2939</t>
2940<t>
2941   Transfer-coding and message lengths all interact in ways that
2942   required fixing exactly when chunked encoding is used (to allow for
2943   transfer encoding that may not be self delimiting); it was important
2944   to straighten out exactly how message lengths are computed.
2945   (<xref target="non-modifiable.headers"/>,
2946   see also <xref target="Part1"/>, <xref target="Part3"/> and <xref target="Part5"/>)
2947</t>
2948<t>
2949   Proxies should be able to add Content-Length when appropriate.
2950   (<xref target="non-modifiable.headers"/>)
2951</t>
2952<t>
2953   Range request responses would become very verbose if all meta-data
2954   were always returned; by allowing the server to only send needed
2955   headers in a 206 response, this problem can be avoided.
2956   (<xref target="combining.headers"/>)
2957</t>
2958<t>
2959   The Cache-Control: max-age directive was not properly defined for
2960   responses. (<xref target="modifications.of.the.basic.expiration.mechanism"/>)
2961</t>
2962<t>
2963   Warnings could be cached incorrectly, or not updated appropriately.
2964   (Section <xref target="warnings" format="counter"/>, <xref target="expiration.calculations" format="counter"/>, <xref target="non-modifiable.headers" format="counter"/>,
2965   <xref target="combining.headers" format="counter"/>, <xref target="modifications.of.the.basic.expiration.mechanism" format="counter"/>,
2966   and <xref target="header.warning" format="counter"/>) Warning
2967   also needed to be a general header, as PUT or other methods may have
2968   need for it in requests.
2969</t>
2970</section>
2971
2972<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
2973<t>
2974  Clarify denial of service attack avoidance requirement.
2975  (<xref target="invalidation.after.updates.or.deletions"/>)
2976</t>
2977</section>
2978
2979</section>
2980
2981<section xmlns:x="http://purl.org/net/xml2rfc/ext" title="Collected ABNF" anchor="collected.abnf">
2982<figure>
2983<artwork type="abnf" name="p6-cache.parsed-abnf">
2984<x:ref>Age</x:ref> = "Age:" OWS Age-v
2985<x:ref>Age-v</x:ref> = delta-seconds
2986
2987<x:ref>Cache-Control</x:ref> = "Cache-Control:" OWS Cache-Control-v
2988<x:ref>Cache-Control-v</x:ref> = *( "," OWS ) cache-directive *( OWS "," [ OWS
2989 cache-directive ] )
2990
2991<x:ref>Expires</x:ref> = "Expires:" OWS Expires-v
2992<x:ref>Expires-v</x:ref> = HTTP-date
2993
2994<x:ref>HTTP-date</x:ref> = &lt;HTTP-date, defined in [Part1], Section 3.2.1&gt;
2995
2996<x:ref>OWS</x:ref> = &lt;OWS, defined in [Part1], Section 1.2.2&gt;
2997
2998<x:ref>Pragma</x:ref> = "Pragma:" OWS Pragma-v
2999<x:ref>Pragma-v</x:ref> = *( "," OWS ) pragma-directive *( OWS "," [ OWS
3000 pragma-directive ] )
3001
3002<x:ref>Vary</x:ref> = "Vary:" OWS Vary-v
3003<x:ref>Vary-v</x:ref> = "*" / ( *( "," OWS ) field-name *( OWS "," [ OWS field-name
3004 ] ) )
3005
3006<x:ref>Warning</x:ref> = "Warning:" OWS Warning-v
3007<x:ref>Warning-v</x:ref> = *( "," OWS ) warning-value *( OWS "," [ OWS warning-value
3008 ] )
3009
3010<x:ref>cache-directive</x:ref> = cache-request-directive / cache-response-directive
3011<x:ref>cache-extension</x:ref> = token [ "=" ( token / quoted-string ) ]
3012<x:ref>cache-request-directive</x:ref> = "no-cache" / "no-store" / ( "max-age="
3013 delta-seconds ) / ( "max-stale" [ "=" delta-seconds ] ) / (
3014 "min-fresh=" delta-seconds ) / "no-transform" / "only-if-cached" /
3015 cache-extension
3016<x:ref>cache-response-directive</x:ref> = "public" / ( "private" [ "=" DQUOTE *( ","
3017 OWS ) field-name *( OWS "," [ OWS field-name ] ) DQUOTE ] ) / (
3018 "no-cache" [ "=" DQUOTE *( "," OWS ) field-name *( OWS "," [ OWS
3019 field-name ] ) DQUOTE ] ) / "no-store" / "no-transform" /
3020 "must-revalidate" / "proxy-revalidate" / ( "max-age=" delta-seconds
3021 ) / ( "s-maxage=" delta-seconds ) / cache-extension
3022
3023<x:ref>delta-seconds</x:ref> = 1*DIGIT
3024
3025<x:ref>extension-pragma</x:ref> = token [ "=" ( token / quoted-string ) ]
3026
3027<x:ref>field-name</x:ref> = &lt;field-name, defined in [Part1], Section 4.2&gt;
3028
3029<x:ref>port</x:ref> = &lt;port, defined in [Part1], Section 2.1&gt;
3030<x:ref>pragma-directive</x:ref> = "no-cache" / extension-pragma
3031<x:ref>pseudonym</x:ref> = &lt;pseudonym, defined in [Part1], Section 8.9&gt;
3032
3033<x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in [Part1], Section 1.2.2&gt;
3034
3035<x:ref>token</x:ref> = &lt;token, defined in [Part1], Section 1.2.2&gt;
3036
3037<x:ref>uri-host</x:ref> = &lt;uri-host, defined in [Part1], Section 2.1&gt;
3038
3039<x:ref>warn-agent</x:ref> = ( uri-host [ ":" port ] ) / pseudonym
3040<x:ref>warn-code</x:ref> = 3DIGIT
3041<x:ref>warn-date</x:ref> = DQUOTE HTTP-date DQUOTE
3042<x:ref>warn-text</x:ref> = quoted-string
3043<x:ref>warning-value</x:ref> = warn-code SP warn-agent SP warn-text [ SP warn-date
3044 ]
3045
3046; Age defined but not used
3047; Cache-Control defined but not used
3048; Expires defined but not used
3049; Pragma defined but not used
3050; Vary defined but not used
3051; Warning defined but not used
3052
3053
3054</artwork>
3055</figure>
3056</section>
3057
3058<section title="Change Log (to be removed by RFC Editor before publication)" anchor="change.log">
3059
3060<section title="Since RFC2616">
3061<t>
3062  Extracted relevant partitions from <xref target="RFC2616"/>.
3063</t>
3064</section>
3065
3066<section title="Since draft-ietf-httpbis-p6-cache-00">
3067<t>
3068  Closed issues:
3069  <list style="symbols"> 
3070    <t>
3071      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/9"/>:
3072      "Trailer"
3073      (<eref target="http://purl.org/NET/http-errata#trailer-hop"/>)
3074    </t>
3075    <t>
3076      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/12"/>:
3077      "Invalidation after Update or Delete"
3078      (<eref target="http://purl.org/NET/http-errata#invalidupd"/>)
3079    </t>
3080    <t>
3081      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/35"/>:
3082      "Normative and Informative references"
3083    </t>
3084    <t>
3085      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/48"/>:
3086      "Date reference typo"
3087    </t>
3088    <t>
3089      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/49"/>:
3090      "Connection header text"
3091    </t>
3092    <t>
3093      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/65"/>:
3094      "Informative references"
3095    </t>
3096    <t>
3097      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/66"/>:
3098      "ISO-8859-1 Reference"
3099    </t>
3100    <t>
3101      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/86"/>:
3102      "Normative up-to-date references"
3103    </t>
3104    <t>
3105      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/87"/>:
3106      "typo in 13.2.2"
3107    </t>
3108  </list>
3109</t>
3110<t>
3111  Other changes:
3112  <list style="symbols"> 
3113    <t>
3114      Use names of RFC4234 core rule DQUOTE (work in progress on <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>)
3115    </t>
3116  </list>
3117</t>
3118</section>
3119
3120<section title="Since draft-ietf-httpbis-p6-cache-01">
3121<t>
3122  Closed issues:
3123  <list style="symbols"> 
3124    <t>
3125      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/82"/>:
3126      "rel_path not used"
3127    </t>
3128  </list>
3129</t>
3130<t>
3131  Other changes:
3132  <list style="symbols"> 
3133    <t>
3134       Get rid of duplicate BNF rule names ("host" -> "uri-host")
3135       (work in progress on <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>)
3136    </t>
3137    <t>
3138      Add explicit references to BNF syntax and rules imported from other parts of the specification.
3139    </t>
3140  </list>
3141</t>
3142</section>
3143
3144<section title="Since draft-ietf-httpbis-p6-cache-02" anchor="changes.since.02">
3145<t>
3146  Ongoing work on IANA Message Header Registration (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/40"/>):
3147  <list style="symbols"> 
3148    <t>
3149      Reference RFC 3984, and update header registrations for headers defined
3150      in this document.
3151    </t>
3152  </list>
3153</t>
3154</section>
3155
3156<section title="Since draft-ietf-httpbis-p6-cache-03" anchor="changes.since.03">
3157<t>
3158  Closed issues:
3159  <list style="symbols"> 
3160    <t>
3161      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/106"/>:
3162      "Vary header classification"
3163    </t>
3164  </list>
3165</t>
3166</section>
3167
3168<section title="Since draft-ietf-httpbis-p6-cache-04" anchor="changes.since.04">
3169<t>
3170  Ongoing work on ABNF conversion (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>):
3171  <list style="symbols"> 
3172    <t>
3173      Use "/" instead of "|" for alternatives.
3174    </t>
3175    <t>
3176      Introduce new ABNF rules for "bad" whitespace ("BWS"), optional
3177      whitespace ("OWS") and required whitespace ("RWS").
3178    </t>
3179    <t>
3180      Rewrite ABNFs to spell out whitespace rules, factor out
3181      header value format definitions.
3182    </t>
3183  </list>
3184</t>
3185</section>
3186
3187<section title="Since draft-ietf-httpbis-p6-cache-05" anchor="changes.since.05">
3188<t>
3189  Ongoing work on ABNF conversion (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>):
3190  <list style="symbols"> 
3191    <t>
3192      Add appendix containing collected and expanded ABNF, reorganize ABNF introduction.
3193    </t>
3194  </list>
3195</t>
3196</section>
3197
3198</section>
3199
3200</back>
3201</rfc>
Note: See TracBrowser for help on using the repository browser.