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

Last change on this file since 1746 was 1746, checked in by mnot@…, 7 years ago

rewrap some long lines in source

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