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

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

Resolve #34: update to current URI spec, get rid of discussion of URI history (closes #34)

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