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

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

Trim index.

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/xml
File size: 105.9 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<?xml-stylesheet type='text/xsl' href='../myxml2rfc.xslt'?>
3<!DOCTYPE rfc [
4  <!ENTITY MAY "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MAY</bcp14>">
5  <!ENTITY MUST "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST</bcp14>">
6  <!ENTITY MUST-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST NOT</bcp14>">
7  <!ENTITY OPTIONAL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>OPTIONAL</bcp14>">
8  <!ENTITY RECOMMENDED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>RECOMMENDED</bcp14>">
9  <!ENTITY REQUIRED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>REQUIRED</bcp14>">
10  <!ENTITY SHALL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL</bcp14>">
11  <!ENTITY SHALL-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL NOT</bcp14>">
12  <!ENTITY SHOULD "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD</bcp14>">
13  <!ENTITY SHOULD-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD NOT</bcp14>">
14  <!ENTITY ID-VERSION "latest">
15  <!ENTITY ID-MONTH "September">
16  <!ENTITY ID-YEAR "2012">
17  <!ENTITY mdash "&#8212;">
18  <!ENTITY Note "<x:h xmlns:x='http://purl.org/net/xml2rfc/ext'>Note:</x:h>">
19  <!ENTITY architecture                "<xref target='Part1' x:rel='#architecture' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
20  <!ENTITY conformance                 "<xref target='Part1' x:rel='#conformance' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
21  <!ENTITY notation                    "<xref target='Part1' x:rel='#notation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
22  <!ENTITY acks                        "<xref target='Part1' x:rel='#acks' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
23  <!ENTITY whitespace                  "<xref target='Part1' x:rel='#whitespace' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
24  <!ENTITY field-components            "<xref target='Part1' x:rel='#field.components' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
25  <!ENTITY uri                         "<xref target='Part1' x:rel='#uri' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
26  <!ENTITY effective-request-uri       "<xref target='Part1' x:rel='#effective.request.uri' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
27  <!ENTITY messaging                   "<xref target='Part1' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
28  <!ENTITY semantics                   "<xref target='Part2' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
29  <!ENTITY conditional                 "<xref target='Part4' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
30  <!ENTITY partial                     "<xref target='Part5' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
31  <!ENTITY combining-byte-ranges       "<xref target='Part5' x:rel='#combining.byte.ranges' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
32  <!ENTITY http-date                   "<xref target='Part2' x:rel='#http.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
33  <!ENTITY header-authorization        "<xref target='Part7' x:rel='#header.authorization' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
34  <!ENTITY header-connection           "<xref target='Part1' x:rel='#header.connection' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
35  <!ENTITY header-date                 "<xref target='Part2' x:rel='#header.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
36  <!ENTITY header-last-modified        "<xref target='Part4' x:rel='#header.last-modified' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
37  <!ENTITY header-vary                 "<xref target='Part2' x:rel='#header.vary' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
38  <!ENTITY header-via                  "<xref target='Part1' x:rel='#header.via' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
39  <!ENTITY header-fields               "<xref target='Part1' x:rel='#header.fields' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
40  <!ENTITY safe-methods                "<xref target='Part2' x:rel='#safe.methods' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
41  <!ENTITY entity-tags                 "<xref target='Part4' x:rel='#header.etag' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
42  <!ENTITY weak-and-strong             "<xref target='Part4' x:rel='#weak.and.strong.validators' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
43  <!ENTITY lastmod-comparison          "<xref target='Part4' x:rel='#lastmod.comparison' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
44  <!ENTITY status-codes                "<xref target='Part2' x:rel='#status.codes' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
45  <!ENTITY status.2xx                  "<xref target='Part2' x:rel='#status.2xx' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
46]>
47<?rfc toc="yes" ?>
48<?rfc symrefs="yes" ?>
49<?rfc sortrefs="yes" ?>
50<?rfc compact="yes"?>
51<?rfc subcompact="no" ?>
52<?rfc linkmailto="no" ?>
53<?rfc editing="no" ?>
54<?rfc comments="yes"?>
55<?rfc inline="yes"?>
56<?rfc rfcedstyle="yes"?>
57<?rfc-ext allow-markup-in-artwork="yes" ?>
58<?rfc-ext include-references-in-index="yes" ?>
59<rfc category="std" docName="draft-ietf-httpbis-p6-cache-&ID-VERSION;" ipr="pre5378Trust200902"
60  obsoletes="2616" x:maturity-level="proposed" xmlns:x="http://purl.org/net/xml2rfc/ext">
61<x:link rel="prev" basename="p5-range"/>
62<x:link rel="next" basename="p7-auth"/>
63<x:feedback template="mailto:ietf-http-wg@w3.org?subject={docname},%20%22{section}%22&amp;body=&lt;{ref}&gt;:"/>
64<front>
65
66  <title abbrev="HTTP/1.1 Caching">Hypertext Transfer Protocol (HTTP/1.1): Caching</title>
67
68  <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
69    <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
70    <address>
71      <postal>
72        <street>345 Park Ave</street>
73        <city>San Jose</city>
74        <region>CA</region>
75        <code>95110</code>
76        <country>USA</country>
77      </postal>
78      <email>fielding@gbiv.com</email>
79      <uri>http://roy.gbiv.com/</uri>
80    </address>
81  </author>
82
83  <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
84    <organization abbrev="W3C">World Wide Web Consortium</organization>
85    <address>
86      <postal>
87        <street>W3C / ERCIM</street>
88        <street>2004, rte des Lucioles</street>
89        <city>Sophia-Antipolis</city>
90        <region>AM</region>
91        <code>06902</code>
92        <country>France</country>
93      </postal>
94      <email>ylafon@w3.org</email>
95      <uri>http://www.raubacapeu.net/people/yves/</uri>
96    </address>
97  </author>
98
99  <author fullname="Mark Nottingham" initials="M." role="editor" surname="Nottingham">
100    <address>
101      <email>mnot@mnot.net</email>
102      <uri>http://www.mnot.net/</uri>
103    </address>
104  </author>
105
106  <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
107    <organization abbrev="greenbytes">greenbytes GmbH</organization>
108    <address>
109      <postal>
110        <street>Hafenweg 16</street>
111        <city>Muenster</city><region>NW</region><code>48155</code>
112        <country>Germany</country>
113      </postal>
114      <email>julian.reschke@greenbytes.de</email>
115      <uri>http://greenbytes.de/tech/webdav/</uri>
116    </address>
117  </author>
118
119  <date month="&ID-MONTH;" year="&ID-YEAR;" />
120  <workgroup>HTTPbis Working Group</workgroup>
121
122<abstract>
123<t>
124   The Hypertext Transfer Protocol (HTTP) is an application-level protocol for
125   distributed, collaborative, hypertext information systems. This document
126   defines requirements on HTTP caches and the associated header fields
127   that control cache behavior or indicate cacheable response messages.
128</t>
129</abstract>
130
131<note title="Editorial Note (To be removed by RFC Editor)">
132  <t>
133    Discussion of this draft takes place on the HTTPBIS working group
134    mailing list (ietf-http-wg@w3.org), which is archived at
135    <eref target="http://lists.w3.org/Archives/Public/ietf-http-wg/"/>.
136  </t>
137  <t>
138    The current issues list is at
139    <eref target="http://tools.ietf.org/wg/httpbis/trac/report/3"/> and related
140    documents (including fancy diffs) can be found at
141    <eref target="http://tools.ietf.org/wg/httpbis/"/>.
142  </t>
143  <t>
144    The changes in this draft are summarized in <xref target="changes.since.20"/>.
145  </t>
146</note>
147
148   </front>
149   <middle>
150
151<section anchor="caching" title="Introduction">
152<t>
153   HTTP is typically used for distributed information systems, where
154   performance can be improved by the use of response caches. This document
155   defines aspects of HTTP/1.1 related to caching and reusing response
156   messages.
157</t>
158
159<section anchor="intro.purpose" title="Purpose">
160<iref item="cache" />
161<t>
162   An HTTP <x:dfn>cache</x:dfn> is a local store of response messages and the
163   subsystem that controls its message storage, retrieval, and deletion. A
164   cache stores cacheable responses in order to reduce the response time and
165   network bandwidth consumption on future, equivalent requests. Any client or
166   server &MAY; employ a cache, though a cache cannot be used by a server that
167   is acting as a tunnel.
168</t>
169<t>
170   The goal of caching in HTTP/1.1 is to significantly improve performance
171   by reusing a prior response message to satisfy a current request.
172   A stored response is considered "fresh", as defined in
173   <xref target="expiration.model" />, if the response can be reused without
174   "validation" (checking with the origin server to see if the cached response
175   remains valid for this request).  A fresh cache response can therefore
176   reduce both latency and network transfers each time it is reused.
177   When a cached response is not fresh, it might still be reusable if it can
178   be freshened by validation (<xref target="validation.model" />) or if the
179   origin is unavailable.
180</t>
181</section>
182
183<section anchor="intro.terminology" title="Terminology">
184<t>
185   This specification uses a number of terms to refer to the roles played by
186   participants in, and objects of, HTTP caching.
187</t>
188<t>
189   <iref item="cache" />
190   <x:dfn>cache</x:dfn>
191   <list>
192      <t>A conformant implementation of a HTTP cache. Note that this implies
193        an HTTP/1.1 cache; this specification does not define conformance
194        for HTTP/1.0 caches.</t>
195   </list>
196</t>
197<t anchor="shared.and.non-shared.caches">
198   <iref item="shared cache" />
199   <x:dfn>shared cache</x:dfn>
200   <list>
201      <t>A cache that stores responses to be reused by more than one user;
202         usually (but not always) deployed as part of an intermediary.</t>
203   </list>
204</t>
205<t>
206   <iref item="private cache" />
207   <x:dfn>private cache</x:dfn>
208   <list>
209      <t>A cache that is dedicated to a single user.</t>
210   </list>
211</t>
212<t>
213   <iref item="cacheable" />
214   <x:dfn>cacheable</x:dfn>
215   <list>
216      <t>A response is cacheable if a cache is allowed to store a copy of the
217      response message for use in answering subsequent requests. Even when a
218      response is cacheable, there might be additional constraints on whether
219      a cache can use the stored copy to satisfy a particular request.</t>
220   </list>
221</t>
222<t>
223   <iref item="explicit expiration time" />
224   <x:dfn>explicit expiration time</x:dfn>
225   <list>
226      <t>The time at which the origin server intends that a representation
227      no longer be returned by a cache without further validation.</t>
228   </list>
229</t>
230<t>
231   <iref item="heuristic expiration time" />
232   <x:dfn>heuristic expiration time</x:dfn>
233   <list>
234      <t>An expiration time assigned by a cache when no explicit expiration
235      time is available.</t>
236   </list>
237</t>
238<t>
239   <iref item="age" />
240   <x:dfn>age</x:dfn>
241   <list>
242      <t>The age of a response is the time since it was sent by, or
243      successfully validated with, the origin server.</t>
244   </list>
245</t>
246<t>
247   <iref item="first-hand" />
248   <x:dfn>first-hand</x:dfn>
249   <list>
250      <t>A response is first-hand if the freshness model is not in use; i.e.,
251      its age is 0.</t>
252   </list>
253</t>
254<t>
255   <iref item="freshness lifetime" />
256   <x:dfn>freshness lifetime</x:dfn>
257   <list>
258      <t>The length of time between the generation of a response and its
259      expiration time.</t>
260   </list>
261</t>
262<t>
263   <iref item="fresh" />
264   <x:dfn>fresh</x:dfn>
265   <list>
266      <t>A response is fresh if its age has not yet exceeded its freshness
267      lifetime.</t>
268   </list>
269</t>
270<t>
271   <iref item="stale" />
272   <x:dfn>stale</x:dfn>
273   <list>
274      <t>A response is stale if its age has passed its freshness lifetime
275      (either explicit or heuristic).</t>
276   </list>
277</t>
278<t>
279   <iref item="validator" />
280   <x:dfn>validator</x:dfn>
281   <list>
282      <t>A protocol element (e.g., an entity-tag or a <x:ref>Last-Modified</x:ref>
283      time) that is used to find out whether a stored response is an equivalent
284      copy of a representation. See &weak-and-strong;.</t>
285   </list>
286</t>
287<t>
288   <iref item="strong validator" />
289   <iref item="validator" subitem="strong" />
290   <x:dfn>strong validator</x:dfn>
291   <list>
292      <t>A validator that is defined by the origin server such that its
293         current value will change if the representation body changes; i.e.,
294         an entity-tag that is not marked as weak (&entity-tags;) or,
295         if no entity-tag is provided, a <x:ref>Last-Modified</x:ref> value
296         that is strong in the sense defined by &lastmod-comparison;.</t>
297   </list>
298</t>
299</section>
300
301<section title="Conformance and Error Handling" anchor="conformance">
302<t>
303   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
304   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
305   document are to be interpreted as described in <xref target="RFC2119"/>.
306</t>
307<t>
308   Conformance criteria and considerations regarding error handling
309   are defined in &conformance;.
310</t>
311</section>
312
313<section title="Syntax Notation" anchor="notation">
314<t>
315   This specification uses the Augmented Backus-Naur Form (ABNF) notation
316   of <xref target="RFC5234"/> with the list rule extension defined in
317   &notation;. <xref target="imported.abnf"/> describes rules imported from
318   other documents. <xref target="collected.abnf"/> shows the collected ABNF
319   with the list rule expanded.
320</t>
321
322<section title="Delta Seconds" anchor="delta-seconds">
323<t>
324   The delta-seconds rule specifies a non-negative integer, representing time
325   in seconds.
326</t>
327<figure><artwork type="abnf2616"><iref item="Grammar" primary="true" subitem="delta-seconds" />
328  <x:ref>delta-seconds</x:ref>  = 1*<x:ref>DIGIT</x:ref>
329</artwork></figure>
330<t>
331   If an implementation receives a delta-seconds value larger than the largest
332   positive integer it can represent, or if any of its subsequent calculations
333   overflows, it &MUST; consider the value to be 2147483648
334   (2<x:sup>31</x:sup>). Recipients parsing a delta-seconds value &MUST; use
335   an arithmetic type of at least 31 bits of range, and senders &MUST-NOT;
336   send delta-seconds with a value greater than 2147483648.
337</t>
338</section>
339
340</section>
341</section>
342
343<section anchor="caching.overview" title="Overview of Cache Operation">
344<iref item="cache entry" />
345<iref item="cache key" />
346<t>
347   Proper cache operation preserves the semantics of HTTP transfers
348   (&semantics;) while eliminating the transfer of information already held
349   in the cache.  Although caching is an entirely &OPTIONAL; feature of HTTP,
350   we assume that reusing the cached response is desirable and that such
351   reuse is the default behavior when no requirement or locally-desired
352   configuration prevents it.  Therefore, HTTP cache requirements are focused
353   on preventing a cache from either storing a non-reusable response or
354   reusing a stored response inappropriately.
355</t>
356<t>
357   Each <x:dfn>cache entry</x:dfn> consists of a cache key and one or more
358   HTTP responses corresponding to prior requests that used the same key. The
359   most common form of cache entry is a successful result of a retrieval
360   request: i.e., a <x:ref>200 (OK)</x:ref> response containing a
361   representation of the resource identified by the request target. However,
362   it is also possible to cache negative results (e.g., <x:ref>404 (Not
363   Found)</x:ref>, incomplete results (e.g., <x:ref>206 (Partial
364   Content)</x:ref>), and responses to methods other than GET if the method's
365   definition allows such caching and defines something suitable for use as a
366   cache key.
367</t>
368<t>
369   The default <x:dfn>cache key</x:dfn> consists of the request method and
370   target URI.  However, since HTTP caches in common use today are typically
371   limited to caching responses to GET, many implementations simply decline
372   other methods and use only the URI as the key.
373</t>
374<t>
375   If a request target is subject to content negotiation, its cache entry
376   might consist of multiple stored responses, each differentiated by a
377   secondary key for the values of the original request's selecting header
378   fields (<xref target="caching.negotiated.responses"/>).
379</t>
380</section>
381
382<section anchor="response.cacheability" title="Storing Responses in Caches">
383<t>
384   A cache &MUST-NOT; store a response to any request, unless:
385   <list style="symbols">
386      <t>The request method is understood by the cache and defined as being
387      cacheable, and</t>
388      <t>the response status code is understood by the cache, and</t>
389      <t>the "no-store" cache directive (see <xref
390      target="header.cache-control" />) does not appear in request or response
391      header fields, and</t>
392      <t>the "private" cache response directive (see <xref
393      target="cache-response-directive.private" />) does not appear in the
394      response, if the cache is shared, and</t>
395      <t>the <x:ref>Authorization</x:ref> header field (see
396      &header-authorization;) does not appear in the request, if the cache is
397      shared, unless the response explicitly allows it (see <xref
398      target="caching.authenticated.responses" />), and</t>
399      <t>the response either:
400         <list style="symbols">
401            <t>contains an <x:ref>Expires</x:ref> header field (see
402            <xref target="header.expires"/>), or</t>
403            <t>contains a max-age response cache directive (see <xref
404            target="cache-response-directive.max-age" />), or</t>
405            <t>contains a s-maxage response cache directive and the cache is
406            shared, or</t>
407            <t>contains a Cache Control Extension (see <xref
408            target="cache.control.extensions" />) that allows it to be cached,
409            or</t>
410            <t>has a status code that can be served with heuristic freshness
411            (see <xref target="heuristic.freshness" />).</t>
412         </list>
413      </t>
414   </list>
415</t>
416<t>
417   Note that any of the requirements listed above can be overridden by a
418   cache-control extension; see <xref target="cache.control.extensions" />.
419</t>
420<t>
421   In this context, a cache has "understood" a request method or a response
422   status code if it recognizes it and implements any cache-specific
423   behavior.
424</t>
425<t>
426   Note that, in normal operation, many caches will not store a response that
427   has neither a cache validator nor an explicit expiration time, as such
428   responses are not usually useful to store. However, caches are not
429   prohibited from storing such responses.
430</t>
431
432<section anchor="incomplete.responses" title="Storing Incomplete Responses">
433<t>
434   A response message is considered complete when all of the octets indicated
435   by the message framing (&messaging;) are received prior to the connection
436   being closed. If the request is GET, the response status is <x:ref>200
437   (OK)</x:ref>, and the entire response header block has been received, a
438   cache &MAY; store an incomplete response message body if the cache entry is
439   recorded as incomplete. Likewise, a <x:ref>206 (Partial Content)</x:ref>
440   response &MAY; be stored as if it were an incomplete <x:ref>200
441   (OK)</x:ref> cache entry. However, a cache &MUST-NOT; store incomplete or
442   partial content responses if it does not support the <x:ref>Range</x:ref>
443   and <x:ref>Content-Range</x:ref> header fields or if it does not understand
444   the range units used in those fields.
445</t>
446<t>
447   A cache &MAY; complete a stored incomplete response by making a subsequent
448   range request (&partial;) and combining the successful response with the
449   stored entry, as defined in <xref target="combining.responses"/>. A cache
450   &MUST-NOT; use an incomplete response to answer requests unless the
451   response has been made complete or the request is partial and specifies a
452   range that is wholly within the incomplete response. A cache &MUST-NOT;
453   send a partial response to a client without explicitly marking it as such
454   using the <x:ref>206 (Partial Content)</x:ref> status code.
455</t>
456</section>
457
458
459<section anchor="caching.authenticated.responses" 
460   title="Storing Responses to Authenticated Requests">
461<t>
462   A shared cache &MUST-NOT; use a cached response to a request with an
463   <x:ref>Authorization</x:ref> header field (&header-authorization;) to
464   satisfy any subsequent request unless a cache directive that allows such
465   responses to be stored is present in the response.
466</t>
467<t>
468   In this specification, the following <x:ref>Cache-Control</x:ref> response
469   directives (<xref target="cache-response-directive"/>) have such an effect:
470   must-revalidate, public, s-maxage.
471</t>
472<t>
473   Note that cached responses that contain the "must-revalidate" and/or
474   "s-maxage" response directives are not allowed to be served stale (<xref
475   target="serving.stale.responses"/>) by shared caches. In particular, a
476   response with either "max-age=0, must-revalidate" or "s-maxage=0" cannot be
477   used to satisfy a subsequent request without revalidating it on the origin
478   server.
479</t>
480</section>
481</section>
482
483
484<section anchor="constructing.responses.from.caches" 
485   title="Constructing Responses from Caches">
486<t>
487   For a presented request, a cache &MUST-NOT; return a stored response,
488   unless:
489   <list style="symbols">
490      <t>The presented effective request URI (&effective-request-uri;) and
491      that of the stored response match, and</t>
492      <t>the request method associated with the stored response allows it to
493      be used for the presented request, and</t>
494      <t>selecting header fields nominated by the stored response (if any)
495      match those presented (see <xref target="caching.negotiated.responses"
496      />), and</t>
497      <t>the presented request does not contain the no-cache pragma (<xref
498      target="header.pragma"/>), nor the no-cache cache directive (<xref
499      target="cache-request-directive"/>), unless the stored response is
500      successfully validated (<xref target="validation.model"/>), and</t>
501      <t>the stored response does not contain the no-cache cache directive
502      (<xref target="cache-response-directive.no-cache"/>), unless it is
503      successfully validated (<xref target="validation.model"/>), and</t>
504      <t>the stored response is either:
505         <list style="symbols">
506            <t>fresh (see <xref target="expiration.model" />), or</t>
507            <t>allowed to be served stale (see <xref
508            target="serving.stale.responses" />), or</t>
509            <t>successfully validated (see <xref target="validation.model"
510            />).</t>
511         </list>
512      </t>
513  </list>
514</t>
515<t>
516   Note that any of the requirements listed above can be overridden by a
517   cache-control extension; see <xref target="cache.control.extensions" />.
518</t>
519<t>
520   When a stored response is used to satisfy a request without validation,
521   a cache &MUST; include a single <x:ref>Age</x:ref> header field
522   (<xref target="header.age"/>) in the response with a value equal to the
523   stored response's current_age; see <xref target="age.calculations" />.
524</t>
525<t>
526   A cache &MUST; write through requests with methods that are unsafe
527   (&safe-methods;) to the origin server; i.e., a cache is not allowed to
528   generate a reply to such a request before having forwarded the request and
529   having received a corresponding response.
530</t>
531<t>
532   Also, note that unsafe requests might invalidate already stored responses;
533   see <xref target="invalidation.after.updates.or.deletions" />.
534</t>
535<t>
536   When more than one suitable response is stored, a cache &MUST; use the
537   most recent response (as determined by the <x:ref>Date</x:ref> header
538   field). It can also forward a request with "Cache-Control: max-age=0" or
539   "Cache-Control: no-cache" to disambiguate which response to use.
540</t>
541<t>
542   A cache that does not have a clock available &MUST-NOT; use stored
543   responses without revalidating them on every use. A cache, especially a
544   shared cache, &SHOULD; use a mechanism, such as NTP <xref
545   target="RFC1305"/>, to synchronize its clock with a reliable external
546   standard.
547</t>
548
549
550<section anchor="expiration.model" title="Freshness Model">
551<t>
552   When a response is "fresh" in the cache, it can be used to satisfy
553   subsequent requests without contacting the origin server, thereby improving
554   efficiency.
555</t>
556<t>
557   The primary mechanism for determining freshness is for an origin server to
558   provide an explicit expiration time in the future, using either the
559   <x:ref>Expires</x:ref> header field (<xref target="header.expires" />) or
560   the max-age response cache directive (<xref
561   target="cache-response-directive.max-age" />). Generally, origin servers will
562   assign future explicit expiration times to responses in the belief that the
563   representation is not likely to change in a semantically significant way
564   before the expiration time is reached.
565</t>
566<t>
567   If an origin server wishes to force a cache to validate every request, it
568   can assign an explicit expiration time in the past to indicate that the
569   response is already stale. Compliant caches will normally validate the
570   cached response before reusing it for subsequent requests (see <xref
571   target="serving.stale.responses" />).
572</t>
573<t>
574   Since origin servers do not always provide explicit expiration times, a
575   cache &MAY; assign a heuristic expiration time when an explicit time is not
576   specified, employing algorithms that use other header field values (such as
577   the <x:ref>Last-Modified</x:ref> time) to estimate a plausible expiration
578   time. This specification does not provide specific algorithms, but does
579   impose worst-case constraints on their results.
580</t>
581<figure>
582<preamble>
583  The calculation to determine if a response is fresh is:
584</preamble>
585<artwork type="code">
586   response_is_fresh = (freshness_lifetime &gt; current_age)
587</artwork>
588</figure>
589<t>
590   The freshness_lifetime is defined in <xref
591   target="calculating.freshness.lifetime" />; the current_age is defined in
592   <xref target="age.calculations" />.
593</t>
594<t>
595   Additionally, clients can influence freshness calculation &mdash; either
596   constraining it relaxing it &mdash; by using the max-age and min-fresh
597   request cache directives. See <xref target="cache-request-directive" /> 
598   for details.
599</t>
600<t>
601   Note that freshness applies only to cache operation; it cannot be used to
602   force a user agent to refresh its display or reload a resource. See <xref
603   target="history.lists" /> for an explanation of the difference between
604   caches and history mechanisms.
605</t>
606
607<section anchor="calculating.freshness.lifetime" 
608   title="Calculating Freshness Lifetime">
609<t>
610   A cache can calculate the freshness lifetime (denoted as
611   freshness_lifetime) of a response by using the first match of:
612   <list style="symbols">
613      <t>If the cache is shared and the s-maxage response cache directive
614      (<xref target="cache-response-directive.s-maxage" />) is present, use its value,
615      or</t>
616      <t>If the max-age response cache directive (<xref
617      target="cache-response-directive.max-age" />) is present, use its value, or</t>
618      <t>If the <x:ref>Expires</x:ref> response header field
619      (<xref target="header.expires" />) is present, use its value minus the
620      value of the <x:ref>Date</x:ref> response header field, or</t>
621      <t>Otherwise, no explicit expiration time is present in the response. A
622      heuristic freshness lifetime might be applicable; see <xref
623      target="heuristic.freshness" />.</t>
624   </list>
625</t>
626<t>
627   Note that this calculation is not vulnerable to clock skew, since all of
628   the information comes from the origin server.
629</t>
630<t>
631   When there is more than one value present for a given directive (e.g., two
632   <x:ref>Expires</x:ref> header fields, multiple Cache-Control: max-age
633   directives), it is considered invalid. Caches are encouraged to consider
634   responses that have invalid freshness information to be stale.
635</t>
636</section>
637
638<section anchor="heuristic.freshness" title="Calculating Heuristic Freshness">
639<t>
640   If no explicit expiration time is present in a stored response that has a
641   status code whose definition allows heuristic freshness to be used
642   (including the following in &status-codes;: <x:ref>200 (OK)</x:ref>,
643   <x:ref>203 (Non-Authoritative Information)</x:ref>, <x:ref>206 (Partial
644   Content)</x:ref>, <x:ref>300 (Multiple Choices)</x:ref>, <x:ref>301 (Moved
645   Permanently)</x:ref> and <x:ref>410 (Gone)</x:ref>), a cache &MAY;
646   calculate a heuristic expiration time. A cache &MUST-NOT; use heuristics to
647   determine freshness for responses with status codes that do not explicitly
648   allow it.
649</t>
650<t>
651   When a heuristic is used to calculate freshness lifetime, a cache &SHOULD;
652   attach a <x:ref>Warning</x:ref> header field with a 113 warn-code to the
653   response if its current_age is more than 24 hours and such a warning is not
654   already present.
655</t>
656<t>
657   Also, if the response has a <x:ref>Last-Modified</x:ref> header field
658   (&header-last-modified;), caches are encouraged to use a heuristic
659   expiration value that is no more than some fraction of the interval since
660   that time. A typical setting of this fraction might be 10%.
661</t>
662<x:note>
663   <t>
664      &Note; <xref target="RFC2616" x:fmt="of" x:sec="13.9"/> prohibited caches
665      from calculating heuristic freshness for URIs with query components
666      (i.e., those containing '?'). In practice, this has not been widely
667      implemented. Therefore, servers are encouraged to send explicit
668      directives (e.g., Cache-Control: no-cache) if they wish to preclude
669      caching.
670   </t>
671</x:note>
672</section>
673
674<section anchor="age.calculations" title="Calculating Age">
675<t>
676   HTTP/1.1 uses the <x:ref>Age</x:ref> header field to convey the estimated
677   age of the response message when obtained from a cache. The Age field value
678   is the cache's estimate of the amount of time since the response was
679   generated or validated by the origin server. In essence, the Age value is
680   the sum of the time that the response has been resident in each of the
681   caches along the path from the origin server, plus the amount of time it
682   has been in transit along network paths.
683</t>
684<t>
685   The following data is used for the age calculation:
686</t>
687<t>
688   <x:dfn>age_value</x:dfn>
689   <list>
690      <t>
691         The term "age_value" denotes the value of the <x:ref>Age</x:ref>
692         header field (<xref target="header.age"/>), in a form appropriate for
693         arithmetic operation; or 0, if not available.
694      </t>
695   </list>
696</t>
697<t>
698   <x:dfn>date_value</x:dfn>
699   <list>
700      <t>
701         HTTP/1.1 requires origin servers to send a <x:ref>Date</x:ref> header
702         field, if possible, with every response, giving the time at which the
703         response was generated. The term "date_value" denotes the value of
704         the Date header field, in a form appropriate for arithmetic
705         operations. See &header-date; for the definition of the Date header
706         field, and for requirements regarding responses without it.
707      </t>
708   </list>
709</t>
710<t>
711   <x:dfn>now</x:dfn>
712   <list>
713      <t>
714         The term "now" means "the current value of the clock at the host
715         performing the calculation". A cache &SHOULD; use NTP (<xref
716         target="RFC1305"/>) or some similar protocol to synchronize its
717         clocks to a globally accurate time standard.
718      </t>
719   </list>
720</t>
721<t>
722   <x:dfn>request_time</x:dfn>
723   <list>
724      <t>
725         The current value of the clock at the host at the time the request
726         resulting in the stored response was made.
727      </t>
728   </list>
729</t>
730<t>
731   <x:dfn>response_time</x:dfn>
732   <list>
733      <t>
734         The current value of the clock at the host at the time the response
735         was received.
736      </t>
737   </list>
738</t>
739<t>
740   A response's age can be calculated in two entirely independent ways:
741   <list style="numbers">
742      <t>the "apparent_age": response_time minus date_value, if the local
743      clock is reasonably well synchronized to the origin server's clock. If
744      the result is negative, the result is replaced by zero.</t>
745      <t>the "corrected_age_value", if all of the caches along the response
746      path implement HTTP/1.1. A cache &MUST; interpret this value relative
747      to the time the request was initiated, not the time that the response
748      was received.</t>
749   </list>
750</t>
751<figure>
752<artwork type="code">
753  apparent_age = max(0, response_time - date_value);
754
755  response_delay = response_time - request_time;
756  corrected_age_value = age_value + response_delay; 
757</artwork>
758</figure>
759<figure>
760<preamble>These &SHOULD; be combined as</preamble>
761<artwork type="code">
762  corrected_initial_age = max(apparent_age, corrected_age_value);
763</artwork></figure>
764<t>
765   unless the cache is confident in the value of the <x:ref>Age</x:ref> header
766   field (e.g., because there are no HTTP/1.0 hops in the <x:ref>Via</x:ref>
767   header field), in which case the corrected_age_value &MAY; be used as the
768   corrected_initial_age.</t>
769<t>
770   The current_age of a stored response can then be calculated by adding the
771   amount of time (in seconds) since the stored response was last validated by
772   the origin server to the corrected_initial_age.
773</t>
774<figure><artwork type="code">
775  resident_time = now - response_time;
776  current_age = corrected_initial_age + resident_time;
777</artwork></figure>
778<t>
779   Additionally, to avoid common problems in date parsing:
780</t>
781<t>
782  <list style="symbols">
783     <t>Recipients &SHOULD; assume that an RFC-850 date
784        which appears to be more than 50 years in the future is in fact
785        in the past (this helps solve the "year 2000" problem).</t>
786
787     <t>Although all date formats are specified to be case-sensitive,
788        recipients &SHOULD; match day, week and timezone names
789        case-insensitively.</t>
790             
791     <t>An implementation &MAY; internally represent a parsed
792        <x:ref>Expires</x:ref> date as earlier than the proper value, but
793        &MUST-NOT; internally represent a parsed Expires date as later than the
794        proper value.</t>
795
796     <t>Recipients &MUST; perform all expiration-related calculations in GMT.
797        The local time zone &MUST-NOT; influence the calculation or comparison
798        of an age or expiration time.</t>
799
800     <t>Caches &SHOULD; consider dates with time zones other than "GMT"
801        invalid.</t>
802  </list>
803</t>
804</section>
805
806<section anchor="serving.stale.responses" title="Serving Stale Responses">
807<t>
808   A "stale" response is one that either has explicit expiry information or is
809   allowed to have heuristic expiry calculated, but is not fresh according to
810   the calculations in <xref target="expiration.model" />.
811</t>
812<t>
813   A cache &MUST-NOT; return a stale response if it is prohibited by an
814   explicit in-protocol directive (e.g., by a "no-store" or "no-cache" cache
815   directive, a "must-revalidate" cache-response-directive, or an applicable
816   "s-maxage" or "proxy-revalidate" cache-response-directive; see <xref
817   target="cache-response-directive"/>).
818</t>
819<t>
820   A cache &MUST-NOT; return stale responses unless it is disconnected
821   (i.e., it cannot contact the origin server or otherwise find a forward
822   path) or doing so is explicitly allowed (e.g., by the max-stale request
823   directive; see <xref target="cache-request-directive" />).
824</t>
825<t>
826   A cache &SHOULD; append a <x:ref>Warning</x:ref> header field with the 110
827   warn-code (see <xref target="header.warning"/>) to stale responses.
828   Likewise, a cache &SHOULD; add the 112 warn-code to stale responses if the
829   cache is disconnected.
830</t>
831<t>
832   If a cache receives a first-hand response (either an entire response, or a
833   <x:ref>304 (Not Modified)</x:ref> response) that it would normally forward
834   to the requesting client, and the received response is no longer fresh, the
835   cache can forward it to the requesting client without adding a new
836   <x:ref>Warning</x:ref> (but without removing any existing Warning header
837   fields). A cache shouldn't attempt to validate a response simply because
838   that response became stale in transit.
839</t>
840</section>
841</section>
842
843<section anchor="validation.model" title="Validation Model">
844<t>
845   When a cache has one or more stored responses for a requested URI, but
846   cannot serve any of them (e.g., because they are not fresh, or one cannot
847   be selected; see <xref target="caching.negotiated.responses"/>), it can use
848   the conditional request mechanism &conditional; in the forwarded request to
849   give the origin server an opportunity to both select a valid stored
850   response to be used, and to update it. This process is known as
851   "validating" or "revalidating" the stored response.
852</t>
853<t>
854   When sending such a conditional request, a cache adds an
855   <x:ref>If-Modified-Since</x:ref> header field whose value is that of the
856   <x:ref>Last-Modified</x:ref> header field from the selected
857   (see <xref target="caching.negotiated.responses"/>) stored response, if
858   available.
859</t>
860<t>
861   Additionally, a cache can add an <x:ref>If-None-Match</x:ref> header field
862   whose value is that of the <x:ref>ETag</x:ref> header field(s) from all
863   responses stored for the requested URI, if present. However, if any of the
864   stored responses contains only partial content, the cache shouldn't
865   include its entity-tag in the If-None-Match header field unless the request
866   is for a range that would be fully satisfied by that stored response.
867</t>
868
869<t>Cache handling of a response to a conditional request is dependent upon its
870status code:</t>
871
872<t>
873   <list style="symbols">
874      <t>
875         A <x:ref>304 (Not Modified)</x:ref> response status code indicates
876         that the stored response can be updated and reused; see <xref
877         target="freshening.responses"/>.
878      </t>
879      <t>
880         A full response (i.e., one with a response body) indicates that none
881         of the stored responses nominated in the conditional request is
882         suitable. Instead, the cache can use the full response to
883         satisfy the request and &MAY; replace the stored response(s).
884      </t>
885      <t>
886         However, if a cache receives a <x:ref>5xx (Server Error)</x:ref>
887         response while attempting to validate a response, it can either
888         forward this response to the requesting client, or act as if the
889         server failed to respond. In the latter case, it can return a
890         previously stored response (see <xref
891         target="serving.stale.responses" />).
892      </t>
893   </list>
894</t>
895
896<section anchor="freshening.responses" title="Freshening Responses with 304 Not Modified">
897<t>
898   When a cache receives a <x:ref>304 (Not Modified)</x:ref> response and
899   already has one or more stored <x:ref>200 (OK)</x:ref> responses for the
900   same cache key, the cache needs to identify which of the stored responses
901   are updated by this new response and then update the stored response(s)
902   with the new information provided in the <x:ref>304</x:ref> response.
903   <list style="symbols">
904    <t>
905     If the new response contains a strong validator, then that strong
906     validator identifies the selected representation.  All of the stored
907     responses with the same strong validator are selected.
908     If none of the stored responses contain the same strong validator, then
909     this new response corresponds to a new selected representation and
910     &MUST-NOT; update the existing stored responses.
911    </t>
912    <t>
913     If the new response contains a weak validator and that validator
914     corresponds to one of the cache's stored responses, then the most
915     recent of those matching stored responses is selected.
916    </t>
917    <t>
918     If the new response does not include any form of validator, there is
919     only one stored response, and that stored response also lacks a
920     validator, then that stored response is selected.
921    </t>
922   </list>
923</t>
924<t>
925   If a stored response is selected for update, the cache &MUST;:
926   <list style="symbols">
927      <t>delete any <x:ref>Warning</x:ref> header fields in the stored response
928         with warn-code 1xx (see <xref target="header.warning" />);</t>
929      <t>retain any <x:ref>Warning</x:ref> header fields in the stored response
930         with warn-code 2xx; and,</t>
931      <t>use other header fields provided in the <x:ref>304 (Not Modified)</x:ref>
932         response to replace all instances of the corresponding header
933         fields in the stored response.</t>
934   </list>
935</t>
936</section>
937
938</section>
939
940<section anchor="caching.negotiated.responses" 
941   title="Using Negotiated Responses">
942<t>
943   When a cache receives a request that can be satisfied by a stored response
944   that has a <x:ref>Vary</x:ref> header field (&header-vary;),
945   it &MUST-NOT; use that response unless all of the selecting header fields
946   nominated by the Vary header field match in both the original request
947   (i.e., that associated with the stored response), and the presented
948   request.
949</t>
950<t>
951   The selecting header fields from two requests are defined to match if and
952   only if those in the first request can be transformed to those in the
953   second request by applying any of the following:
954   <list style="symbols">
955      <t>
956         adding or removing whitespace, where allowed in the header field's
957         syntax
958      </t>
959      <t>
960         combining multiple header fields with the same field name
961         (see &header-fields;)
962      </t>
963      <t>
964         normalizing both header field values in a way that is known to have
965         identical semantics, according to the header field's specification
966         (e.g., re-ordering field values when order is not significant;
967         case-normalization, where values are defined to be case-insensitive)
968      </t>
969  </list>
970</t>
971<t>
972   If (after any normalization that might take place) a header field is absent
973   from a request, it can only match another request if it is also absent
974   there.
975</t>
976<t>
977   A <x:ref>Vary</x:ref> header field-value of "*" always fails to match, and
978   subsequent requests to that resource can only be properly interpreted by the
979   origin server.
980</t>
981<t>
982   The stored response with matching selecting header fields is known as the
983   selected response.
984</t>
985<t>
986   If multiple selected responses are available, the most recent response
987   (as determined by the <x:ref>Date</x:ref> header field) is used; see <xref 
988   target="constructing.responses.from.caches"/>.
989</t>
990<t>
991   If no selected response is available, the cache can forward the presented
992   request to the origin server in a conditional request; see <xref
993   target="validation.model"/>.
994</t>
995</section>
996
997
998<section anchor="combining.responses" title="Combining Partial Content">
999<t>
1000   A response might transfer only a partial representation if the
1001   connection closed prematurely or if the request used one or more Range
1002   specifiers (&partial;).  After several such transfers, a cache might have
1003   received several ranges of the same representation.  A cache &MAY; combine
1004   these ranges into a single stored response, and reuse that response to
1005   satisfy later requests, if they all share the same strong validator and
1006   the cache complies with the client requirements in &combining-byte-ranges;.
1007</t>
1008<t>
1009   When combining the new response with one or more stored responses, a
1010   cache &MUST;:
1011   <list style="symbols">
1012      <t>delete any <x:ref>Warning</x:ref> header fields in the stored response
1013         with warn-code 1xx (see <xref target="header.warning" />);</t>
1014      <t>retain any <x:ref>Warning</x:ref> header fields in the stored response
1015         with warn-code 2xx; and,</t>
1016      <t>use other header fields provided in the new response, aside
1017         from <x:ref>Content-Range</x:ref>, to replace all instances of the
1018         corresponding header fields in the stored response.</t>
1019   </list>
1020</t>
1021</section>
1022</section>
1023
1024
1025<section anchor="head.effects" title="Updating Caches with HEAD Responses">
1026<t>
1027   A response to the HEAD method is identical to what an equivalent request
1028   made with a GET would have been, except it lacks a body. This property
1029   of HEAD responses is used to both invalidate and update cached GET
1030   responses.
1031</t>
1032<t>
1033   If one or more stored GET responses can be selected (as per <xref
1034   target="caching.negotiated.responses"/>) for a HEAD request, and the
1035   <x:ref>Content-Length</x:ref>, <x:ref>ETag</x:ref> or
1036   <x:ref>Last-Modified</x:ref> value of a HEAD response differs from that in a
1037   selected GET response, the cache &MUST; consider that selected response to
1038   be stale.
1039</t>
1040<t>
1041   If the <x:ref>Content-Length</x:ref>, <x:ref>ETag</x:ref> and
1042   <x:ref>Last-Modified</x:ref> values of a HEAD response (when present) are
1043   the same as that in a selected GET response (as per
1044   <xref target="caching.negotiated.responses"/>), the cache &SHOULD; update
1045   the remaining header fields in the stored response using the following
1046   rules:
1047   <list style="symbols">
1048      <t>delete any <x:ref>Warning</x:ref> header fields in the stored response
1049         with warn-code 1xx (see <xref target="header.warning" />);</t>
1050      <t>retain any <x:ref>Warning</x:ref> header fields in the stored response
1051         with warn-code 2xx; and,</t>
1052      <t>use other header fields provided in the response to replace
1053         all instances of the corresponding header fields in the stored
1054         response.</t>
1055   </list>
1056</t>
1057
1058</section>
1059
1060
1061<section anchor="invalidation.after.updates.or.deletions" 
1062   title="Request Methods that Invalidate">
1063<t>
1064   Because unsafe request methods (&safe-methods;) such as PUT, POST or DELETE
1065   have the potential for changing state on the origin server, intervening
1066   caches can use them to keep their contents up-to-date.
1067</t>
1068<t>
1069   A cache &MUST; invalidate the effective Request URI
1070   (&effective-request-uri;) as well as the URI(s) in the
1071   <x:ref>Location</x:ref> and <x:ref>Content-Location</x:ref> response header
1072   fields (if present) when a non-error response to a request with an unsafe
1073   method is received.
1074</t>
1075<t>
1076   However, a cache &MUST-NOT; invalidate a URI from a <x:ref>Location</x:ref>
1077   or <x:ref>Content-Location</x:ref> response header field if the host part of
1078   that URI differs from the host part in the effective request URI
1079   (&effective-request-uri;). This helps prevent denial of service attacks.
1080</t>
1081<t>
1082   A cache &MUST; invalidate the effective request URI
1083   (&effective-request-uri;) when it receives a non-error response
1084   to a request with a method whose safety is unknown.
1085</t>
1086<t>
1087   Here, a "non-error response" is one with a <x:ref>2xx (Successful)</x:ref>
1088   or <x:ref>3xx (Redirection)</x:ref> status code. "Invalidate" means that
1089   the cache will either remove all stored responses related to the effective
1090   request URI, or will mark these as "invalid" and in need of a mandatory
1091   validation before they can be returned in response to a subsequent request.
1092</t>
1093<t>
1094   Note that this does not guarantee that all appropriate responses are
1095   invalidated. For example, the request that caused the change at the origin
1096   server might not have gone through the cache where a response is stored.
1097</t>
1098</section>
1099
1100
1101
1102
1103<section anchor="header.field.definitions" title="Header Field Definitions">
1104<t>
1105   This section defines the syntax and semantics of HTTP/1.1 header fields
1106   related to caching.
1107</t>
1108
1109<section anchor="header.age" title="Age">
1110   <iref item="Age header field" primary="true" x:for-anchor="" />
1111   <x:anchor-alias value="Age"/>
1112   <x:anchor-alias value="age-value"/>
1113<t>
1114   The "Age" header field conveys the sender's estimate of the amount
1115   of time since the response was generated or successfully validated at the
1116   origin server. Age values are calculated as specified in <xref
1117   target="age.calculations" />.
1118</t>
1119<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Age"/>
1120  <x:ref>Age</x:ref> = <x:ref>delta-seconds</x:ref>
1121</artwork></figure>
1122<t>
1123  Age field-values are non-negative integers, representing time in seconds
1124  (see <xref target="delta-seconds"/>).
1125</t>
1126<t>
1127   The presence of an Age header field in a response implies that a response
1128   is not first-hand. However, the converse is not true, since HTTP/1.0 caches
1129   might not implement the Age header field.
1130</t>
1131</section>
1132
1133<section anchor="header.cache-control" title="Cache-Control">
1134   <iref item="Cache-Control header field" primary="true" x:for-anchor="" />
1135   <x:anchor-alias value="Cache-Control"/>
1136   <x:anchor-alias value="cache-directive"/>
1137<t>
1138   The "Cache-Control" header field is used to specify directives for
1139   caches along the request/response chain. Such cache directives are
1140   unidirectional in that the presence of a directive in a request does not
1141   imply that the same directive is to be given in the response.
1142</t>
1143<t>
1144   A cache &MUST; obey the requirements of the Cache-Control
1145   directives defined in this section. See <xref
1146   target="cache.control.extensions"/> for information about how Cache-Control
1147   directives defined elsewhere are handled.
1148</t>
1149<x:note>
1150   <t>
1151       &Note; HTTP/1.0 caches might not implement Cache-Control and
1152       might only implement Pragma: no-cache (see <xref target="header.pragma"
1153       />).
1154   </t>
1155</x:note>
1156<t>
1157   A proxy, whether or not it implements a cache, &MUST; pass cache directives
1158   through in forwarded messages, regardless of their
1159   significance to that application, since the directives might be applicable
1160   to all recipients along the request/response chain. It is not possible to
1161   target a directive to a specific cache.
1162</t>
1163<t>
1164   Cache directives are identified by a token, to be compared case-insensitively,
1165   and have an optional argument, that can use both token and quoted-string
1166   syntax. For the directives defined below that define arguments, recipients
1167   ought to accept both forms, even if one is documented to be preferred. For
1168   any directive not defined by this specification, recipients &MUST; accept
1169   both forms.
1170</t>
1171<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Cache-Control"/><iref primary="true" item="Grammar" subitem="cache-directive"/>
1172  <x:ref>Cache-Control</x:ref>   = 1#<x:ref>cache-directive</x:ref>
1173
1174  <x:ref>cache-directive</x:ref> = <x:ref>token</x:ref> [ "=" ( <x:ref>token</x:ref> / <x:ref>quoted-string</x:ref> ) ]
1175</artwork></figure>
1176<t>
1177   For the cache directives defined below, no argument is defined (nor allowed)
1178   otherwise stated otherwise.
1179</t>
1180
1181<section title="Request Cache-Control Directives" anchor="cache-request-directive">
1182
1183<section title="no-cache" anchor="cache-request-directive.no-cache">
1184   <iref item="Cache Directives" primary="true" subitem="no-cache" />
1185   <iref item="no-cache" primary="true" subitem="Cache Directive" />
1186<t>
1187   The "no-cache" request directive indicates that a cache &MUST-NOT; 
1188   use a stored response to satisfy the request without successful
1189   validation on the origin server.
1190</t>
1191</section>
1192 
1193<section title="no-store" anchor="cache-request-directive.no-store">
1194   <iref item="Cache Directives" primary="true" subitem="no-store" />
1195   <iref item="no-store" primary="true" subitem="Cache Directive" />
1196<t>
1197   The "no-store" request directive indicates that a cache &MUST-NOT;
1198   store any part of either this request or any response to it. This
1199   directive applies to both private and shared caches. "&MUST-NOT;
1200   store" in this context means that the cache &MUST-NOT; intentionally
1201   store the information in non-volatile storage, and &MUST; make a
1202   best-effort attempt to remove the information from volatile storage as
1203   promptly as possible after forwarding it.
1204</t>
1205<t>
1206   This directive is NOT a reliable or sufficient mechanism for ensuring
1207   privacy. In particular, malicious or compromised caches might not
1208   recognize or obey this directive, and communications networks might be
1209   vulnerable to eavesdropping.
1210</t>
1211<t>
1212   Note that if a request containing this directive is satisfied from a
1213   cache, the no-store request directive does not apply to the already
1214   stored response.
1215</t>
1216</section>
1217
1218<section title="max-age" anchor="cache-request-directive.max-age">
1219   <iref item="Cache Directives" primary="true" subitem="max-age" />
1220   <iref item="max-age" primary="true" subitem="Cache Directive" />
1221<t>
1222   Argument syntax:
1223   <list>
1224      <t>
1225        <x:ref>delta-seconds</x:ref> (see <xref target="delta-seconds"/>)
1226      </t>
1227   </list>
1228</t>
1229<t>
1230   The "max-age" request directive indicates that the client is unwilling to
1231   accept a response whose age is greater than the specified number of
1232   seconds. Unless the max-stale request directive is also present, the
1233   client is not willing to accept a stale response.
1234</t>
1235<t>
1236   &Note; This directive uses the token form of the argument syntax;
1237   e.g., 'max-age=5', not 'max-age="5"'. Senders &SHOULD-NOT; use the
1238   quoted-string form.
1239</t>
1240</section>
1241
1242<section title="max-stale" anchor="cache-request-directive.max-stale">
1243   <iref item="Cache Directives" primary="true" subitem="max-stale" />
1244   <iref item="max-stale" primary="true" subitem="Cache Directive" />
1245<t>
1246   Argument syntax:
1247   <list>
1248      <t>
1249        <x:ref>delta-seconds</x:ref> (see <xref target="delta-seconds"/>)
1250      </t>
1251   </list>
1252</t>
1253<t>
1254   The "max-stale" request directive indicates that the client is willing
1255   to accept a response that has exceeded its expiration time. If max-stale
1256   is assigned a value, then the client is willing to accept a response
1257   that has exceeded its expiration time by no more than the specified
1258   number of seconds. If no value is assigned to max-stale, then the client
1259   is willing to accept a stale response of any age.
1260</t>
1261<t>
1262   &Note; This directive uses the token form of the argument syntax;
1263   e.g., 'max-stale=10', not 'max-stale="10"'. Senders &SHOULD-NOT; use the
1264   quoted-string form.
1265</t>
1266</section>
1267
1268<section title="min-fresh" anchor="cache-request-directive.min-fresh">
1269   <iref item="Cache Directives" primary="true" subitem="min-fresh" />
1270   <iref item="min-fresh" primary="true" subitem="Cache Directive" />
1271<t>
1272   Argument syntax:
1273   <list>
1274      <t>
1275        <x:ref>delta-seconds</x:ref> (see <xref target="delta-seconds"/>)
1276      </t>
1277   </list>
1278</t>
1279<t>
1280   The "min-fresh" request directive indicates that the client is willing
1281   to accept a response whose freshness lifetime is no less than its
1282   current age plus the specified time in seconds. That is, the client
1283   wants a response that will still be fresh for at least the specified
1284   number of seconds.
1285</t>
1286<t>
1287   &Note; This directive uses the token form of the argument syntax;
1288   e.g., 'min-fresh=20', not 'min-fresh="20"'. Senders &SHOULD-NOT; use the
1289   quoted-string form.
1290</t>
1291</section>
1292
1293<section title="no-transform" anchor="cache-request-directive.no-transform">
1294   <iref item="Cache Directives" primary="true" subitem="no-transform" />
1295   <iref item="no-transform" primary="true" subitem="Cache Directive" />
1296<t>
1297   The "no-transform" request directive indicates that an intermediary
1298   (whether or not it implements a cache) &MUST-NOT; change the
1299   <x:ref>Content-Encoding</x:ref>, <x:ref>Content-Range</x:ref> or
1300   <x:ref>Content-Type</x:ref> request header fields, nor the request
1301   representation.
1302</t>
1303</section>
1304
1305<section title="only-if-cached" anchor="cache-request-directive.only-if-cached">
1306   <iref item="Cache Directives" primary="true" subitem="only-if-cached" />
1307   <iref item="only-if-cached" primary="true" subitem="Cache Directive" />
1308<t>
1309   The "only-if-cached" request directive indicates that the client only wishes
1310   to obtain a stored response. If it receives this directive, a cache &SHOULD;
1311   either respond using a stored response that is consistent with the other
1312   constraints of the request, or respond with a <x:ref>504 (Gateway
1313   Timeout)</x:ref> status code. If a group of caches is being operated as a
1314   unified system with good internal connectivity, a member cache &MAY;
1315   forward such a request within that group of caches.
1316</t>
1317</section>
1318</section>
1319
1320<section anchor="cache-response-directive" 
1321   title="Response Cache-Control Directives">
1322   <x:anchor-alias value="cache-response-directive" />
1323
1324<section title="public" anchor="cache-response-directive.only-if-cached">
1325   <iref item="Cache Directives" primary="true" subitem="public" />
1326   <iref item="public" primary="true" subitem="Cache Directive" />
1327<t>
1328   The "public" response directive indicates that a response whose
1329   associated request contains an 'Authentication' header &MAY; be
1330   stored (see <xref target="caching.authenticated.responses" />).
1331</t>
1332</section>
1333
1334<section title="private" anchor="cache-response-directive.private">
1335   <iref item="Cache Directives" primary="true" subitem="private" />
1336   <iref item="private" primary="true" subitem="Cache Directive" />
1337<t>
1338   Argument syntax:
1339   <list>
1340      <t>
1341        #<x:ref>field-name</x:ref>
1342      </t>
1343   </list>
1344</t>
1345<t>
1346   The "private" response directive indicates that the response message is
1347   intended for a single user and &MUST-NOT; be stored by a shared cache. A
1348   private cache &MAY; store the response.
1349</t>
1350<t>
1351   If the private response directive specifies one or more field-names,
1352   this requirement is limited to the field-values associated with the
1353   listed response header fields. That is, a shared cache &MUST-NOT; store
1354   the specified field-names(s), whereas it &MAY; store the remainder of the
1355   response message.
1356</t>
1357<t>
1358   The field-names given are not limited to the set of standard header
1359   fields defined by this specification. Field names are case-insensitive.
1360</t>
1361<t>
1362   &Note; This usage of the word "private" only controls
1363   where the response can be stored; it cannot ensure the privacy of the
1364   message content. Also, private response directives with field-names are
1365   often handled by implementations as if an unqualified private directive
1366   was received; i.e., the special handling for the qualified form is not
1367   widely implemented.
1368</t>
1369<t>
1370   &Note; This directive uses the quoted-string form of the argument syntax.
1371   Senders &SHOULD-NOT; use the token form (even if quoting appears not to be
1372   needed for single-entry lists).
1373</t>
1374</section>
1375
1376<section title="no-cache" anchor="cache-response-directive.no-cache">
1377   <iref item="Cache Directives" primary="true" subitem="no-cache" />
1378   <iref item="no-cache" primary="true" subitem="Cache Directive" />
1379<t>
1380   Argument syntax:
1381   <list>
1382      <t>
1383        #<x:ref>field-name</x:ref>
1384      </t>
1385   </list>
1386</t>
1387<t>
1388   The "no-cache" response directive indicates that the response &MUST-NOT;
1389   be used to satisfy a subsequent request without successful validation on
1390   the origin server. This allows an origin server to prevent a cache from
1391   using it to satisfy a request without contacting it, even by caches that
1392   have been configured to return stale responses.
1393</t>
1394<t>
1395   If the no-cache response directive specifies one or more field-names,
1396   then a cache &MAY; use the response to satisfy a subsequent request,
1397   subject to any other restrictions on caching. However, any header fields
1398   in the response that have the field-name(s) listed &MUST-NOT; be sent
1399   in the response to a subsequent request without successful revalidation
1400   with the origin server. This allows an origin server to prevent the
1401   re-use of certain header fields in a response, while still allowing
1402   caching of the rest of the response.
1403</t> 
1404<t>
1405   The field-names given are not limited to the set of standard header
1406   fields defined by this specification. Field names are case-insensitive.
1407</t>
1408<t>
1409   &Note; Many HTTP/1.0 caches will not recognize or obey
1410   this directive. Also, no-cache response directives with field-names are
1411   often handled by implementations as if an unqualified no-cache directive
1412   was received; i.e., the special handling for the qualified form is not
1413   widely implemented.
1414</t>
1415<t>
1416   &Note; This directive uses the quoted-string form of the argument syntax.
1417   Senders &SHOULD-NOT; use the token form (even if quoting appears not to be
1418   needed for single-entry lists).
1419</t>
1420</section>
1421
1422<section title="no-store" anchor="cache-response-directive.no-store">
1423   <iref item="Cache Directives" primary="true" subitem="no-store" />
1424   <iref item="no-store" primary="true" subitem="Cache Directive" />
1425<t>
1426   The "no-store" response directive indicates that a cache &MUST-NOT;
1427   store any part of either the immediate request or response. This
1428   directive applies to both private and shared caches. "&MUST-NOT;
1429   store" in this context means that the cache &MUST-NOT; intentionally
1430   store the information in non-volatile storage, and &MUST; make a
1431   best-effort attempt to remove the information from volatile storage as
1432   promptly as possible after forwarding it.
1433</t>
1434<t>
1435   This directive is NOT a reliable or sufficient mechanism for ensuring
1436   privacy. In particular, malicious or compromised caches might not
1437   recognize or obey this directive, and communications networks might be
1438   vulnerable to eavesdropping.
1439</t>
1440</section>
1441
1442<section title="must-revalidate" anchor="cache-response-directive.must-revalidate">
1443   <iref item="Cache Directives" primary="true" subitem="must-revalidate" />
1444   <iref item="must-revalidate" primary="true" subitem="Cache Directive" />
1445<t>
1446   The "must-revalidate" response directive indicates that once it has
1447   become stale, a cache &MUST-NOT; use the response to satisfy subsequent
1448   requests without successful validation on the origin server.
1449</t>
1450<t>
1451   The must-revalidate directive is necessary to support reliable
1452   operation for certain protocol features. In all circumstances a
1453   cache &MUST; obey the must-revalidate directive; in particular,
1454   if a cache cannot reach the origin server for any reason, it &MUST;
1455   generate a <x:ref>504 (Gateway Timeout)</x:ref> response.
1456</t>
1457<t>
1458   The must-revalidate directive ought to be used by servers if and only
1459   if failure to validate a request on the representation could result in
1460   incorrect operation, such as a silently unexecuted financial
1461   transaction.
1462</t>
1463</section>
1464
1465<section title="proxy-revalidate" anchor="cache-response-directive.proxy-revalidate">
1466   <iref item="Cache Directives" primary="true" subitem="proxy-revalidate" />
1467   <iref item="proxy-revalidate" primary="true" subitem="Cache Directive" />
1468<t>
1469   The "proxy-revalidate" response directive has the same meaning as the
1470   must-revalidate response directive, except that it does not apply to
1471   private caches.
1472</t>
1473</section>
1474
1475<section title="max-age" anchor="cache-response-directive.max-age">
1476   <iref item="Cache Directives" primary="true" subitem="max-age" />
1477   <iref item="max-age" primary="true" subitem="Cache Directive" />
1478<t>
1479   Argument syntax:
1480   <list>
1481      <t>
1482        <x:ref>delta-seconds</x:ref> (see <xref target="delta-seconds"/>)
1483      </t>
1484   </list>
1485</t>
1486<t>
1487   The "max-age" response directive indicates that the response is to be
1488   considered stale after its age is greater than the specified number of
1489   seconds.
1490</t>
1491<t>
1492   &Note; This directive uses the token form of the argument syntax;
1493   e.g., 'max-age=5', not 'max-age="5"'. Senders &SHOULD-NOT; use the
1494   quoted-string form.
1495</t>
1496</section>     
1497
1498<section title="s-maxage" anchor="cache-response-directive.s-maxage">
1499   <iref item="Cache Directives" primary="true" subitem="s-maxage" />
1500   <iref item="s-maxage" primary="true" subitem="Cache Directive" />
1501<t>
1502   Argument syntax:
1503   <list>
1504      <t>
1505        <x:ref>delta-seconds</x:ref> (see <xref target="delta-seconds"/>)
1506      </t>
1507   </list>
1508</t>
1509<t>
1510   The "s-maxage" response directive indicates that, in shared caches, the
1511   maximum age specified by this directive overrides the maximum age
1512   specified by either the max-age directive or the <x:ref>Expires</x:ref>
1513   header field. The s-maxage directive also implies the semantics of the
1514   proxy-revalidate response directive.
1515</t>
1516<t>
1517   &Note; This directive uses the token form of the argument syntax;
1518   e.g., 's-maxage=10', not 's-maxage="10"'. Senders &SHOULD-NOT; use the
1519   quoted-string form.
1520</t>
1521</section>
1522
1523<section title="no-transform" anchor="cache-response-directive.no-transform">
1524   <iref item="Cache Directives" primary="true" subitem="no-transform" />
1525   <iref item="no-transform" primary="true" subitem="Cache Directive" />
1526<t>
1527   The "no-transform" response directive indicates that an intermediary
1528   (regardless of whether it implements a cache) &MUST-NOT; change the
1529   <x:ref>Content-Encoding</x:ref>, <x:ref>Content-Range</x:ref> or
1530   <x:ref>Content-Type</x:ref> response header fields, nor the response
1531   representation.
1532</t>
1533</section>
1534
1535</section>
1536
1537<section anchor="cache.control.extensions" title="Cache Control Extensions">
1538<t>
1539   The Cache-Control header field can be extended through the use of one or
1540   more cache-extension tokens, each with an optional value. Informational
1541   extensions (those that do not require a change in cache behavior) can be
1542   added without changing the semantics of other directives. Behavioral
1543   extensions are designed to work by acting as modifiers to the existing base
1544   of cache directives. Both the new directive and the standard directive are
1545   supplied, such that applications that do not understand the new directive
1546   will default to the behavior specified by the standard directive, and those
1547   that understand the new directive will recognize it as modifying the
1548   requirements associated with the standard directive. In this way,
1549   extensions to the cache-control directives can be made without requiring
1550   changes to the base protocol.
1551</t>
1552<t>
1553   This extension mechanism depends on an HTTP cache obeying all of the
1554   cache-control directives defined for its native HTTP-version, obeying
1555   certain extensions, and ignoring all directives that it does not
1556   understand.
1557</t>
1558<t>
1559   For example, consider a hypothetical new response directive called
1560   "community" that acts as a modifier to the private directive. We define
1561   this new directive to mean that, in addition to any private cache, any
1562   cache that is shared only by members of the community named within its
1563   value is allowed to cache the response. An origin server wishing to allow
1564   the UCI community to use an otherwise private response in their shared
1565   cache(s) could do so by including
1566</t>
1567<figure><artwork type="example">
1568  Cache-Control: private, community="UCI"
1569</artwork></figure>
1570<t>
1571   A cache seeing this header field will act correctly even if the cache does
1572   not understand the community cache-extension, since it will also see and
1573   understand the private directive and thus default to the safe behavior.
1574</t>
1575<t>
1576   A cache &MUST; ignore unrecognized cache directives; it is assumed that any
1577   cache directive likely to be unrecognized by an HTTP/1.1 cache will be
1578   combined with standard directives (or the response's default cacheability)
1579   such that the cache behavior will remain minimally correct even if the
1580   cache does not understand the extension(s).
1581</t>
1582<t>
1583   New extension directives ought to consider defining:
1584</t>
1585<t>
1586   <list style="symbols">
1587      <t>What it means for a directive to be specified multiple times,</t>
1588      <t>When the directive does not take an argument, what it means when an
1589      argument is present,</t>
1590      <t>When the directive requires an argument, what it means when it is
1591      missing.</t>
1592   </list>
1593</t>
1594<t>
1595   The HTTP Cache Directive Registry defines the name space for the cache
1596   directives.
1597</t>
1598<t>
1599   A registration &MUST; include the following fields:
1600   <list style="symbols">
1601      <t>Cache Directive Name</t>
1602      <t>Pointer to specification text</t>
1603   </list>
1604</t>
1605<t>
1606   Values to be added to this name space require IETF Review (see <xref
1607   target="RFC5226" x:fmt="," x:sec="4.1"/>).
1608</t>
1609<t>
1610   The registry itself is maintained at <eref
1611   target="http://www.iana.org/assignments/http-cache-directives"/>.
1612</t>
1613</section>
1614
1615</section>
1616
1617<section anchor="header.expires" title="Expires">
1618   <iref item="Expires header field" primary="true" x:for-anchor="" />
1619   <x:anchor-alias value="Expires"/>
1620<t>
1621   The "Expires" header field gives the date/time after which the
1622   response is considered stale. See <xref target="expiration.model" /> for
1623   further discussion of the freshness model.
1624</t>
1625<t>
1626   The presence of an Expires field does not imply that the original resource
1627   will change or cease to exist at, before, or after that time.
1628</t>
1629<t>
1630   The field-value is an absolute date and time as defined by HTTP-date in
1631   &http-date;; a sender &MUST; use the rfc1123-date format.
1632</t>
1633<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Expires"/>
1634  <x:ref>Expires</x:ref> = <x:ref>HTTP-date</x:ref>
1635</artwork></figure>
1636<figure>
1637  <preamble>For example</preamble>
1638<artwork type="example">
1639  Expires: Thu, 01 Dec 1994 16:00:00 GMT
1640</artwork></figure>
1641<t>
1642   A cache &MUST; treat other invalid date formats,
1643   especially including the value "0", as in the past (i.e., "already
1644   expired").
1645</t>
1646<x:note>
1647   <t>
1648       &Note; If a response includes a <x:ref>Cache-Control</x:ref> field with
1649       the max-age directive (see <xref target="cache-response-directive.max-age" />),
1650       that directive overrides the Expires field. Likewise, the s-maxage
1651       directive (<xref target="cache-response-directive.s-maxage" />) overrides
1652       the <x:ref>Expires</x:ref> header fieldin shared caches.
1653   </t>
1654</x:note>
1655<t>
1656   Historically, HTTP required the Expires field-value to be no more than a
1657   year in the future. While longer freshness lifetimes are no longer
1658   prohibited, extremely large values have been demonstrated to cause
1659   problems (e.g., clock overflows due to use of 32-bit integers for
1660   time values), and many caches will evict a response far sooner than
1661   that. Therefore, senders ought not produce them.
1662</t>
1663<t>
1664   An origin server without a clock &MUST-NOT; assign Expires
1665   values to a response unless these values were associated
1666   with the resource by a system or user with a reliable clock. It &MAY;
1667   assign an Expires value that is known, at or before server
1668   configuration time, to be in the past (this allows "pre-expiration"
1669   of responses without storing separate Expires values for each
1670   resource).
1671</t>
1672</section>
1673
1674<section anchor="header.pragma" title="Pragma">
1675   <iref item="Pragma header field" primary="true" x:for-anchor="" />
1676   <x:anchor-alias value="extension-pragma"/>
1677   <x:anchor-alias value="Pragma"/>
1678   <x:anchor-alias value="pragma-directive"/>
1679<t>
1680   The "Pragma" header field allows backwards compatibility with HTTP/1.0
1681   caches, so that clients can specify a "no-cache" request that they will
1682   understand (as <x:ref>Cache-Control</x:ref> was not defined until HTTP/1.1).
1683   When the Cache-Control header field is also present and understood in a
1684   request, Pragma is ignored.
1685</t>
1686<t>
1687   In HTTP/1.0, Pragma was defined as an extensible field for
1688   implementation-specified directives for recipients. This specification
1689   deprecates such extensions to improve interoperability.
1690</t>
1691<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Pragma"/><iref primary="true" item="Grammar" subitem="pragma-directive"/><iref primary="true" item="Grammar" subitem="extension-pragma"/>
1692  <x:ref>Pragma</x:ref>           = 1#<x:ref>pragma-directive</x:ref>
1693  <x:ref>pragma-directive</x:ref> = "no-cache" / <x:ref>extension-pragma</x:ref>
1694  <x:ref>extension-pragma</x:ref> = <x:ref>token</x:ref> [ "=" ( <x:ref>token</x:ref> / <x:ref>quoted-string</x:ref> ) ]
1695</artwork></figure>
1696<t>
1697   When the <x:ref>Cache-Control</x:ref> header field is not present in a
1698   request, the no-cache request pragma-directive &MUST; have the same effect
1699   on caches as if "Cache-Control: no-cache" were present (see <xref
1700   target="cache-request-directive" />).
1701</t>
1702<t>
1703   When sending a no-cache request, a client ought to include both the pragma
1704   and cache-control directives, unless Cache-Control: no-cache is
1705   purposefully omitted to target other <x:ref>Cache-Control</x:ref> response
1706   directives at HTTP/1.1 caches. For example:
1707</t>
1708<figure>
1709<artwork type="message/http; msgtype=&#34;response&#34;" x:indent-with="  ">
1710GET / HTTP/1.1
1711Host: www.example.com
1712Cache-Control: max-age=30
1713Pragma: no-cache
1714
1715</artwork>
1716</figure>
1717<t>
1718   will constrain HTTP/1.1 caches to serve a response no older than 30
1719   seconds, while precluding implementations that do not understand
1720   <x:ref>Cache-Control</x:ref> from serving a cached response.
1721</t>
1722<x:note>
1723   <t>
1724      &Note; Because the meaning of "Pragma: no-cache" in responses is not
1725      specified, it does not provide a reliable replacement for
1726      "Cache-Control: no-cache" in them.
1727   </t>
1728</x:note>
1729</section>
1730
1731<section anchor="header.warning" title="Warning">
1732   <iref item="Warning header field" primary="true" x:for-anchor="" />
1733   <x:anchor-alias value="Warning"/>
1734   <x:anchor-alias value="warning-value"/>
1735   <x:anchor-alias value="warn-agent"/>
1736   <x:anchor-alias value="warn-code"/>
1737   <x:anchor-alias value="warn-date"/>
1738   <x:anchor-alias value="warn-text"/>
1739<t>
1740   The "Warning" header field is used to carry additional information
1741   about the status or transformation of a message that might not be reflected
1742   in the message. This information is typically used to warn about possible
1743   incorrectness introduced by caching operations or transformations applied
1744   to the payload of the message.
1745</t>
1746<t>
1747   Warnings can be used for other purposes, both cache-related and otherwise.
1748   The use of a warning, rather than an error status code, distinguishes these
1749   responses from true failures.
1750</t>
1751<t>
1752   Warning header fields can in general be applied to any message, however some
1753   warn-codes are specific to caches and can only be applied to response
1754   messages.
1755</t>
1756<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Warning"/><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"/>
1757  <x:ref>Warning</x:ref>       = 1#<x:ref>warning-value</x:ref>
1758 
1759  <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>
1760                                        [<x:ref>SP</x:ref> <x:ref>warn-date</x:ref>]
1761 
1762  <x:ref>warn-code</x:ref>  = 3<x:ref>DIGIT</x:ref>
1763  <x:ref>warn-agent</x:ref> = ( <x:ref>uri-host</x:ref> [ ":" <x:ref>port</x:ref> ] ) / <x:ref>pseudonym</x:ref>
1764                  ; the name or pseudonym of the server adding
1765                  ; the Warning header field, for use in debugging
1766  <x:ref>warn-text</x:ref>  = <x:ref>quoted-string</x:ref>
1767  <x:ref>warn-date</x:ref>  = <x:ref>DQUOTE</x:ref> <x:ref>HTTP-date</x:ref> <x:ref>DQUOTE</x:ref>
1768</artwork></figure>
1769<t>
1770   Multiple warnings can be attached to a response (either by the origin
1771   server or by a cache), including multiple warnings with the same code
1772   number, only differing in warn-text.
1773</t>
1774<t>
1775   When this occurs, the user agent &SHOULD; inform the user of as many of
1776   them as possible, in the order that they appear in the response.
1777</t>
1778<t>
1779   Systems that generate multiple Warning header fields are encouraged to
1780   order them with this user agent behavior in mind. New Warning header fields
1781   are added after any existing Warning header fields.
1782</t>
1783<t>
1784   Warnings are assigned three digit warn-codes. The first digit indicates
1785   whether the Warning is required to be deleted from a stored response after
1786   validation:
1787   <list style="symbols">
1788      <t>1xx Warnings describe the freshness or validation status of the
1789      response, and so &MUST; be deleted by a cache after validation. They can
1790      only be generated by a cache when validating a cached entry, and
1791      &MUST-NOT; be generated in any other situation.</t>
1792      <t>2xx Warnings describe some aspect of the representation that is not
1793      rectified by a validation (for example, a lossy compression of the
1794      representation) and &MUST-NOT; be deleted by a cache after validation,
1795      unless a full response is returned, in which case they &MUST; be.</t>
1796   </list>
1797</t>
1798<t>
1799   If an implementation sends a message with one or more Warning header fields
1800   to a receiver whose version is HTTP/1.0 or lower, then the sender &MUST;
1801   include in each warning-value a warn-date that matches the
1802   <x:ref>Date</x:ref> header field in the message.
1803</t>
1804<t>
1805   If a system receives a message with a warning-value that includes a
1806   warn-date, and that warn-date is different from the <x:ref>Date</x:ref>
1807   value in the response, then that warning-value &MUST; be deleted from the
1808   message before storing, forwarding, or using it. (preventing the
1809   consequences of naive caching of Warning header fields.) If all of the
1810   warning-values are deleted for this reason, the Warning header field &MUST;
1811   be deleted as well.
1812</t>
1813<t>
1814   The following warn-codes are defined by this specification, each with a
1815   recommended warn-text in English, and a description of its meaning.
1816</t>
1817
1818<section title="110 Response is Stale" anchor="warn.110">
1819  <iref primary="true" item="110 Response is Stale (warn code)" x:for-anchor=""/>
1820  <iref primary="true" item="Warn Codes" subitem="110 Response is Stale" x:for-anchor=""/>
1821<t>
1822   A cache &SHOULD; include this whenever the returned response is stale.
1823</t>
1824</section>
1825
1826<section title="111 Revalidation Failed" anchor="warn.111">
1827  <iref primary="true" item="111 Revalidation Failed (warn code)" x:for-anchor=""/>
1828  <iref primary="true" item="Warn Codes" subitem="111 Revalidation Failed" x:for-anchor=""/>
1829<t>
1830   A cache &SHOULD; include this when returning a stale response because an
1831   attempt to validate the response failed, due to an inability to reach
1832   the server.
1833</t>
1834</section>
1835
1836<section title="112 Disconnected Operation" anchor="warn.112">
1837  <iref primary="true" item="112 Disconnected Operation (warn code)" x:for-anchor=""/>
1838  <iref primary="true" item="Warn Codes" subitem="112 Disconnected Operation" x:for-anchor=""/>
1839<t>
1840   A cache &SHOULD; include this if it is intentionally disconnected from
1841   the rest of the network for a period of time.
1842</t>
1843</section>
1844
1845<section title="113 Heuristic Expiration" anchor="warn.113">
1846  <iref primary="true" item="113 Heuristic Expiration (warn code)" x:for-anchor=""/>
1847  <iref primary="true" item="Warn Codes" subitem="113 Heuristic Expiration" x:for-anchor=""/>
1848<t>
1849   A cache &SHOULD; include this if it heuristically chose a freshness
1850   lifetime greater than 24 hours and the response's age is greater than 24
1851   hours.
1852</t>
1853</section>
1854
1855<section title="199 Miscellaneous Warning" anchor="warn.199">
1856  <iref primary="true" item="199 Miscellaneous Warning (warn code)" x:for-anchor=""/>
1857  <iref primary="true" item="Warn Codes" subitem="199 Miscellaneous Warning" x:for-anchor=""/>
1858<t>
1859   The warning text can include arbitrary information to be presented to
1860   a human user, or logged. A system receiving this warning &MUST-NOT; take
1861   any automated action, besides presenting the warning to the user.
1862</t>
1863</section>
1864
1865<section title="214 Transformation Applied" anchor="warn.214">
1866  <iref primary="true" item="214 Transformation Applied (warn code)" x:for-anchor=""/>
1867  <iref primary="true" item="Warn Codes" subitem="214 Transformation Applied" x:for-anchor=""/>
1868<t>
1869   &MUST; be added by a proxy if it applies any transformation to the
1870   representation, such as changing the content-coding, media-type, or
1871   modifying the representation data, unless this Warning code already appears
1872   in the response.
1873</t>
1874</section>
1875
1876<section title="299 Miscellaneous Persistent Warning" anchor="warn.299">
1877  <iref primary="true" item="299 Miscellaneous Persistent Warning (warn code)" x:for-anchor=""/>
1878  <iref primary="true" item="Warn Codes" subitem="299 Miscellaneous Persistent Warning" x:for-anchor=""/>
1879<t>
1880   The warning text can include arbitrary information to be presented to
1881   a human user, or logged. A system receiving this warning &MUST-NOT; take
1882   any automated action.
1883</t>
1884</section>
1885
1886<section title="Warn Code Extensions" anchor="warn.code.extensions">
1887<t>
1888   The HTTP Warn Code Registry defines the name space for warn codes.
1889</t>
1890<t>
1891   A registration &MUST; include the following fields:
1892   <list style="symbols">
1893      <t>Warn Code (3 digits)</t>
1894      <t>Short Description</t>
1895      <t>Pointer to specification text</t>
1896   </list>
1897</t>
1898<t>
1899   Values to be added to this name space require IETF Review (see <xref
1900   target="RFC5226" x:fmt="," x:sec="4.1"/>).
1901</t>
1902<t>
1903   The registry itself is maintained at <eref
1904   target="http://www.iana.org/assignments/http-warn-codes"/>.
1905</t>
1906</section>
1907</section>
1908</section>
1909
1910<section anchor="history.lists" title="History Lists">
1911<t>
1912   User agents often have history mechanisms, such as "Back" buttons and
1913   history lists, that can be used to redisplay a representation retrieved
1914   earlier in a session.
1915</t>
1916<t>
1917   The freshness model (<xref target="expiration.model"/>) does not
1918   necessarily apply to history mechanisms. I.e., a history mechanism can
1919   display a previous representation even if it has expired.
1920</t>
1921<t>
1922   This does not prohibit the history mechanism from telling the user that a
1923   view might be stale, or from honoring cache directives (e.g.,
1924   Cache-Control: no-store).
1925</t>
1926</section>
1927
1928
1929<section anchor="IANA.considerations" title="IANA Considerations">
1930
1931<section title="Cache Directive Registry" 
1932   anchor="cache.directive.registration">
1933<t>
1934   The registration procedure for HTTP Cache Directives is defined by <xref
1935   target="cache.control.extensions"/> of this document.
1936</t>
1937<t>
1938   The HTTP Cache Directive Registry shall be created at <eref
1939   target="http://www.iana.org/assignments/http-cache-directives"/> and be
1940   populated with the registrations below:
1941</t>
1942<?BEGININC p6-cache.cache-directives ?>
1943<!--AUTOGENERATED FROM extract-cache-directives-defs.xslt, do not edit manually-->
1944<texttable xmlns:my="#my" align="left" suppress-title="true"
1945           anchor="iana.cache.directive.registration.table">
1946   <ttcol>Cache Directive</ttcol>
1947   <ttcol>Reference</ttcol>
1948
1949   <c>max-age</c>
1950   <c>
1951      <xref target="cache-request-directive.max-age"/>, <xref target="cache-response-directive.max-age"/>
1952   </c>
1953   <c>max-stale</c>
1954   <c>
1955      <xref target="cache-request-directive.max-stale"/>
1956   </c>
1957   <c>min-fresh</c>
1958   <c>
1959      <xref target="cache-request-directive.min-fresh"/>
1960   </c>
1961   <c>must-revalidate</c>
1962   <c>
1963      <xref target="cache-response-directive.must-revalidate"/>
1964   </c>
1965   <c>no-cache</c>
1966   <c>
1967      <xref target="cache-request-directive.no-cache"/>, <xref target="cache-response-directive.no-cache"/>
1968   </c>
1969   <c>no-store</c>
1970   <c>
1971      <xref target="cache-request-directive.no-store"/>, <xref target="cache-response-directive.no-store"/>
1972   </c>
1973   <c>no-transform</c>
1974   <c>
1975      <xref target="cache-request-directive.no-transform"/>, <xref target="cache-response-directive.no-transform"/>
1976   </c>
1977   <c>only-if-cached</c>
1978   <c>
1979      <xref target="cache-request-directive.only-if-cached"/>
1980   </c>
1981   <c>private</c>
1982   <c>
1983      <xref target="cache-response-directive.private"/>
1984   </c>
1985   <c>proxy-revalidate</c>
1986   <c>
1987      <xref target="cache-response-directive.proxy-revalidate"/>
1988   </c>
1989   <c>public</c>
1990   <c>
1991      <xref target="cache-response-directive.only-if-cached"/>
1992   </c>
1993   <c>s-maxage</c>
1994   <c>
1995      <xref target="cache-response-directive.s-maxage"/>
1996   </c>
1997   <c>stale-if-error</c>
1998   <c>
1999      <xref xmlns:x="http://purl.org/net/xml2rfc/ext" target="RFC5861" x:fmt="," x:sec="4"/>
2000   </c>
2001   <c>stale-while-revalidate</c>
2002   <c>
2003      <xref xmlns:x="http://purl.org/net/xml2rfc/ext" target="RFC5861" x:fmt="," x:sec="3"/>
2004   </c>
2005</texttable>
2006<!--(END)-->
2007<?ENDINC p6-cache.cache-directives ?>
2008</section>
2009
2010<section title="Warn Code Registry" 
2011   anchor="warn.code.registration">
2012<t>
2013   The registration procedure for HTTP Warn Codes is defined by <xref
2014   target="warn.code.extensions"/> of this document.
2015</t>
2016<t>
2017   The HTTP Warn Code Registry shall be created at <eref
2018   target="http://www.iana.org/assignments/http-cache-directives"/> and be
2019   populated with the registrations below:
2020</t>
2021<?BEGININC p6-cache.iana-warn-codes ?>
2022<!--AUTOGENERATED FROM extract-warn-code-defs.xslt, do not edit manually-->
2023<texttable align="left" suppress-title="true" anchor="iana.warn.code.registration.table">
2024   <ttcol>Warn Code</ttcol>
2025   <ttcol>Short Description</ttcol>
2026   <ttcol>Reference</ttcol>
2027   <c>110</c>
2028   <c>Response is Stale</c>
2029   <c>
2030      <xref target="warn.110"/>
2031   </c>
2032   <c>111</c>
2033   <c>Revalidation Failed</c>
2034   <c>
2035      <xref target="warn.111"/>
2036   </c>
2037   <c>112</c>
2038   <c>Disconnected Operation</c>
2039   <c>
2040      <xref target="warn.112"/>
2041   </c>
2042   <c>113</c>
2043   <c>Heuristic Expiration</c>
2044   <c>
2045      <xref target="warn.113"/>
2046   </c>
2047   <c>199</c>
2048   <c>Miscellaneous Warning</c>
2049   <c>
2050      <xref target="warn.199"/>
2051   </c>
2052   <c>214</c>
2053   <c>Transformation Applied</c>
2054   <c>
2055      <xref target="warn.214"/>
2056   </c>
2057   <c>299</c>
2058   <c>Miscellaneous Persistent Warning</c>
2059   <c>
2060      <xref target="warn.299"/>
2061   </c>
2062</texttable>
2063<!--(END)-->
2064<?ENDINC p6-cache.iana-warn-codes ?>
2065</section>
2066
2067<section title="Header Field Registration" anchor="header.field.registration">
2068<t>
2069  The Message Header Field Registry located at <eref 
2070  target="http://www.iana.org/assignments/message-headers/message-header-index.html" />
2071  shall be updated with the permanent registrations below (see <xref target="RFC3864" />):
2072</t>
2073<?BEGININC p6-cache.iana-headers ?>
2074<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
2075<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
2076   <ttcol>Header Field Name</ttcol>
2077   <ttcol>Protocol</ttcol>
2078   <ttcol>Status</ttcol>
2079   <ttcol>Reference</ttcol>
2080
2081   <c>Age</c>
2082   <c>http</c>
2083   <c>standard</c>
2084   <c>
2085      <xref target="header.age"/>
2086   </c>
2087   <c>Cache-Control</c>
2088   <c>http</c>
2089   <c>standard</c>
2090   <c>
2091      <xref target="header.cache-control"/>
2092   </c>
2093   <c>Expires</c>
2094   <c>http</c>
2095   <c>standard</c>
2096   <c>
2097      <xref target="header.expires"/>
2098   </c>
2099   <c>Pragma</c>
2100   <c>http</c>
2101   <c>standard</c>
2102   <c>
2103      <xref target="header.pragma"/>
2104   </c>
2105   <c>Warning</c>
2106   <c>http</c>
2107   <c>standard</c>
2108   <c>
2109      <xref target="header.warning"/>
2110   </c>
2111</texttable>
2112<!--(END)-->
2113<?ENDINC p6-cache.iana-headers ?>
2114<t>
2115   The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task
2116   Force".
2117</t>
2118</section>
2119</section>
2120
2121<section anchor="security.considerations" title="Security Considerations">
2122<t>
2123   Caches expose additional potential vulnerabilities, since the contents of
2124   the cache represent an attractive target for malicious exploitation.
2125   Because cache contents persist after an HTTP request is complete, an attack
2126   on the cache can reveal information long after a user believes that the
2127   information has been removed from the network. Therefore, cache contents
2128   need to be protected as sensitive information.
2129</t>
2130<t>
2131   Implementation flaws might allow attackers to insert content into a cache
2132   ("cache poisoning"), leading to compromise of clients that trust that
2133   content. Because of their nature, these attacks are difficult to mitigate.
2134</t>
2135<t>
2136   Likewise, implementation flaws (as well as misunderstanding of cache
2137   operation) might lead to caching of sensitive information (e.g.,
2138   authentication credentials) that is thought to be private, exposing it to
2139   unauthorised parties.
2140</t>
2141<t>
2142   Note that the Set-Cookie response header <xref target="RFC6265"/> does not
2143   inhibit caching; a cacheable response with a Set-Cookie header can be (and
2144   often is) used to satisfy subsequent requests to caches. Servers who wish
2145   to control caching of these responses are encouraged to emit appropriate
2146   Cache-Control response headers.
2147</t>
2148
2149</section>
2150
2151<section title="Acknowledgments" anchor="acks">
2152<t>
2153  See &acks;.
2154</t>
2155</section>
2156
2157</middle>
2158
2159<back>
2160<references title="Normative References">
2161
2162  <reference anchor="Part1">
2163    <front>
2164      <title>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
2165      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2166        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2167        <address><email>fielding@gbiv.com</email></address>
2168      </author>
2169      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
2170        <organization abbrev="W3C">World Wide Web Consortium</organization>
2171        <address><email>ylafon@w3.org</email></address>
2172      </author>
2173      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2174        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2175        <address><email>julian.reschke@greenbytes.de</email></address>
2176      </author>
2177      <date month="&ID-MONTH;" year="&ID-YEAR;" />
2178    </front>
2179    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;" />
2180    <x:source basename="p1-messaging" href="p1-messaging.xml">
2181      <x:defines>Content-Length</x:defines>
2182      <x:defines>Via</x:defines>
2183    </x:source>
2184  </reference>
2185
2186  <reference anchor="Part2">
2187    <front>
2188      <title>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</title>
2189      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2190        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2191        <address><email>fielding@gbiv.com</email></address>
2192      </author>
2193      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
2194        <organization abbrev="W3C">World Wide Web Consortium</organization>
2195        <address><email>ylafon@w3.org</email></address>
2196      </author>
2197      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2198        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2199        <address><email>julian.reschke@greenbytes.de</email></address>
2200      </author>
2201      <date month="&ID-MONTH;" year="&ID-YEAR;" />
2202    </front>
2203    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-&ID-VERSION;" />
2204    <x:source basename="p2-semantics" href="p2-semantics.xml">
2205      <x:defines>2xx (Successful)</x:defines>
2206      <x:defines>200 (OK)</x:defines>
2207      <x:defines>203 (Non-Authoritative Information)</x:defines>
2208      <x:defines>3xx (Redirection)</x:defines>
2209      <x:defines>300 (Multiple Choices)</x:defines>
2210      <x:defines>301 (Moved Permanently)</x:defines>
2211      <x:defines>404 (Not Found)</x:defines>
2212      <x:defines>410 (Gone)</x:defines>
2213      <x:defines>5xx (Server Error)</x:defines>
2214      <x:defines>504 (Gateway Timeout)</x:defines>
2215      <x:defines>Content-Encoding</x:defines>
2216      <x:defines>Content-Location</x:defines>
2217      <x:defines>Content-Type</x:defines>
2218      <x:defines>Date</x:defines>
2219      <x:defines>Location</x:defines>
2220      <x:defines>Vary</x:defines>
2221    </x:source>
2222  </reference>
2223
2224  <reference anchor="Part4">
2225    <front>
2226      <title>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</title>
2227      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2228        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2229        <address><email>fielding@gbiv.com</email></address>
2230      </author>
2231      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
2232        <organization abbrev="W3C">World Wide Web Consortium</organization>
2233        <address><email>ylafon@w3.org</email></address>
2234      </author>
2235      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2236        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2237        <address><email>julian.reschke@greenbytes.de</email></address>
2238      </author>
2239      <date month="&ID-MONTH;" year="&ID-YEAR;" />
2240    </front>
2241    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p4-conditional-&ID-VERSION;" />
2242    <x:source basename="p4-conditional" href="p4-conditional.xml">
2243      <x:defines>304</x:defines>
2244      <x:defines>304 (Not Modified)</x:defines>
2245      <x:defines>ETag</x:defines>
2246      <x:defines>If-Modified-Since</x:defines>
2247      <x:defines>If-None-Match</x:defines>
2248      <x:defines>Last-Modified</x:defines>
2249    </x:source>
2250  </reference>
2251
2252  <reference anchor="Part5">
2253    <front>
2254      <title>Hypertext Transfer Protocol (HTTP/1.1): Range Requests</title>
2255      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2256        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2257        <address><email>fielding@gbiv.com</email></address>
2258      </author>
2259      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
2260        <organization abbrev="W3C">World Wide Web Consortium</organization>
2261        <address><email>ylafon@w3.org</email></address>
2262      </author>
2263      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2264        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2265        <address><email>julian.reschke@greenbytes.de</email></address>
2266      </author>
2267      <date month="&ID-MONTH;" year="&ID-YEAR;" />
2268    </front>
2269    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-&ID-VERSION;" />
2270    <x:source basename="p5-range" href="p5-range.xml">
2271      <x:defines>206 (Partial Content)</x:defines>
2272      <x:defines>Content-Range</x:defines>
2273      <x:defines>Range</x:defines>
2274    </x:source>
2275  </reference>
2276
2277  <reference anchor="Part7">
2278    <front>
2279      <title>Hypertext Transfer Protocol (HTTP/1.1): Authentication</title>
2280      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2281        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2282        <address><email>fielding@gbiv.com</email></address>
2283      </author>
2284      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
2285        <organization abbrev="W3C">World Wide Web Consortium</organization>
2286        <address><email>ylafon@w3.org</email></address>
2287      </author>
2288      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2289        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2290        <address><email>julian.reschke@greenbytes.de</email></address>
2291      </author>
2292      <date month="&ID-MONTH;" year="&ID-YEAR;" />
2293    </front>
2294    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p7-auth-&ID-VERSION;" />
2295    <x:source basename="p7-auth" href="p7-auth.xml">
2296      <x:defines>Authorization</x:defines>
2297    </x:source>
2298  </reference>
2299
2300  <reference anchor="RFC2119">
2301    <front>
2302      <title>Key words for use in RFCs to Indicate Requirement Levels</title>
2303      <author fullname="Scott Bradner" initials="S." surname="Bradner">
2304        <organization>Harvard University</organization>
2305        <address><email>sob@harvard.edu</email></address>
2306      </author>
2307      <date month="March" year="1997" />
2308    </front>
2309    <seriesInfo name="BCP" value="14" />
2310    <seriesInfo name="RFC" value="2119" />
2311  </reference>
2312
2313  <reference anchor="RFC5234">
2314    <front>
2315      <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
2316      <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
2317        <organization>Brandenburg InternetWorking</organization>
2318        <address>
2319          <email>dcrocker@bbiw.net</email>
2320        </address> 
2321      </author>
2322      <author initials="P." surname="Overell" fullname="Paul Overell">
2323        <organization>THUS plc.</organization>
2324        <address>
2325          <email>paul.overell@thus.net</email>
2326        </address>
2327      </author>
2328      <date month="January" year="2008"/>
2329    </front>
2330    <seriesInfo name="STD" value="68"/>
2331    <seriesInfo name="RFC" value="5234"/>
2332  </reference>
2333 
2334</references>
2335
2336<references title="Informative References">
2337
2338  <reference anchor="RFC1305">
2339    <front>
2340      <title>Network Time Protocol (Version 3) Specification, Implementation</title>
2341      <author fullname="David L. Mills" initials="D." surname="Mills">
2342        <organization>University of Delaware, Electrical Engineering Department</organization>
2343        <address><email>mills@udel.edu</email></address>
2344      </author>
2345      <date month="March" year="1992" />
2346    </front>
2347    <seriesInfo name="RFC" value="1305" />
2348  </reference>
2349
2350  <reference anchor="RFC2616">
2351    <front>
2352      <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
2353      <author fullname="R. Fielding" initials="R." surname="Fielding">
2354        <organization>University of California, Irvine</organization>
2355        <address><email>fielding@ics.uci.edu</email></address>
2356      </author>
2357      <author fullname="J. Gettys" initials="J." surname="Gettys">
2358        <organization>W3C</organization>
2359        <address><email>jg@w3.org</email></address>
2360      </author>
2361      <author fullname="J. Mogul" initials="J." surname="Mogul">
2362        <organization>Compaq Computer Corporation</organization>
2363        <address><email>mogul@wrl.dec.com</email></address>
2364      </author>
2365      <author fullname="H. Frystyk" initials="H." surname="Frystyk">
2366        <organization>MIT Laboratory for Computer Science</organization>
2367        <address><email>frystyk@w3.org</email></address>
2368      </author>
2369      <author fullname="L. Masinter" initials="L." surname="Masinter">
2370        <organization>Xerox Corporation</organization>
2371        <address><email>masinter@parc.xerox.com</email></address>
2372      </author>
2373      <author fullname="P. Leach" initials="P." surname="Leach">
2374        <organization>Microsoft Corporation</organization>
2375        <address><email>paulle@microsoft.com</email></address>
2376      </author>
2377      <author fullname="T. Berners-Lee" initials="T." surname="Berners-Lee">
2378        <organization>W3C</organization>
2379        <address><email>timbl@w3.org</email></address>
2380      </author>
2381      <date month="June" year="1999" />
2382    </front>
2383    <seriesInfo name="RFC" value="2616" />
2384  </reference>
2385
2386  <reference anchor="RFC3864">
2387    <front>
2388      <title>Registration Procedures for Message Header Fields</title>
2389      <author fullname="G. Klyne" initials="G." surname="Klyne">
2390        <organization>Nine by Nine</organization>
2391        <address><email>GK-IETF@ninebynine.org</email></address>
2392      </author>
2393      <author fullname="M. Nottingham" initials="M." surname="Nottingham">
2394        <organization>BEA Systems</organization>
2395        <address><email>mnot@pobox.com</email></address>
2396      </author>
2397      <author fullname="J. Mogul" initials="J." surname="Mogul">
2398        <organization>HP Labs</organization>
2399        <address><email>JeffMogul@acm.org</email></address>
2400      </author>
2401      <date month="September" year="2004" />
2402    </front>
2403    <seriesInfo name="BCP" value="90" />
2404    <seriesInfo name="RFC" value="3864" />
2405  </reference>
2406
2407  <reference anchor='RFC5226'>
2408    <front>
2409      <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
2410      <author initials='T.' surname='Narten' fullname='T. Narten'>
2411        <organization>IBM</organization>
2412        <address><email>narten@us.ibm.com</email></address>
2413      </author>
2414      <author initials='H.' surname='Alvestrand' fullname='H. Alvestrand'>
2415        <organization>Google</organization>
2416        <address><email>Harald@Alvestrand.no</email></address>
2417      </author>
2418      <date year='2008' month='May' />
2419    </front>
2420    <seriesInfo name='BCP' value='26' />
2421    <seriesInfo name='RFC' value='5226' />
2422  </reference>
2423
2424  <reference anchor='RFC5861'>
2425    <front>
2426      <title abbrev="HTTP stale controls">HTTP Cache-Control Extensions for Stale Content</title>
2427      <author initials="M." surname="Nottingham" fullname="Mark Nottingham">
2428        <organization>Yahoo! Inc.</organization>
2429        <address><email>mnot@yahoo-inc.com</email></address>
2430      </author>
2431      <date month="April" year="2010"/>
2432    </front>
2433    <seriesInfo name='RFC' value='5861' />
2434  </reference>
2435
2436  <reference anchor="RFC6265">
2437    <front>
2438      <title>HTTP State Management Mechanism</title>
2439      <author initials="A." surname="Barth" fullname="Adam Barth">
2440        <organization abbrev="U.C. Berkeley">
2441          University of California, Berkeley
2442        </organization>
2443        <address><email>abarth@eecs.berkeley.edu</email></address>
2444      </author>
2445      <date year="2011" month="April" />
2446    </front>
2447    <seriesInfo name="RFC" value="6265"/>
2448  </reference>
2449
2450</references>
2451
2452<section anchor="changes.from.rfc.2616" title="Changes from RFC 2616">
2453<t>
2454  Make the specified age calculation algorithm less conservative.
2455  (<xref target="age.calculations"/>)
2456</t>
2457<t>
2458  Remove requirement to consider "<x:ref>Content-Location</x:ref>" in successful
2459  responses in order to determine the appropriate response to use.
2460  (<xref target="validation.model" />)
2461</t>
2462<t>
2463  Clarify denial of service attack avoidance requirement.
2464  (<xref target="invalidation.after.updates.or.deletions" />)
2465</t>
2466<t>
2467  Do not mention RFC 2047 encoding and multiple languages in "<x:ref>Warning</x:ref>"
2468  header fields anymore, as these aspects never were implemented.
2469  (<xref target="header.warning" />)
2470</t>
2471<t>
2472  Introduce Cache Directive and Warn Code Registries.
2473  (<xref target="cache.control.extensions"/> and <xref target="warn.code.extensions"/>)
2474</t>
2475</section>
2476
2477<section title="Imported ABNF" anchor="imported.abnf">
2478   <x:anchor-alias value="ALPHA"/>
2479   <x:anchor-alias value="CR"/>
2480   <x:anchor-alias value="DIGIT"/>
2481   <x:anchor-alias value="DQUOTE"/>
2482   <x:anchor-alias value="LF"/>
2483   <x:anchor-alias value="OCTET"/>
2484   <x:anchor-alias value="SP"/>
2485   <x:anchor-alias value="VCHAR"/>
2486   <x:anchor-alias value="quoted-string"/>
2487   <x:anchor-alias value="token"/>
2488   <x:anchor-alias value="OWS"/>
2489   <x:anchor-alias value="field-name"/>
2490   <x:anchor-alias value="HTTP-date"/>
2491   <x:anchor-alias value="port"/>
2492   <x:anchor-alias value="pseudonym"/>
2493   <x:anchor-alias value="uri-host"/>
2494<t>
2495   The following core rules are included by reference, as defined in <xref
2496   target="RFC5234" x:fmt="of" x:sec="B.1"/>: ALPHA (letters), CR (carriage
2497   return), CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double
2498   quote), HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any 8-bit
2499   sequence of data), SP (space), and VCHAR (any visible US-ASCII character).
2500</t>
2501<t>
2502   The rules below are defined in <xref target="Part1"/>:
2503</t>
2504<figure><artwork type="abnf2616">
2505  <x:ref>OWS</x:ref>           = &lt;OWS, defined in &whitespace;&gt;
2506  <x:ref>field-name</x:ref>    = &lt;field-name, defined in &header-fields;&gt;
2507  <x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in &field-components;&gt;
2508  <x:ref>token</x:ref>         = &lt;token, defined in &field-components;&gt;
2509
2510  <x:ref>port</x:ref>          = &lt;port, defined in &uri;&gt;
2511  <x:ref>pseudonym</x:ref>     = &lt;pseudonym, defined in &header-via;&gt; 
2512  <x:ref>uri-host</x:ref>      = &lt;uri-host, defined in &uri;&gt;
2513</artwork></figure>
2514<t>
2515   The rules below are defined in other parts:
2516</t>
2517<figure><artwork type="abnf2616">
2518  <x:ref>HTTP-date</x:ref>     = &lt;HTTP-date, defined in &http-date;&gt;
2519</artwork></figure>
2520</section>
2521
2522<?BEGININC p6-cache.abnf-appendix ?>
2523<section xmlns:x="http://purl.org/net/xml2rfc/ext" title="Collected ABNF" anchor="collected.abnf">
2524<figure>
2525<artwork type="abnf" name="p6-cache.parsed-abnf">
2526<x:ref>Age</x:ref> = delta-seconds
2527
2528<x:ref>Cache-Control</x:ref> = *( "," OWS ) cache-directive *( OWS "," [ OWS
2529 cache-directive ] )
2530
2531<x:ref>Expires</x:ref> = HTTP-date
2532
2533<x:ref>HTTP-date</x:ref> = &lt;HTTP-date, defined in [Part2], Section 9.1&gt;
2534
2535<x:ref>OWS</x:ref> = &lt;OWS, defined in [Part1], Section 3.2.1&gt;
2536
2537<x:ref>Pragma</x:ref> = *( "," OWS ) pragma-directive *( OWS "," [ OWS
2538 pragma-directive ] )
2539
2540<x:ref>Warning</x:ref> = *( "," OWS ) warning-value *( OWS "," [ OWS warning-value ]
2541 )
2542
2543<x:ref>cache-directive</x:ref> = token [ "=" ( token / quoted-string ) ]
2544
2545<x:ref>delta-seconds</x:ref> = 1*DIGIT
2546
2547<x:ref>extension-pragma</x:ref> = token [ "=" ( token / quoted-string ) ]
2548
2549<x:ref>field-name</x:ref> = &lt;field-name, defined in [Part1], Section 3.2&gt;
2550
2551<x:ref>port</x:ref> = &lt;port, defined in [Part1], Section 2.7&gt;
2552<x:ref>pragma-directive</x:ref> = "no-cache" / extension-pragma
2553<x:ref>pseudonym</x:ref> = &lt;pseudonym, defined in [Part1], Section 5.7&gt;
2554
2555<x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in [Part1], Section 3.2.4&gt;
2556
2557<x:ref>token</x:ref> = &lt;token, defined in [Part1], Section 3.2.4&gt;
2558
2559<x:ref>uri-host</x:ref> = &lt;uri-host, defined in [Part1], Section 2.7&gt;
2560
2561<x:ref>warn-agent</x:ref> = ( uri-host [ ":" port ] ) / pseudonym
2562<x:ref>warn-code</x:ref> = 3DIGIT
2563<x:ref>warn-date</x:ref> = DQUOTE HTTP-date DQUOTE
2564<x:ref>warn-text</x:ref> = quoted-string
2565<x:ref>warning-value</x:ref> = warn-code SP warn-agent SP warn-text [ SP warn-date
2566 ]
2567</artwork>
2568</figure>
2569</section>
2570<?ENDINC p6-cache.abnf-appendix ?>
2571
2572<section anchor="change.log" title="Change Log (to be removed by RFC Editor before publication)">
2573<t>
2574  Changes up to the first Working Group Last Call draft are summarized
2575  in <eref target="http://trac.tools.ietf.org/html/draft-ietf-httpbis-p6-cache-19#appendix-C"/>.
2576</t>
2577
2578<section title="Since draft-ietf-httpbis-p6-cache-19" anchor="changes.since.19">
2579<t>
2580  Closed issues:
2581  <list style="symbols">
2582    <t>
2583      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/307"/>:
2584      "untangle Cache-Control ABNF"
2585    </t>
2586    <t>
2587      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/353"/>:
2588      "Multiple values in Cache-Control header fields"
2589    </t>
2590    <t>
2591      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/355"/>:
2592      "Case sensitivity of header fields in CC values"
2593    </t>
2594    <t>
2595      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/356"/>:
2596      "Spurious 'MAYs'"
2597    </t>
2598    <t>
2599      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/360"/>:
2600      "enhance considerations for new cache control directives"
2601    </t>
2602    <t>
2603      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/361"/>:
2604      "ABNF requirements for recipients"
2605    </t>
2606    <t>
2607      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/368"/>:
2608      "note introduction of new IANA registries as normative changes"
2609    </t>
2610    <t>
2611      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/373"/>:
2612      "broken prose in description of 'Vary'"
2613    </t>
2614  </list>
2615</t>
2616</section>
2617
2618<section title="Since draft-ietf-httpbis-p6-cache-20" anchor="changes.since.20">
2619<t>
2620  Closed issues:
2621  <list style="symbols">
2622    <t>
2623      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/375"/>:
2624      "'Most Conservative'"
2625    </t>
2626  </list>
2627</t>
2628<t>
2629  Other changes:
2630  <list style="symbols">
2631    <t>
2632      Conformance criteria and considerations regarding error handling are
2633      now defined in Part 1.
2634    </t>
2635    <t>
2636      Move definition of "Vary" header field into Part 2.
2637    </t>
2638    <t>
2639      Add security considerations with respect to cache poisoning and
2640      the "Set-Cookie" header field.
2641    </t>
2642  </list>
2643</t>
2644</section>
2645
2646</section>
2647  </back>
2648</rfc>
Note: See TracBrowser for help on using the repository browser.