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

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

Work-in-progress: hyperlink header field definitions(P5)

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