source: draft-ietf-httpbis/09/draft-ietf-httpbis-p6-cache-09.xml @ 772

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

Prepare publication of -09 drafts on March 08

File size: 91.7 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3    This XML document is the output of clean-for-DTD.xslt; a tool that strips
4    extensions to RFC2629(bis) from documents for processing with xml2rfc.
5-->
6<?xml-stylesheet type='text/xsl' href='../myxml2rfc.xslt'?>
7<?rfc toc="yes" ?>
8<?rfc symrefs="yes" ?>
9<?rfc sortrefs="yes" ?>
10<?rfc compact="yes"?>
11<?rfc subcompact="no" ?>
12<?rfc linkmailto="no" ?>
13<?rfc editing="no" ?>
14<?rfc comments="yes"?>
15<?rfc inline="yes"?>
16<!DOCTYPE rfc
17  PUBLIC "" "rfc2629.dtd">
18<rfc category="std" docName="draft-ietf-httpbis-p6-cache-09" ipr="pre5378Trust200902" obsoletes="2616">
19<front>
20
21  <title abbrev="HTTP/1.1, Part 6">HTTP/1.1, part 6: Caching</title>
22
23  <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
24    <organization abbrev="Day Software">Day Software</organization>
25    <address>
26      <postal>
27        <street>23 Corporate Plaza DR, Suite 280</street>
28        <city>Newport Beach</city>
29        <region>CA</region>
30        <code>92660</code>
31        <country>USA</country>
32      </postal>
33      <phone>+1-949-706-5300</phone>
34      <facsimile>+1-949-706-5305</facsimile>
35      <email>fielding@gbiv.com</email>
36      <uri>http://roy.gbiv.com/</uri>
37    </address>
38  </author>
39
40  <author fullname="Jim Gettys" initials="J." surname="Gettys">
41    <organization>One Laptop per Child</organization>
42    <address>
43      <postal>
44        <street>21 Oak Knoll Road</street>
45        <city>Carlisle</city>
46        <region>MA</region>
47        <code>01741</code>
48        <country>USA</country>
49      </postal>
50      <email>jg@laptop.org</email>
51      <uri>http://www.laptop.org/</uri>
52    </address>
53  </author>
54
55  <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
56    <organization abbrev="HP">Hewlett-Packard Company</organization>
57    <address>
58      <postal>
59        <street>HP Labs, Large Scale Systems Group</street>
60        <street>1501 Page Mill Road, MS 1177</street>
61        <city>Palo Alto</city>
62        <region>CA</region>
63        <code>94304</code>
64        <country>USA</country>
65      </postal>
66      <email>JeffMogul@acm.org</email>
67    </address>
68  </author>
69
70  <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
71    <organization abbrev="Microsoft">Microsoft Corporation</organization>
72    <address>
73      <postal>
74        <street>1 Microsoft Way</street>
75        <city>Redmond</city>
76        <region>WA</region>
77        <code>98052</code>
78        <country>USA</country>
79      </postal>
80      <email>henrikn@microsoft.com</email>
81    </address>
82  </author>
83
84  <author fullname="Larry Masinter" initials="L." surname="Masinter">
85    <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
86    <address>
87      <postal>
88        <street>345 Park Ave</street>
89        <city>San Jose</city>
90        <region>CA</region>
91        <code>95110</code>
92        <country>USA</country>
93      </postal>
94      <email>LMM@acm.org</email>
95      <uri>http://larry.masinter.net/</uri>
96    </address>
97  </author>
98
99  <author fullname="Paul J. Leach" initials="P." surname="Leach">
100    <organization abbrev="Microsoft">Microsoft Corporation</organization>
101    <address>
102      <postal>
103        <street>1 Microsoft Way</street>
104        <city>Redmond</city>
105        <region>WA</region>
106        <code>98052</code>
107      </postal>
108      <email>paulle@microsoft.com</email>
109    </address>
110  </author>
111
112  <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
113    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
114    <address>
115      <postal>
116        <street>MIT Computer Science and Artificial Intelligence Laboratory</street>
117        <street>The Stata Center, Building 32</street>
118        <street>32 Vassar Street</street>
119        <city>Cambridge</city>
120        <region>MA</region>
121        <code>02139</code>
122        <country>USA</country>
123      </postal>
124      <email>timbl@w3.org</email>
125      <uri>http://www.w3.org/People/Berners-Lee/</uri>
126    </address>
127  </author>
128
129  <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
130    <organization abbrev="W3C">World Wide Web Consortium</organization>
131    <address>
132      <postal>
133        <street>W3C / ERCIM</street>
134        <street>2004, rte des Lucioles</street>
135        <city>Sophia-Antipolis</city>
136        <region>AM</region>
137        <code>06902</code>
138        <country>France</country>
139      </postal>
140      <email>ylafon@w3.org</email>
141      <uri>http://www.raubacapeu.net/people/yves/</uri>
142    </address>
143  </author>
144
145  <author fullname="Mark Nottingham" initials="M." role="editor" surname="Nottingham">
146    <address>
147      <email>mnot@mnot.net</email>
148      <uri>http://www.mnot.net/</uri>
149    </address>
150  </author>
151
152  <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
153    <organization abbrev="greenbytes">greenbytes GmbH</organization>
154    <address>
155      <postal>
156        <street>Hafenweg 16</street>
157        <city>Muenster</city><region>NW</region><code>48155</code>
158        <country>Germany</country>
159      </postal>
160      <phone>+49 251 2807760</phone>
161      <facsimile>+49 251 2807761</facsimile>
162      <email>julian.reschke@greenbytes.de</email>
163      <uri>http://greenbytes.de/tech/webdav/</uri>
164    </address>
165  </author>
166
167  <date month="March" year="2010" day="8"/>
168  <workgroup>HTTPbis Working Group</workgroup>
169
170<abstract>
171<t>
172  The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed,
173  collaborative, hypermedia information systems. This document is Part 6 of the seven-part
174  specification that defines the protocol referred to as "HTTP/1.1" and, taken together,
175  obsoletes RFC 2616. Part 6 defines requirements on HTTP caches and the associated header
176  fields that control cache behavior or indicate cacheable response messages.
177</t>
178</abstract>
179
180<note title="Editorial Note (To be removed by RFC Editor)">
181<t>
182  Discussion of this draft should take place on the HTTPBIS working group mailing list
183  (ietf-http-wg@w3.org). The current issues list is at <eref target="http://tools.ietf.org/wg/httpbis/trac/report/11"/> and related documents
184  (including fancy diffs) can be found at <eref target="http://tools.ietf.org/wg/httpbis/"/>.
185</t>
186<t>
187  The changes in this draft are summarized in <xref target="changes.since.08"/>.
188</t>
189</note>
190
191  </front>
192  <middle>
193
194<section anchor="caching" title="Introduction">
195<t>
196  HTTP is typically used for distributed information systems, where performance can be
197  improved by the use of response caches. This document defines aspects of HTTP/1.1 related to
198  caching and reusing response messages.
199</t>
200
201<section anchor="intro.purpose" title="Purpose">
202<iref item="cache"/>
203<t>
204  An HTTP cache is a local store of response messages and the subsystem that
205  controls its message storage, retrieval, and deletion. A cache stores cacheable responses
206  in order to reduce the response time and network bandwidth consumption on future,
207  equivalent requests. Any client or server may include a cache, though a cache cannot be
208  used by a server that is acting as a tunnel.
209</t>
210<t>
211  Caching would be useless if it did not significantly improve performance. The goal of
212  caching in HTTP/1.1 is to reuse a prior response message to satisfy a current request. In
213  some cases, a stored response can be reused without the need for a network request,
214  reducing latency and network round-trips; a "freshness" mechanism is used for this purpose
215  (see <xref target="expiration.model"/>). Even when a new request is required, it is often
216  possible to reuse all or parts of the payload of a prior response to satisfy the request,
217  thereby reducing network bandwidth usage; a "validation" mechanism is used for this
218  purpose (see <xref target="validation.model"/>).
219</t>
220</section>
221
222<section anchor="intro.terminology" title="Terminology">
223<t>
224  This specification uses a number of terms to refer to the roles played by participants
225  in, and objects of, HTTP caching.
226</t>
227<t>
228  <iref item="cacheable"/>
229  <?rfc needLines="4"?>cacheable
230  <list>
231    <t>A response is cacheable if a cache is allowed to store a copy of the response message
232      for use in answering subsequent requests. Even when a response is cacheable, there may
233      be additional constraints on whether a cache can use the cached copy to satisfy a
234      particular request.</t>
235  </list>
236</t>
237<t>
238  <iref item="explicit expiration time"/>
239  <?rfc needLines="4"?>explicit expiration time
240  <list>
241    <t>The time at which the origin server intends that an entity should no longer be
242      returned by a cache without further validation.</t>
243  </list>
244</t>
245<t>
246  <iref item="heuristic expiration time"/>
247  <?rfc needLines="4"?>heuristic expiration time
248  <list>
249    <t>An expiration time assigned by a cache when no explicit expiration time is
250    available.</t>
251  </list>
252</t>
253<t>
254  <iref item="age"/>
255  <?rfc needLines="4"?>age
256  <list>
257    <t>The age of a response is the time since it was sent by, or successfully validated
258      with, the origin server.</t>
259  </list>
260</t>
261<t>
262  <iref item="first-hand"/>
263  <?rfc needLines="4"?>first-hand
264  <list>
265    <t>A response is first-hand if the freshness model is not in use; i.e., its age is
266    0.</t>
267  </list>
268</t>
269<t>
270  <iref item="freshness lifetime"/>
271  <?rfc needLines="4"?>freshness lifetime
272  <list>
273    <t>The length of time between the generation of a response and its expiration time. </t>
274  </list>
275</t>
276<t>
277  <iref item="fresh"/>
278  <?rfc needLines="4"?>fresh
279  <list>
280    <t>A response is fresh if its age has not yet exceeded its freshness lifetime.</t>
281  </list>
282</t>
283<t>
284  <iref item="stale"/>
285  <?rfc needLines="4"?>stale
286  <list>
287    <t>A response is stale if its age has passed its freshness lifetime (either explicit or heuristic).</t>
288  </list>
289</t>
290<t>
291  <iref item="validator"/>
292  <?rfc needLines="4"?>validator
293  <list>
294    <t>A protocol element (e.g., an entity tag or a Last-Modified time) that is used to find
295      out whether a stored response is an equivalent copy of an entity.</t>
296  </list>
297</t>
298<t anchor="shared.and.non-shared.caches">
299  <iref item="validator"/>
300  <?rfc needLines="4"?>shared cache
301  <list>
302    <t>A cache that is accessible to more than one user. A non-shared cache is
303      dedicated to a single user.</t>
304  </list>
305</t>
306</section>
307
308<section anchor="intro.requirements" title="Requirements">
309<t>
310  The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD
311  NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as
312  described in <xref target="RFC2119"/>.
313</t>
314<t>
315  An implementation is not compliant if it fails to satisfy one or more of the MUST
316  or REQUIRED level requirements for the protocols it implements. An implementation
317  that satisfies all the MUST or REQUIRED level and all the SHOULD level
318  requirements for its protocols is said to be "unconditionally compliant"; one that
319  satisfies all the MUST level requirements but not all the SHOULD level
320  requirements for its protocols is said to be "conditionally compliant."
321</t>
322</section>
323
324<section title="Syntax Notation" anchor="notation">
325 
326 
327 
328 
329 
330 
331 
332 
333 
334<t>
335  This specification uses the ABNF syntax defined in Section 1.2 of <xref target="Part1"/> (which
336  extends the syntax defined in <xref target="RFC5234"/> with a list rule).
337  <xref target="collected.abnf"/> shows the collected ABNF, with the list
338  rule expanded.
339</t>
340<t>
341  The following core rules are included by
342  reference, as defined in <xref target="RFC5234"/>, Appendix B.1:
343  ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls),
344  DIGIT (decimal 0-9), DQUOTE (double quote),
345  HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed),
346  OCTET (any 8-bit sequence of data), SP (space),
347  VCHAR (any visible USASCII character),
348  and WSP (whitespace).
349</t>
350
351<section title="Core Rules" anchor="core.rules">
352 
353 
354 
355<t>
356  The core rules below are defined in Section 1.2.2 of <xref target="Part1"/>:
357</t>
358<figure><artwork type="abnf2616"><![CDATA[
359  quoted-string = <quoted-string, defined in [Part1], Section 1.2.2>
360  token         = <token, defined in [Part1], Section 1.2.2>
361  OWS           = <OWS, defined in [Part1], Section 1.2.2>
362]]></artwork></figure>
363</section>
364
365<section title="ABNF Rules defined in other Parts of the Specification" anchor="abnf.dependencies">
366 
367 
368 
369 
370 
371<t>
372  The ABNF rules below are defined in other parts:
373</t>
374<figure><artwork type="abnf2616"><![CDATA[
375  field-name    = <field-name, defined in [Part1], Section 3.2>
376  HTTP-date     = <HTTP-date, defined in [Part1], Section 6.1>
377  port          = <port, defined in [Part1], Section 2.6>
378  pseudonym     = <pseudonym, defined in [Part1], Section 9.9>
379  uri-host      = <uri-host, defined in [Part1], Section 2.6>
380]]></artwork></figure>
381</section>
382
383</section>
384</section>
385
386<section anchor="caching.overview" title="Cache Operation">
387
388<section anchor="response.cacheability" title="Response Cacheability">
389<t>
390  A cache MUST NOT store a response to any request, unless:
391  <list style="symbols">
392    <t>The request method is understood by the cache and defined as being cacheable, and</t>
393    <t>the response status code is understood by the cache, and</t>
394    <t>the "no-store" cache directive (see <xref target="header.cache-control"/>) does not
395       appear in request or response headers, and</t>
396    <t>the "private" cache response directive (see <xref target="cache-response-directive"/>
397       does not appear in the response, if the cache is shared, and</t>
398    <t>the "Authorization" header (see Section 3.1 of <xref target="Part7"/>) does not appear in the request, if
399       the cache is shared (unless the "public" directive is present; see <xref target="header.cache-control"/>), and</t>
400    <t>the response either:
401      <list style="symbols">
402        <t>contains an Expires header (see <xref target="header.expires"/>), or</t>
403        <t>contains a max-age response cache directive (see <xref target="cache-response-directive"/>), or</t>
404        <t>contains a s-maxage response cache directive and the cache is shared, or</t>
405        <t>contains a Cache Control Extension (see <xref target="cache.control.extensions"/>) that allows it to be cached, or</t>
406        <t>has a status code that can be served with heuristic freshness (see <xref target="heuristic.freshness"/>).</t>
407      </list>
408    </t>
409  </list>
410</t>
411<t>
412  In this context, a cache has "understood" a request method or a response status
413  code if it recognises it and implements any cache-specific behaviour. In
414  particular, 206 Partial Content responses cannot be cached by an
415  implementation that does not handle partial content
416  (see <xref target="errors.or.incomplete.response.cache.behavior"/>).
417</t>
418<t>
419  Note that in normal operation, most caches will not store a response that has neither a
420  cache validator nor an explicit expiration time, as such responses are not usually
421  useful to store. However, caches are not prohibited from storing such responses.
422</t>
423
424<section anchor="errors.or.incomplete.response.cache.behavior" title="Storing Partial and Incomplete Responses">
425<t>
426  A cache that receives an incomplete response (for example, with fewer bytes of data
427  than specified in a Content-Length header) can store the response, but MUST
428  treat it as a partial response <xref target="Part5"/>. Partial responses
429  can be combined as described in Section 4 of <xref target="Part5"/>; the result might be a
430  full response or might still be partial. A cache MUST NOT return a partial
431  response to a client without explicitly marking it as such using the 206 (Partial
432  Content) status code.
433</t>
434<t>
435  A cache that does not support the Range and Content-Range headers MUST NOT store
436  incomplete or partial responses.
437</t>
438</section>
439
440</section>
441
442
443<section anchor="constructing.responses.from.caches" title="Constructing Responses from Caches">
444<t>
445  For a presented request, a cache MUST NOT return a stored response, unless:
446  <list style="symbols">
447    <t>The presented Request-URI and that of the stored response match
448      (<cref anchor="TODO-Request-URI">Need to find a new term for this, as Part
449      1 doesn't define Request-URI anymore; the new term request-target does not
450      work for this. (see &lt;http://tools.ietf.org/wg/httpbis/trac/ticket/196&gt;)</cref>), and</t>
451    <t>the request method associated with the stored response allows it to be
452      used for the presented request, and</t>
453    <t>selecting request-headers nominated by the stored response (if any) match those presented (see <xref target="caching.negotiated.responses"/>), and</t>
454    <t>the presented request and stored response are free from directives that would prevent
455      its use (see <xref target="header.cache-control"/> and <xref target="header.pragma"/>),
456      and</t>
457    <t>the stored response is either:
458      <list style="symbols">
459        <t>fresh (see <xref target="expiration.model"/>), or</t>
460        <t>allowed to be served stale (see <xref target="serving.stale.responses"/>), or</t>
461        <t>successfully validated (see <xref target="validation.model"/>).</t>
462      </list>
463    </t>
464  </list>
465</t>
466<t>
467  <cref anchor="TODO-method-cacheability">define method cacheability for GET, HEAD and POST in p2-semantics.</cref>
468</t>
469<t>
470  When a stored response is used to satisfy a request, caches MUST include a
471  single Age header field (<xref target="header.age"/>) in the response with a value equal to the stored response's
472  current_age; see <xref target="age.calculations"/>.
473  <cref anchor="DISCUSS-includes-validated">this currently includes successfully validated responses.</cref>
474</t>
475<t>
476  Requests with methods that are unsafe (Section 7.1.1 of <xref target="Part2"/>) MUST be written through the cache to
477  the origin server; i.e., a cache must not reply to such a request before having forwarded the request and having received a
478  corresponding response.
479</t>
480<t>
481  Also, note that unsafe requests might invalidate already stored responses; see
482  <xref target="invalidation.after.updates.or.deletions"/>.
483</t>
484<t>
485  Caches MUST use the most recent response (as determined by the Date header) when
486  more than one suitable response is stored. They can also forward a request with
487  "Cache-Control: max-age=0" or "Cache-Control: no-cache" to disambiguate which response to
488  use.
489</t>
490<t>
491  <cref anchor="TODO-header-properties">end-to-end and hop-by-hop headers, non-modifiable headers removed; re-spec in p1</cref>
492</t>
493</section>
494
495<section anchor="expiration.model" title="Freshness Model">
496<t>
497  When a response is "fresh" in the cache, it can be used to satisfy subsequent
498  requests without contacting the origin server, thereby improving efficiency.
499</t>
500<t>
501  The primary mechanism for determining freshness is for an origin server to provide an
502  explicit expiration time in the future, using either the Expires header (<xref target="header.expires"/>) or the max-age response cache directive (<xref target="cache-response-directive"/>). Generally, origin servers will assign future
503  explicit expiration times to responses in the belief that the entity is not likely to
504  change in a semantically significant way before the expiration time is reached.
505</t>
506<t>
507  If an origin server wishes to force a cache to validate every request, it can
508  assign an explicit expiration time in the past. This means that the response is always
509  stale, so that caches should validate it before using it for subsequent requests.
510  <cref anchor="TODO-response-stale">This wording may cause confusion, because the response may still be served stale.</cref>
511</t>
512<t>
513  Since origin servers do not always provide explicit expiration times, HTTP caches may
514  also assign heuristic expiration times when they are not specified, employing algorithms that
515  use other header values (such as the Last-Modified time) to estimate a plausible
516  expiration time. The HTTP/1.1 specification does not provide specific algorithms, but does
517  impose worst-case constraints on their results.
518</t>
519<figure>
520<preamble>
521  The calculation to determine if a response is fresh is:
522</preamble>
523<artwork type="code"><![CDATA[
524   response_is_fresh = (freshness_lifetime > current_age)
525]]></artwork>
526</figure>
527
528<t>
529  The freshness_lifetime is defined in <xref target="calculating.freshness.lifetime"/>;
530  the current_age is defined in <xref target="age.calculations"/>.
531</t>
532<t>
533  Additionally, clients may need to influence freshness calculation. They can do this using
534  several request cache directives, with the effect of either increasing or loosening
535  constraints on freshness. See <xref target="cache-request-directive"/>.
536</t>
537<t>
538  <cref anchor="ISSUE-no-req-for-directives">there are not requirements directly applying to cache-request-directives and
539  freshness.</cref>
540</t>
541<t>
542  Note that freshness applies only to cache operation; it cannot be used to force a user agent
543  to refresh its display or reload a resource. See <xref target="history.lists"/> for an explanation of
544  the difference between caches and history mechanisms.
545</t>
546
547<section anchor="calculating.freshness.lifetime" title="Calculating Freshness Lifetime">
548<t>
549  A cache can calculate the freshness lifetime (denoted as freshness_lifetime) of a
550  response by using the first match of:
551  <list style="symbols">
552    <t>If the cache is shared and the s-maxage response cache directive (<xref target="cache-response-directive"/>) is present, use its value, or</t>
553    <t>If the max-age response cache directive (<xref target="cache-response-directive"/>) is present, use its value, or</t>
554    <t>If the Expires response header (<xref target="header.expires"/>) is present, use
555      its value minus the value of the Date response header, or</t>
556    <t>Otherwise, no explicit expiration time is present in the response, but a heuristic
557      may be used; see <xref target="heuristic.freshness"/>.</t>
558  </list>
559</t>
560<t>
561  Note that this calculation is not vulnerable to clock skew, since all of the
562  information comes from the origin server.
563</t>
564
565<section anchor="heuristic.freshness" title="Calculating Heuristic Freshness">
566<t>
567  If no explicit expiration time is present in a stored response that has a status code
568  of 200, 203, 206, 300, 301 or 410, a heuristic expiration time can be
569  calculated. Heuristics MUST NOT be used for other response status codes.
570</t>
571<t>
572  When a heuristic is used to calculate freshness lifetime, the cache SHOULD
573  attach a Warning header with a 113 warn-code to the response if its current_age is
574  more than 24 hours and such a warning is not already present.
575</t>
576<t>
577  Also, if the response has a Last-Modified header (Section 6.6 of <xref target="Part4"/>), the
578  heuristic expiration value SHOULD be no more than some fraction of the interval
579  since that time. A typical setting of this fraction might be 10%.
580</t>
581<t>
582  <cref anchor="REVIEW-query-string-heuristics">took away HTTP/1.0 query string heuristic uncacheability.</cref>
583</t>
584</section>
585</section>
586
587<section anchor="age.calculations" title="Calculating Age">
588<t>
589  HTTP/1.1 uses the Age response-header to convey the estimated age of the response
590  message when obtained from a cache. The Age field value is the cache's estimate of the
591  amount of time since the response was generated or validated by the origin server. In
592  essence, the Age value is the sum of the time that the response has been resident in
593  each of the caches along the path from the origin server, plus the amount of time it has
594  been in transit along network paths.
595</t>
596<t>
597  The term "age_value" denotes the value of the Age header, in a form appropriate for
598  arithmetic operations.
599</t>
600<t>
601  HTTP/1.1 requires origin servers to send a Date header, if possible, with every
602  response, giving the time at which the response was generated (see Section 9.3 of <xref target="Part1"/>).
603  The term "date_value" denotes the value of the Date header, in a form appropriate for
604  arithmetic operations.
605</t>
606<t>
607  The term "now" means "the current value of the clock at the host performing the
608  calculation." Hosts that use HTTP, but especially hosts running origin servers and
609  caches, SHOULD use NTP <xref target="RFC1305"/> or some similar protocol to
610  synchronize their clocks to a globally accurate time standard.
611</t>
612<t>
613  A response's age can be calculated in two entirely independent ways:
614  <list style="numbers">
615    <t>now minus date_value, if the local clock is reasonably well synchronized to the
616      origin server's clock. If the result is negative, the result is replaced by zero.</t>
617    <t>age_value, if all of the caches along the response path implement HTTP/1.1.</t>
618  </list>
619</t>
620<figure>
621<preamble>These are combined as</preamble>
622<artwork type="code"><![CDATA[
623    corrected_received_age = max(now - date_value, age_value)
624]]></artwork></figure>
625<t>
626  When an Age value is received, it MUST be interpreted relative to the time the
627  request was initiated, not the time that the response was received.
628</t>
629<figure><artwork type="code"><![CDATA[
630   corrected_initial_age = corrected_received_age
631                         + (now - request_time)
632]]></artwork></figure>
633<t>
634  where "request_time" is the time (according to the local clock) when the request that
635  elicited this response was sent.
636</t>
637<t>
638  The current_age of a stored response can then be calculated by adding the amount of
639  time (in seconds) since the stored response was last validated by the origin server to
640  the corrected_initial_age.
641</t>
642<t>
643  In summary:
644</t>
645<figure><artwork type="code"><![CDATA[
646  age_value     - Age header field-value received with the response
647  date_value    - Date header field-value received with the response
648  request_time  - local time when the cache made the request
649                 resulting in the stored response
650  response_time - local time when the cache received the response
651  now           - current local time
652 
653  apparent_age = max(0, response_time - date_value);
654  corrected_received_age = max(apparent_age, age_value);
655  response_delay = response_time - request_time;
656  corrected_initial_age = corrected_received_age + response_delay;
657  resident_time = now - response_time;
658  current_age   = corrected_initial_age + resident_time;
659]]></artwork></figure>
660</section>
661
662<section anchor="serving.stale.responses" title="Serving Stale Responses">
663<t>
664  A "stale" response is one that either has explicit expiry information, or is allowed to
665  have heuristic expiry calculated, but is not fresh according to the calculations in
666  <xref target="expiration.model"/>.
667</t>
668<t>
669  Caches MUST NOT return a stale response if it is prohibited by an explicit
670  in-protocol directive (e.g., by a "no-store" or "no-cache" cache directive, a
671  "must-revalidate" cache-response-directive, or an applicable "s-maxage" or
672  "proxy-revalidate" cache-response-directive; see <xref target="cache-response-directive"/>).
673</t>
674<t>
675  Caches SHOULD NOT return stale responses unless they are
676  disconnected (i.e., it cannot contact the origin server or otherwise find a forward path)
677  or otherwise explicitly allowed (e.g., the max-stale request directive; see <xref target="cache-request-directive"/>).
678</t>
679<t>
680  Stale responses SHOULD have a Warning header with the 110 warn-code (see <xref target="header.warning"/>). Likewise, the 112 warn-code SHOULD be sent on stale responses if
681  the cache is disconnected.
682</t>
683<t>
684  If a cache receives a first-hand response (either an entire response, or a 304 (Not
685  Modified) response) that it would normally forward to the requesting client, and the
686  received response is no longer fresh, the cache SHOULD forward it to the
687  requesting client without adding a new Warning (but without removing any existing
688  Warning headers). A cache SHOULD NOT attempt to validate a response simply because
689  that response became stale in transit.
690</t>
691</section>
692</section>
693
694<section anchor="validation.model" title="Validation Model">
695<t>
696  When a cache has one or more stored responses for a requested URI, but cannot 
697  serve any of them (e.g., because they are not fresh, or one cannot be selected;
698  see <xref target="caching.negotiated.responses"/>),
699  it can use the conditional request mechanism <xref target="Part4"/> in the forwarded
700  request to give the origin server an opportunity to both select a valid stored
701  response to be used, and to update it. This process is known as "validating"
702  or "revalidating" the stored response.
703</t>
704<t>
705  When sending such a conditional request, the cache SHOULD add an If-Modified-Since
706  header whose value is that of the Last-Modified header from the selected
707  (see <xref target="caching.negotiated.responses"/>) stored response, if available.
708</t>
709<t>
710  Additionally, the cache SHOULD add an If-None-Match header whose value 
711  is that of the ETag header(s) from all responses stored for the requested URI,
712  if present. However, if any of the stored responses contains only partial
713  content, its entity-tag SHOULD NOT be included in the If-None-Match header
714  field unless the request is for a range that would be fully satisfied by
715  that stored response.
716</t>
717<t>
718  A 304 (Not Modified) response status code indicates that the stored
719  response can be updated and reused; see <xref target="combining.headers"/>.
720</t>
721<t>
722  A full response (i.e., one with a response body) indicates that none 
723  of the stored responses nominated in the conditional request is
724  suitable. Instead, the full response is used both to satisfy the
725  request and replace the stored response. <cref anchor="TODO-req-missing">Should there be a requirement here?</cref>
726</t>
727<t>
728  If a cache receives a 5xx response while attempting to validate a response, it MAY
729  either forward this response to the requesting client, or act as if the server failed to
730  respond. In the latter case, it MAY return a previously stored response (see <xref target="serving.stale.responses"/>).
731</t>
732</section>
733
734<section anchor="invalidation.after.updates.or.deletions" title="Request Methods that Invalidate">
735<t>
736  Because unsafe methods (Section 7.1.1 of <xref target="Part2"/>) have the potential for changing state on the
737  origin server, intervening caches can use them to keep their contents
738  up-to-date.
739</t>
740<t>
741  The following HTTP methods MUST cause a cache to invalidate the Request-URI as well
742  as the URI(s) in the Location and Content-Location headers (if present):
743  <list style="symbols">
744    <t>PUT</t>
745    <t>DELETE</t>
746    <t>POST</t>
747  </list>
748</t>
749<t>
750  An invalidation based on a URI from a Location or Content-Location header MUST NOT
751  be performed if the host part of that URI differs from the host part in the Request-URI.
752  This helps prevent denial of service attacks.
753</t>
754<t>
755  <cref anchor="TODO-def-host-part">"host part" needs to be specified better.</cref>
756</t>
757<t>
758  A cache that passes through requests for methods it does not understand SHOULD
759  invalidate the Request-URI.
760</t>
761<t>
762  Here, "invalidate" means that the cache will either remove all stored responses related
763  to the Request-URI, or will mark these as "invalid" and in need of a mandatory validation
764  before they can be returned in response to a subsequent request.
765</t>
766<t>
767  Note that this does not guarantee that all appropriate responses are invalidated. For
768  example, the request that caused the change at the origin server might not have gone
769  through the cache where a response is stored.
770</t>
771<t>
772  <cref anchor="TODO-spec-success-invalidate">specify that only successful (2xx, 3xx?) responses invalidate.</cref>
773</t>
774</section>
775
776<section anchor="caching.negotiated.responses" title="Caching Negotiated Responses">
777<t>
778  When a cache receives a request that can be satisfied by a stored response
779  that has a Vary header field (<xref target="header.vary"/>), it MUST NOT use that
780  response unless all of the selecting request-headers nominated by the Vary header match
781  in both the original request (i.e., that associated with the stored response),
782  and the presented request.
783</t>
784<t>
785  The selecting request-headers from two requests are defined to match
786  if and only if those in the first request can be transformed to those in the
787  second request by applying any of the following:
788  <list style="symbols">
789    <t>
790      adding or removing whitespace, where allowed in the header's syntax
791    </t>
792    <t>
793      combining multiple message-header fields with the same field name (see
794      Section 3.2 of <xref target="Part1"/>)
795    </t>
796    <t>
797      normalizing both header values in a way that is known to have identical
798      semantics, according to the header's specification (e.g., re-ordering field values
799      when order is not significant; case-normalization, where values are defined to be
800      case-insensitive)   
801    </t>
802  </list>
803</t>
804<t>
805  If (after any normalisation that may take place) a header field is absent
806  from a request, it can only match another request if it is also absent there.
807</t>
808<t>
809  A Vary header field-value of "*" always fails to match, and subsequent requests to that
810  resource can only be properly interpreted by the origin server.
811</t>
812<t>
813  The stored response with matching selecting request-headers is known as the
814  selected response.
815</t>
816<t>
817  If no selected response is available, the cache MAY forward the presented
818  request to the origin server in a conditional request; see <xref target="validation.model"/>.
819</t>
820</section>
821
822<section anchor="combining.headers" title="Combining Responses">
823<t>
824  When a cache receives a 304 (Not Modified) response or a 206 (Partial Content) response
825  (in this section, the "new" response"), it needs to created an updated response by combining
826  the stored response with the new one, so that the updated response can be used to satisfy the request.
827</t>
828<t>
829  If the new response contains an ETag, it identifies the stored 
830  response to use. <cref anchor="TODO-mention-CL">may need language about Content-Location 
831  here</cref><cref anchor="TODO-inm-mult-etags">cover case where INM with multiple etags was sent</cref>
832</t>
833<t>
834  If the status code is 206 (partial content), both the stored and new 
835  responses MUST have validators, and those validators MUST match using the strong 
836  comparison function (see Section 4 of <xref target="Part4"/>). Otherwise, the 
837  responses MUST NOT be combined.
838</t>
839<t>
840  The stored response headers are used as those of the updated response, except that
841  <list style="symbols">
842    <t>any stored Warning headers with warn-code 1xx (see <xref target="header.warning"/>)
843      MUST be deleted from the stored response and the updated response.</t>
844    <t>any stored Warning headers with warn-code 2xx MUST be retained in the stored
845      response and the updated response.</t>
846    <t>any headers provided in the new response MUST replace the corresponding
847      headers from the stored response.</t>
848  </list>
849</t>
850<t>
851  If a header field-name in the new response matches more than one 
852  header in the stored response, all such stored headers MUST be replaced.
853</t>
854<t>
855  The updated response can <cref anchor="TODO-is-req">requirement?</cref> be used to replace the 
856  stored response in cache. In the case of a 206 response, the combined 
857  entity-body MAY be stored.
858</t>
859<t>
860  <cref anchor="ISSUE-how-head">discuss how to handle HEAD updates</cref>
861</t>
862</section>
863
864</section>
865
866<section anchor="header.fields" title="Header Field Definitions">
867<t>
868  This section defines the syntax and semantics of HTTP/1.1 header fields
869  related to caching.
870</t>
871<t>
872  For entity-header fields, both sender and recipient refer to either the client or the
873  server, depending on who sends and who receives the entity.
874</t>
875
876<section anchor="header.age" title="Age">
877  <iref item="Age header" primary="true"/>
878  <iref item="Headers" primary="true" subitem="Age"/>
879 
880 
881 
882<t>
883  The "Age" response-header field conveys the sender's estimate of the amount
884  of time since the response was generated or successfully validated at the
885  origin server. Age values are calculated as specified in
886  <xref target="age.calculations"/>.
887</t>
888<figure><iref primary="true" item="Grammar" subitem="Age"/><iref primary="true" item="Grammar" subitem="Age-v"/><artwork type="abnf2616"><![CDATA[
889  Age   = "Age" ":" OWS Age-v
890  Age-v = delta-seconds
891]]></artwork></figure>
892<t anchor="rule.delta-seconds">
893 
894  Age field-values are non-negative integers, representing time in seconds.
895</t>
896<figure><iref item="Grammar" primary="true" subitem="delta-seconds"/><artwork type="abnf2616"><![CDATA[
897  delta-seconds  = 1*DIGIT
898]]></artwork></figure>
899<t>
900  If a cache receives a value larger than the largest positive integer it can represent, or
901  if any of its age calculations overflows, it MUST transmit an Age header with a
902  field-value of 2147483648 (2^31). Caches SHOULD use an arithmetic type
903  of at least 31 bits of range.
904</t>
905<t>
906  The presence of an Age header field in a response implies that a response is not
907  first-hand. However, the converse is not true, since HTTP/1.0 caches may not implement the
908  Age header field.
909</t>
910</section>
911
912<section anchor="header.cache-control" title="Cache-Control">
913  <iref item="Cache-Control header" primary="true"/>
914  <iref item="Headers" primary="true" subitem="Cache-Control"/>
915 
916 
917 
918 
919 
920 
921<t>
922  The "Cache-Control" general-header field is used to specify directives that
923  MUST be obeyed by all caches along the request/response chain. Such cache
924  directives are unidirectional in that the presence of a directive in a
925  request does not imply that the same directive is to be given in the
926  response.
927</t>
928<t><list>
929  <t>
930    Note that HTTP/1.0 caches might not implement Cache-Control and might only implement
931    Pragma: no-cache (see <xref target="header.pragma"/>).
932  </t>
933</list></t>
934<t>
935  Cache directives MUST be passed through by a proxy or gateway application,
936  regardless of their significance to that application, since the directives might be
937  applicable to all recipients along the request/response chain. It is not possible to
938  target a directive to a specific cache.
939</t>
940<figure><iref primary="true" item="Grammar" subitem="Cache-Control"/><iref primary="true" item="Grammar" subitem="Cache-Control-v"/><iref primary="true" item="Grammar" subitem="cache-extension"/><artwork type="abnf2616"><![CDATA[
941  Cache-Control   = "Cache-Control" ":" OWS Cache-Control-v
942  Cache-Control-v = 1#cache-directive
943
944  cache-directive = cache-request-directive
945     / cache-response-directive
946
947  cache-extension = token [ "=" ( token / quoted-string ) ]
948]]></artwork></figure>
949
950<section anchor="cache-request-directive" title="Request Cache-Control Directives">
951 
952
953<figure><iref item="Grammar" primary="true" subitem="cache-request-directive"/><artwork type="abnf2616"><![CDATA[
954  cache-request-directive =
955       "no-cache"
956     / "no-store"
957     / "max-age" "=" delta-seconds
958     / "max-stale" [ "=" delta-seconds ]
959     / "min-fresh" "=" delta-seconds
960     / "no-transform"
961     / "only-if-cached"
962     / cache-extension
963]]></artwork></figure>
964
965<t>
966  <iref item="Cache Directives" primary="true" subitem="no-cache"/>
967  <iref item="no-cache" primary="true" subitem="Cache Directive"/>
968  no-cache
969  <list>
970    <t>The no-cache request directive indicates that a stored response MUST NOT be
971      used to satisfy the request without successful validation on the origin server.</t>
972  </list>
973</t>
974<t>
975  <iref item="Cache Directives" primary="true" subitem="no-store"/>
976  <iref item="no-store" primary="true" subitem="Cache Directive"/>
977  no-store
978  <list>
979    <t>The no-store request directive indicates that a cache MUST NOT store any part
980      of either this request or any response to it. This directive applies to both
981      non-shared and shared caches. "MUST NOT store" in this context means that the
982      cache MUST NOT intentionally store the information in non-volatile storage,
983      and MUST make a best-effort attempt to remove the information from volatile
984      storage as promptly as possible after forwarding it.</t>
985    <t>This directive is NOT a reliable or sufficient mechanism for ensuring privacy. In
986      particular, malicious or compromised caches might not recognize or obey this
987      directive, and communications networks may be vulnerable to eavesdropping.</t>
988  </list>
989</t>
990<t>
991  <iref item="Cache Directives" primary="true" subitem="max-age"/>
992  <iref item="max-age" primary="true" subitem="Cache Directive"/>
993  max-age
994  <list>
995    <t>The max-age request directive indicates that the client is willing to accept a
996      response whose age is no greater than the specified time in seconds. Unless
997      max-stale directive is also included, the client is not willing to accept a stale
998      response.</t>
999  </list>
1000</t>
1001<t>
1002  <iref item="Cache Directives" primary="true" subitem="max-stale"/>
1003  <iref item="max-stale" primary="true" subitem="Cache Directive"/>
1004  max-stale
1005  <list>
1006    <t>The max-stale request directive indicates that the client is willing to accept a
1007      response that has exceeded its expiration time. If max-stale is assigned a value,
1008      then the client is willing to accept a response that has exceeded its expiration
1009      time by no more than the specified number of seconds. If no value is assigned to
1010      max-stale, then the client is willing to accept a stale response of any age. <cref anchor="TODO-staleness" source="mnot">of any staleness?</cref></t>
1011  </list>
1012</t>
1013<t>
1014  <iref item="Cache Directives" primary="true" subitem="min-fresh"/>
1015  <iref item="min-fresh" primary="true" subitem="Cache Directive"/>
1016  min-fresh
1017  <list>
1018    <t>The min-fresh request directive indicates that the client is willing to accept a
1019      response whose freshness lifetime is no less than its current age plus the specified
1020      time in seconds. That is, the client wants a response that will still be fresh for
1021      at least the specified number of seconds.</t>
1022  </list>
1023</t>
1024<t>
1025  <iref item="Cache Directives" primary="true" subitem="no-transform"/>
1026  <iref item="no-transform" primary="true" subitem="Cache Directive"/>
1027  no-transform
1028  <list>
1029    <t>The no-transform request directive indicates that an intermediate cache or proxy
1030      MUST NOT change the Content-Encoding, Content-Range or Content-Type request
1031      headers, nor the request entity-body.</t>
1032  </list>
1033</t>
1034<t>
1035  <iref item="Cache Directives" primary="true" subitem="only-if-cached"/>
1036  <iref item="only-if-cached" primary="true" subitem="Cache Directive"/>
1037  only-if-cached
1038  <list>
1039    <t>The only-if-cached request directive indicates that the client only wishes to
1040      return a stored response. If it receives this directive, a cache SHOULD either
1041      respond using a stored response that is consistent with the other constraints of the
1042      request, or respond with a 504 (Gateway Timeout) status. If a group of caches is
1043      being operated as a unified system with good internal connectivity, such a request
1044      MAY be forwarded within that group of caches.</t>
1045  </list>
1046</t>
1047</section>
1048
1049<section anchor="cache-response-directive" title="Response Cache-Control Directives">
1050 
1051
1052<figure><iref item="Grammar" primary="true" subitem="cache-response-directive"/><artwork type="abnf2616"><![CDATA[
1053  cache-response-directive =
1054       "public"
1055     / "private" [ "=" DQUOTE 1#field-name DQUOTE ]
1056     / "no-cache" [ "=" DQUOTE 1#field-name DQUOTE ]
1057     / "no-store"
1058     / "no-transform"
1059     / "must-revalidate"
1060     / "proxy-revalidate"
1061     / "max-age" "=" delta-seconds
1062     / "s-maxage" "=" delta-seconds
1063     / cache-extension
1064]]></artwork></figure>
1065
1066<t>
1067  <iref item="Cache Directives" primary="true" subitem="public"/>
1068  <iref item="public" primary="true" subitem="Cache Directive"/>
1069  public
1070  <list>
1071    <t>The public response directive indicates that the response MAY be cached, even
1072      if it would normally be non-cacheable or cacheable only within a non-shared cache.
1073      (See also Authorization, Section 3.1 of <xref target="Part7"/>, for additional details.) </t>
1074  </list>
1075</t>
1076<t>
1077  <iref item="Cache Directives" primary="true" subitem="private"/>
1078  <iref item="private" primary="true" subitem="Cache Directive"/>
1079  private
1080  <list>
1081    <t>The private response directive indicates that the response message is intended for
1082      a single user and MUST NOT be stored by a shared cache. A private (non-shared)
1083      cache MAY store the response.</t>
1084    <t>If the private response directive specifies one or more field-names, this
1085      requirement is limited to the field-values associated with the listed response
1086      headers. That is, the specified field-names(s) MUST NOT be stored by a shared
1087      cache, whereas the remainder of the response message MAY be.</t>
1088    <t>
1089      Note: This usage of the word private only controls where the response may
1090      be stored, and cannot ensure the privacy of the message content.
1091      Also, private response directives with field-names are often handled by
1092      implementations as if an unqualified private directive was received; i.e.,
1093      the special handling for the qualified form is not widely implemented.
1094</t>
1095  </list>
1096</t>
1097<t>
1098  <iref item="Cache Directives" primary="true" subitem="no-cache"/>
1099  <iref item="no-cache" primary="true" subitem="Cache Directive"/>
1100  no-cache
1101  <list>
1102    <t>The no-cache response directive indicates that the response MUST NOT be used to
1103      satisfy a subsequent request without successful validation on the origin server.
1104      This allows an origin server to prevent caching even by caches that have been
1105      configured to return stale responses.</t>
1106    <t>If the no-cache response directive specifies one or more field-names, this
1107      requirement is limited to the field-values associated with the listed response
1108      headers. That is, the specified field-name(s) MUST NOT be sent in the response
1109      to a subsequent request without successful validation on the origin server. This
1110      allows an origin server to prevent the re-use of certain header fields in a
1111      response, while still allowing caching of the rest of the response.</t>
1112    <t>
1113      Note: Most HTTP/1.0 caches will not recognize or obey this directive.
1114      Also, no-cache response directives with field-names are often handled by
1115      implementations as if an unqualified no-cache directive was received; i.e.,
1116      the special handling for the qualified form is not widely implemented.
1117    </t>
1118  </list>
1119</t>
1120
1121<t>
1122  <iref item="Cache Directives" primary="true" subitem="no-store"/>
1123  <iref item="no-store" primary="true" subitem="Cache Directive"/>
1124  no-store
1125  <list>
1126    <t>The no-store response directive indicates that a cache MUST NOT store any
1127      part of either the immediate request or response. This directive applies to both
1128      non-shared and shared caches. "MUST NOT store" in this context means that the
1129      cache MUST NOT intentionally store the information in non-volatile storage,
1130      and MUST make a best-effort attempt to remove the information from volatile
1131      storage as promptly as possible after forwarding it.</t>
1132    <t>This directive is NOT a reliable or sufficient mechanism for ensuring privacy. In
1133      particular, malicious or compromised caches might not recognize or obey this
1134      directive, and communications networks may be vulnerable to eavesdropping.</t>
1135  </list>
1136</t>
1137<t>
1138  <iref item="Cache Directives" primary="true" subitem="must-revalidate"/>
1139  <iref item="must-revalidate" primary="true" subitem="Cache Directive"/>
1140  must-revalidate
1141  <list>
1142    <t>The must-revalidate response directive indicates that once it has become stale, the response MUST NOT be
1143     used to satisfy subsequent requests without successful validation on the origin server.</t>
1144    <t>The must-revalidate directive is necessary to support reliable operation for
1145      certain protocol features. In all circumstances an HTTP/1.1 cache MUST obey
1146      the must-revalidate directive; in particular, if the cache cannot reach the origin
1147      server for any reason, it MUST generate a 504 (Gateway Timeout) response.</t>
1148    <t>Servers SHOULD send the must-revalidate directive if and only if failure to
1149      validate a request on the entity could result in incorrect operation, such as a
1150      silently unexecuted financial transaction.</t>
1151  </list>
1152</t>
1153<t>
1154  <iref item="Cache Directives" primary="true" subitem="proxy-revalidate"/>
1155  <iref item="proxy-revalidate" primary="true" subitem="Cache Directive"/>
1156  proxy-revalidate
1157  <list>
1158    <t>The proxy-revalidate response directive has the same meaning as the must-revalidate
1159      response directive, except that it does not apply to non-shared caches.</t>
1160  </list>
1161</t>
1162<t>
1163  <iref item="Cache Directives" primary="true" subitem="max-age"/>
1164  <iref item="max-age" primary="true" subitem="Cache Directive"/>
1165  max-age
1166  <list>
1167    <t>The max-age response directive indicates that response is to be considered stale
1168      after its age is greater than the specified number of seconds.</t>
1169  </list>
1170</t>
1171<t>
1172  <iref item="Cache Directives" primary="true" subitem="s-maxage"/>
1173  <iref item="s-maxage" primary="true" subitem="Cache Directive"/>
1174  s-maxage
1175  <list>
1176    <t>The s-maxage response directive indicates that, in shared caches, the maximum age
1177      specified by this directive overrides the maximum age specified by either the
1178      max-age directive or the Expires header. The s-maxage directive also implies the
1179      semantics of the proxy-revalidate response directive.</t>
1180  </list>
1181</t>
1182<t>
1183  <iref item="Cache Directives" primary="true" subitem="no-transform"/>
1184  <iref item="no-transform" primary="true" subitem="Cache Directive"/>
1185  no-transform
1186  <list>
1187    <t>The no-transform response directive indicates that an intermediate cache or proxy
1188      MUST NOT change the Content-Encoding, Content-Range or Content-Type response
1189      headers, nor the response entity-body.</t>
1190  </list>
1191</t>
1192
1193</section>
1194
1195<section anchor="cache.control.extensions" title="Cache Control Extensions">
1196<t>
1197  The Cache-Control header field can be extended through the use of one or more
1198  cache-extension tokens, each with an optional value. Informational extensions (those
1199  that do not require a change in cache behavior) can be added without changing the
1200  semantics of other directives. Behavioral extensions are designed to work by acting as
1201  modifiers to the existing base of cache directives. Both the new directive and the
1202  standard directive are supplied, such that applications that do not understand the new
1203  directive will default to the behavior specified by the standard directive, and those
1204  that understand the new directive will recognize it as modifying the requirements
1205  associated with the standard directive. In this way, extensions to the cache-control
1206  directives can be made without requiring changes to the base protocol.
1207</t>
1208<t>
1209  This extension mechanism depends on an HTTP cache obeying all of the cache-control
1210  directives defined for its native HTTP-version, obeying certain extensions, and ignoring
1211  all directives that it does not understand.
1212</t>
1213<t>
1214  For example, consider a hypothetical new response directive called "community" that
1215  acts as a modifier to the private directive. We define this new directive to mean that,
1216  in addition to any non-shared cache, any cache that is shared only by members of the
1217  community named within its value may cache the response. An origin server wishing to
1218  allow the UCI community to use an otherwise private response in their shared cache(s)
1219  could do so by including
1220</t>
1221<figure><artwork type="example"><![CDATA[
1222  Cache-Control: private, community="UCI"
1223]]></artwork></figure>
1224<t>
1225  A cache seeing this header field will act correctly even if the cache does not
1226  understand the community cache-extension, since it will also see and understand the
1227  private directive and thus default to the safe behavior.
1228</t>
1229<t>
1230  Unrecognized cache directives MUST be ignored; it is assumed that any cache
1231  directive likely to be unrecognized by an HTTP/1.1 cache will be combined with standard
1232  directives (or the response's default cacheability) such that the cache behavior will
1233  remain minimally correct even if the cache does not understand the extension(s).
1234</t>
1235</section>
1236
1237</section>
1238
1239<section anchor="header.expires" title="Expires">
1240  <iref item="Expires header" primary="true"/>
1241  <iref item="Headers" primary="true" subitem="Expires"/>
1242 
1243 
1244<t>
1245  The "Expires" entity-header field gives the date/time after which the response is
1246  considered stale. See <xref target="expiration.model"/> for further discussion of the
1247  freshness model.
1248</t>
1249<t>
1250  The presence of an Expires field does not imply that the original resource will change or
1251  cease to exist at, before, or after that time.
1252</t>
1253<t>
1254  The field-value is an absolute date and time as defined by HTTP-date in Section 6.1 of <xref target="Part1"/>;
1255  it MUST be sent in rfc1123-date format.
1256</t>
1257<figure><iref primary="true" item="Grammar" subitem="Expires"/><iref primary="true" item="Grammar" subitem="Expires-v"/><artwork type="abnf2616"><![CDATA[
1258  Expires   = "Expires" ":" OWS Expires-v
1259  Expires-v = HTTP-date
1260]]></artwork></figure>
1261<figure>
1262  <preamble>For example</preamble>
1263<artwork type="example"><![CDATA[
1264  Expires: Thu, 01 Dec 1994 16:00:00 GMT
1265]]></artwork></figure>
1266<t><list>
1267  <t>
1268    Note: If a response includes a Cache-Control field with the max-age
1269    directive (see <xref target="cache-response-directive"/>), that directive overrides
1270    the Expires field. Likewise, the s-maxage directive overrides Expires in shared caches.
1271  </t>
1272</list></t>
1273<t>
1274  HTTP/1.1 servers SHOULD NOT send Expires dates more than one year in the future.
1275</t>
1276<t>
1277  HTTP/1.1 clients and caches MUST treat other invalid date formats, especially
1278  including the value "0", as in the past (i.e., "already expired").
1279</t>
1280</section>
1281
1282<section anchor="header.pragma" title="Pragma">
1283  <iref item="Pragma header" primary="true"/>
1284  <iref item="Headers" primary="true" subitem="Pragma"/>
1285 
1286 
1287 
1288 
1289<t>
1290  The "Pragma" general-header field is used to include implementation-specific directives
1291  that might apply to any recipient along the request/response chain. All pragma directives
1292  specify optional behavior from the viewpoint of the protocol; however, some systems
1293  MAY require that behavior be consistent with the directives.
1294</t>
1295<figure><iref primary="true" item="Grammar" subitem="Pragma"/><iref primary="true" item="Grammar" subitem="Pragma-v"/><iref primary="true" item="Grammar" subitem="pragma-directive"/><iref primary="true" item="Grammar" subitem="extension-pragma"/><artwork type="abnf2616"><![CDATA[
1296  Pragma            = "Pragma" ":" OWS Pragma-v
1297  Pragma-v          = 1#pragma-directive
1298  pragma-directive  = "no-cache" / extension-pragma
1299  extension-pragma  = token [ "=" ( token / quoted-string ) ]
1300]]></artwork></figure>
1301<t>
1302  When the no-cache directive is present in a request message, an application SHOULD
1303  forward the request toward the origin server even if it has a cached copy of what is being
1304  requested. This pragma directive has the same semantics as the no-cache response directive
1305  (see <xref target="cache-response-directive"/>) and is defined here for backward
1306  compatibility with HTTP/1.0. Clients SHOULD include both header fields when a
1307  no-cache request is sent to a server not known to be HTTP/1.1 compliant. HTTP/1.1 caches
1308  SHOULD treat "Pragma: no-cache" as if the client had sent "Cache-Control: no-cache".
1309</t>
1310<t><list>
1311  <t>
1312    Note: Because the meaning of "Pragma: no-cache" as a response-header field
1313    is not actually specified, it does not provide a reliable replacement for
1314    "Cache-Control: no-cache" in a response.
1315  </t>
1316</list></t>
1317<t>
1318  This mechanism is deprecated; no new Pragma directives will be defined in HTTP.
1319</t>
1320</section>
1321
1322<section anchor="header.vary" title="Vary">
1323  <iref item="Vary header" primary="true"/>
1324  <iref item="Headers" primary="true" subitem="Vary"/>
1325 
1326 
1327<t>
1328  The "Vary" response-header field conveys the set of request-header fields
1329  that were used to select the representation.
1330</t>
1331<t>
1332  Caches use this information, in part, to determine whether a stored response
1333  can be used to satisfy a given request; see
1334  <xref target="caching.negotiated.responses"/>.
1335  determines, while the response is fresh, whether a cache is permitted to use the
1336  response to reply to a subsequent request without validation; see <xref target="caching.negotiated.responses"/>.
1337</t>
1338<t>
1339  In uncacheable or stale responses, the Vary field value advises the user agent about
1340  the criteria that were used to select the representation.
1341</t>
1342<figure><iref primary="true" item="Grammar" subitem="Vary"/><iref primary="true" item="Grammar" subitem="Vary-v"/><artwork type="abnf2616"><![CDATA[
1343  Vary   = "Vary" ":" OWS Vary-v
1344  Vary-v = "*" / 1#field-name
1345]]></artwork></figure>
1346<t>
1347  The set of header fields named by the Vary field value is known as the selecting
1348  request-headers.
1349</t>
1350<t>
1351  Servers SHOULD include a Vary header field with any cacheable response that is
1352  subject to server-driven negotiation. Doing so allows a cache to properly interpret future
1353  requests on that resource and informs the user agent about the presence of negotiation on
1354  that resource. A server MAY include a Vary header field with a non-cacheable
1355  response that is subject to server-driven negotiation, since this might provide the user
1356  agent with useful information about the dimensions over which the response varies at the
1357  time of the response.
1358</t>
1359<t>
1360  A Vary field value of "*" signals that unspecified parameters not limited to the
1361  request-headers (e.g., the network address of the client), play a role in the selection of
1362  the response representation; therefore, a cache cannot determine whether this response is
1363  appropriate. The "*" value MUST NOT be generated by a proxy server;
1364  it may only be generated by an origin server.
1365</t>
1366<t>
1367  The field-names given are not limited to the set of standard request-header fields
1368  defined by this specification. Field names are case-insensitive.
1369</t>
1370</section>
1371
1372<section anchor="header.warning" title="Warning">
1373  <iref item="Warning header" primary="true"/>
1374  <iref item="Headers" primary="true" subitem="Warning"/>
1375 
1376 
1377 
1378 
1379 
1380 
1381 
1382<t>
1383  The "Warning" general-header field is used to carry additional information about the status
1384  or transformation of a message that might not be reflected in the message. This
1385  information is typically used to warn about possible incorrectness introduced by caching
1386  operations or transformations applied to the entity body of the message.
1387</t>
1388<t>
1389  Warnings can be used for other purposes, both cache-related and otherwise. The use of a
1390  warning, rather than an error status code, distinguishes these responses from true failures.
1391</t>
1392<t>
1393  Warning headers can in general be applied to any message, however some warn-codes are
1394  specific to caches and can only be applied to response messages.
1395</t>
1396<figure><iref primary="true" item="Grammar" subitem="Warning"/><iref primary="true" item="Grammar" subitem="Warning-v"/><iref primary="true" item="Grammar" subitem="warning-value"/><iref primary="true" item="Grammar" subitem="warn-code"/><iref primary="true" item="Grammar" subitem="warn-agent"/><iref primary="true" item="Grammar" subitem="warn-text"/><iref primary="true" item="Grammar" subitem="warn-date"/><artwork type="abnf2616"><![CDATA[
1397  Warning    = "Warning" ":" OWS Warning-v
1398  Warning-v  = 1#warning-value
1399 
1400  warning-value = warn-code SP warn-agent SP warn-text
1401                                        [SP warn-date]
1402 
1403  warn-code  = 3DIGIT
1404  warn-agent = ( uri-host [ ":" port ] ) / pseudonym
1405                  ; the name or pseudonym of the server adding
1406                  ; the Warning header, for use in debugging
1407  warn-text  = quoted-string
1408  warn-date  = DQUOTE HTTP-date DQUOTE
1409]]></artwork></figure>
1410<t>
1411  Multiple warnings can be attached to a response (either by the origin server or by
1412  a cache), including multiple warnings with the same code number, only differing
1413  in warn-text.
1414</t>
1415<t>
1416  When this occurs, the user agent SHOULD inform the user of as many of them as
1417  possible, in the order that they appear in the response.
1418</t>
1419<t>
1420  Systems that generate multiple Warning headers SHOULD order them with this user
1421  agent behavior in mind. New Warning headers SHOULD be added after any existing
1422  Warning headers.
1423</t>
1424<t>
1425  Warnings are assigned three digit warn-codes. The first digit indicates whether the
1426  Warning is required to be deleted from a stored response after validation:
1427  <list style="symbols">
1428    <t>1xx Warnings describe the freshness or validation status of the response, and so
1429      MUST be deleted by caches after validation. They can only be generated by a cache
1430      when validating a cached entry, and MUST NOT be generated in any other situation.</t>
1431    <t>2xx Warnings describe some aspect of the entity body or entity headers that is
1432      not rectified by a validation (for example, a lossy compression of the entity bodies)
1433      and MUST NOT be deleted by caches after validation, unless a full response is
1434      returned, in which case they MUST be.</t>
1435  </list>
1436</t>
1437<t>
1438  If an implementation sends a message with one or more Warning headers to a receiver whose
1439  version is HTTP/1.0 or lower, then the sender MUST include in each warning-value a
1440  warn-date that matches the Date header in the message.
1441</t>
1442<t>
1443  If an implementation receives a message with a warning-value that includes a warn-date,
1444  and that warn-date is different from the Date value in the response, then that
1445  warning-value MUST be deleted from the message before storing, forwarding, or using
1446  it. (preventing the consequences of naive caching of Warning header fields.) If all of the
1447  warning-values are deleted for this reason, the Warning header MUST be deleted as
1448  well.
1449</t>
1450<t>
1451  The following warn-codes are defined by this specification, each with a recommended
1452  warn-text in English, and a description of its meaning.
1453</t>
1454<t>
1455<?rfc needLines="4"?>
1456  110 Response is stale
1457  <list>
1458    <t>SHOULD be included whenever the returned response is stale.</t>
1459  </list>
1460</t>
1461<t>
1462<?rfc needLines="4"?>
1463  111 Revalidation failed
1464  <list>
1465    <t>SHOULD be included if a cache returns a stale response because an attempt to
1466      validate the response failed, due to an inability to reach the server.</t>
1467  </list>
1468</t>
1469<t>
1470<?rfc needLines="4"?>
1471  112 Disconnected operation
1472  <list>
1473    <t>SHOULD be included if the cache is intentionally disconnected from the rest of
1474      the network for a period of time.</t>
1475  </list>
1476</t>
1477<t>
1478<?rfc needLines="4"?>
1479  113 Heuristic expiration
1480  <list>
1481    <t>SHOULD be included if the cache heuristically chose a freshness lifetime
1482      greater than 24 hours and the response's age is greater than 24 hours.</t>
1483  </list>
1484</t>
1485<t>
1486<?rfc needLines="4"?>
1487  199 Miscellaneous warning
1488  <list>
1489    <t>The warning text can include arbitrary information to be presented to a human
1490      user, or logged. A system receiving this warning MUST NOT take any automated
1491      action, besides presenting the warning to the user.</t>
1492  </list>
1493</t>
1494<t>
1495<?rfc needLines="4"?>
1496  214 Transformation applied
1497  <list>
1498    <t>MUST be added by an intermediate cache or proxy if it applies any
1499      transformation changing the content-coding (as specified in the Content-Encoding
1500      header) or media-type (as specified in the Content-Type header) of the response, or
1501      the entity-body of the response, unless this Warning code already appears in the
1502      response.</t>
1503  </list>
1504</t>
1505<t>
1506<?rfc needLines="4"?>
1507  299 Miscellaneous persistent warning
1508  <list>
1509    <t>The warning text can include arbitrary information to be presented to a human
1510      user, or logged. A system receiving this warning MUST NOT take any automated
1511      action.</t>
1512  </list>
1513</t>
1514</section>
1515
1516</section>
1517
1518<section anchor="history.lists" title="History Lists">
1519<t>
1520  User agents often have history mechanisms, such as "Back" buttons and history lists, that
1521  can be used to redisplay an entity retrieved earlier in a session.
1522</t>
1523<t>
1524  The freshness model (<xref target="expiration.model"/>) does not necessarily apply to history mechanisms. I.e.,
1525  a history mechanism can display a previous representation even if it has expired.
1526</t>
1527  <t>
1528  This does not prohibit the history mechanism from telling the user that a
1529  view might be stale, or from honoring cache directives (e.g., Cache-Control: no-store).
1530  </t>
1531</section>
1532
1533
1534<section anchor="IANA.considerations" title="IANA Considerations">
1535
1536<section anchor="message.header.registration" title="Message Header Registration">
1537<t>
1538  The Message Header Registry located at <eref target="http://www.iana.org/assignments/message-headers/message-header-index.html"/>
1539  should be updated with the permanent registrations below (see <xref target="RFC3864"/>):
1540</t>
1541
1542<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
1543<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
1544   <ttcol>Header Field Name</ttcol>
1545   <ttcol>Protocol</ttcol>
1546   <ttcol>Status</ttcol>
1547   <ttcol>Reference</ttcol>
1548
1549   <c>Age</c>
1550   <c>http</c>
1551   <c>standard</c>
1552   <c>
1553      <xref target="header.age"/>
1554   </c>
1555   <c>Cache-Control</c>
1556   <c>http</c>
1557   <c>standard</c>
1558   <c>
1559      <xref target="header.cache-control"/>
1560   </c>
1561   <c>Expires</c>
1562   <c>http</c>
1563   <c>standard</c>
1564   <c>
1565      <xref target="header.expires"/>
1566   </c>
1567   <c>Pragma</c>
1568   <c>http</c>
1569   <c>standard</c>
1570   <c>
1571      <xref target="header.pragma"/>
1572   </c>
1573   <c>Vary</c>
1574   <c>http</c>
1575   <c>standard</c>
1576   <c>
1577      <xref target="header.vary"/>
1578   </c>
1579   <c>Warning</c>
1580   <c>http</c>
1581   <c>standard</c>
1582   <c>
1583      <xref target="header.warning"/>
1584   </c>
1585</texttable>
1586<!--(END)-->
1587
1588<t>
1589  The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".
1590</t>
1591</section>
1592
1593</section>
1594
1595<section anchor="security.considerations" title="Security Considerations">
1596<t>
1597  Caches expose additional potential vulnerabilities, since the contents of the cache
1598  represent an attractive target for malicious exploitation. Because cache contents persist
1599  after an HTTP request is complete, an attack on the cache can reveal information long after
1600  a user believes that the information has been removed from the network. Therefore, cache
1601  contents should be protected as sensitive information.
1602</t>
1603</section>
1604
1605<section anchor="ack" title="Acknowledgments">
1606<t>
1607  Much of the content and presentation of the caching design is due to suggestions and
1608  comments from individuals including: Shel Kaphan, Paul Leach, Koen Holtman, David Morris,
1609  and Larry Masinter.
1610</t>
1611</section>
1612
1613</middle>
1614
1615<back>
1616<references title="Normative References">
1617
1618  <reference anchor="Part1">
1619    <front>
1620      <title abbrev="HTTP/1.1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title>
1621      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
1622        <organization abbrev="Day Software">Day Software</organization>
1623        <address><email>fielding@gbiv.com</email></address>
1624      </author>
1625      <author fullname="Jim Gettys" initials="J." surname="Gettys">
1626        <organization>One Laptop per Child</organization>
1627        <address><email>jg@laptop.org</email></address>
1628      </author>
1629      <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
1630        <organization abbrev="HP">Hewlett-Packard Company</organization>
1631        <address><email>JeffMogul@acm.org</email></address>
1632      </author>
1633      <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
1634        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1635        <address><email>henrikn@microsoft.com</email></address>
1636      </author>
1637      <author fullname="Larry Masinter" initials="L." surname="Masinter">
1638        <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1639        <address><email>LMM@acm.org</email></address>
1640      </author>
1641      <author fullname="Paul J. Leach" initials="P." surname="Leach">
1642        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1643        <address><email>paulle@microsoft.com</email></address>
1644      </author>
1645      <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
1646        <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1647        <address><email>timbl@w3.org</email></address>
1648      </author>
1649      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
1650        <organization abbrev="W3C">World Wide Web Consortium</organization>
1651        <address><email>ylafon@w3.org</email></address>
1652      </author>
1653      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
1654        <organization abbrev="greenbytes">greenbytes GmbH</organization>
1655        <address><email>julian.reschke@greenbytes.de</email></address>
1656      </author>
1657      <date month="March" year="2010"/>
1658    </front>
1659    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-09"/>
1660   
1661  </reference>
1662
1663  <reference anchor="Part2">
1664    <front>
1665      <title abbrev="HTTP/1.1">HTTP/1.1, part 2: Message Semantics</title>
1666      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
1667        <organization abbrev="Day Software">Day Software</organization>
1668        <address><email>fielding@gbiv.com</email></address>
1669      </author>
1670      <author fullname="Jim Gettys" initials="J." surname="Gettys">
1671        <organization>One Laptop per Child</organization>
1672        <address><email>jg@laptop.org</email></address>
1673      </author>
1674      <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
1675        <organization abbrev="HP">Hewlett-Packard Company</organization>
1676        <address><email>JeffMogul@acm.org</email></address>
1677      </author>
1678      <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
1679        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1680        <address><email>henrikn@microsoft.com</email></address>
1681      </author>
1682      <author fullname="Larry Masinter" initials="L." surname="Masinter">
1683        <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1684        <address><email>LMM@acm.org</email></address>
1685      </author>
1686      <author fullname="Paul J. Leach" initials="P." surname="Leach">
1687        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1688        <address><email>paulle@microsoft.com</email></address>
1689      </author>
1690      <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
1691        <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1692        <address><email>timbl@w3.org</email></address>
1693      </author>
1694      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
1695        <organization abbrev="W3C">World Wide Web Consortium</organization>
1696        <address><email>ylafon@w3.org</email></address>
1697      </author>
1698      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
1699        <organization abbrev="greenbytes">greenbytes GmbH</organization>
1700        <address><email>julian.reschke@greenbytes.de</email></address>
1701      </author>
1702      <date month="March" year="2010"/>
1703    </front>
1704    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-09"/>
1705   
1706  </reference>
1707
1708  <reference anchor="Part4">
1709    <front>
1710      <title abbrev="HTTP/1.1">HTTP/1.1, part 4: Conditional Requests</title>
1711      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
1712        <organization abbrev="Day Software">Day Software</organization>
1713        <address><email>fielding@gbiv.com</email></address>
1714      </author>
1715      <author fullname="Jim Gettys" initials="J." surname="Gettys">
1716        <organization>One Laptop per Child</organization>
1717        <address><email>jg@laptop.org</email></address>
1718      </author>
1719      <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
1720        <organization abbrev="HP">Hewlett-Packard Company</organization>
1721        <address><email>JeffMogul@acm.org</email></address>
1722      </author>
1723      <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
1724        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1725        <address><email>henrikn@microsoft.com</email></address>
1726      </author>
1727      <author fullname="Larry Masinter" initials="L." surname="Masinter">
1728        <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1729        <address><email>LMM@acm.org</email></address>
1730      </author>
1731      <author fullname="Paul J. Leach" initials="P." surname="Leach">
1732        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1733        <address><email>paulle@microsoft.com</email></address>
1734      </author>
1735      <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
1736        <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1737        <address><email>timbl@w3.org</email></address>
1738      </author>
1739      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
1740        <organization abbrev="W3C">World Wide Web Consortium</organization>
1741        <address><email>ylafon@w3.org</email></address>
1742      </author>
1743      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
1744        <organization abbrev="greenbytes">greenbytes GmbH</organization>
1745        <address><email>julian.reschke@greenbytes.de</email></address>
1746      </author>
1747      <date month="March" year="2010"/>
1748    </front>
1749    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p4-conditional-09"/>
1750   
1751  </reference>
1752
1753  <reference anchor="Part5">
1754    <front>
1755      <title abbrev="HTTP/1.1">HTTP/1.1, part 5: Range Requests and Partial Responses</title>
1756      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
1757        <organization abbrev="Day Software">Day Software</organization>
1758        <address><email>fielding@gbiv.com</email></address>
1759      </author>
1760      <author fullname="Jim Gettys" initials="J." surname="Gettys">
1761        <organization>One Laptop per Child</organization>
1762        <address><email>jg@laptop.org</email></address>
1763      </author>
1764      <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
1765        <organization abbrev="HP">Hewlett-Packard Company</organization>
1766        <address><email>JeffMogul@acm.org</email></address>
1767      </author>
1768      <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
1769        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1770        <address><email>henrikn@microsoft.com</email></address>
1771      </author>
1772      <author fullname="Larry Masinter" initials="L." surname="Masinter">
1773        <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1774        <address><email>LMM@acm.org</email></address>
1775      </author>
1776      <author fullname="Paul J. Leach" initials="P." surname="Leach">
1777        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1778        <address><email>paulle@microsoft.com</email></address>
1779      </author>
1780      <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
1781        <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1782        <address><email>timbl@w3.org</email></address>
1783      </author>
1784      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
1785        <organization abbrev="W3C">World Wide Web Consortium</organization>
1786        <address><email>ylafon@w3.org</email></address>
1787      </author>
1788      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
1789        <organization abbrev="greenbytes">greenbytes GmbH</organization>
1790        <address><email>julian.reschke@greenbytes.de</email></address>
1791      </author>
1792      <date month="March" year="2010"/>
1793    </front>
1794    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-09"/>
1795   
1796  </reference>
1797
1798  <reference anchor="Part7">
1799    <front>
1800      <title abbrev="HTTP/1.1">HTTP/1.1, part 7: Authentication</title>
1801      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
1802        <organization abbrev="Day Software">Day Software</organization>
1803        <address><email>fielding@gbiv.com</email></address>
1804      </author>
1805      <author fullname="Jim Gettys" initials="J." surname="Gettys">
1806        <organization>One Laptop per Child</organization>
1807        <address><email>jg@laptop.org</email></address>
1808      </author>
1809      <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
1810        <organization abbrev="HP">Hewlett-Packard Company</organization>
1811        <address><email>JeffMogul@acm.org</email></address>
1812      </author>
1813      <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
1814        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1815        <address><email>henrikn@microsoft.com</email></address>
1816      </author>
1817      <author fullname="Larry Masinter" initials="L." surname="Masinter">
1818        <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1819        <address><email>LMM@acm.org</email></address>
1820      </author>
1821      <author fullname="Paul J. Leach" initials="P." surname="Leach">
1822        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1823        <address><email>paulle@microsoft.com</email></address>
1824      </author>
1825      <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
1826        <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1827        <address><email>timbl@w3.org</email></address>
1828      </author>
1829      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
1830        <organization abbrev="W3C">World Wide Web Consortium</organization>
1831        <address><email>ylafon@w3.org</email></address>
1832      </author>
1833      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
1834        <organization abbrev="greenbytes">greenbytes GmbH</organization>
1835        <address><email>julian.reschke@greenbytes.de</email></address>
1836      </author>
1837      <date month="March" year="2010"/>
1838    </front>
1839    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p7-auth-09"/>
1840   
1841  </reference>
1842
1843  <reference anchor="RFC2119">
1844    <front>
1845      <title>Key words for use in RFCs to Indicate Requirement Levels</title>
1846      <author fullname="Scott Bradner" initials="S." surname="Bradner">
1847        <organization>Harvard University</organization>
1848        <address><email>sob@harvard.edu</email></address>
1849      </author>
1850      <date month="March" year="1997"/>
1851    </front>
1852    <seriesInfo name="BCP" value="14"/>
1853    <seriesInfo name="RFC" value="2119"/>
1854  </reference>
1855
1856  <reference anchor="RFC5234">
1857    <front>
1858      <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
1859      <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
1860        <organization>Brandenburg InternetWorking</organization>
1861        <address>
1862          <email>dcrocker@bbiw.net</email>
1863        </address> 
1864      </author>
1865      <author initials="P." surname="Overell" fullname="Paul Overell">
1866        <organization>THUS plc.</organization>
1867        <address>
1868          <email>paul.overell@thus.net</email>
1869        </address>
1870      </author>
1871      <date month="January" year="2008"/>
1872    </front>
1873    <seriesInfo name="STD" value="68"/>
1874    <seriesInfo name="RFC" value="5234"/>
1875  </reference>
1876 
1877</references>
1878
1879<references title="Informative References">
1880
1881  <reference anchor="RFC1305">
1882    <front>
1883      <title>Network Time Protocol (Version 3) Specification, Implementation</title>
1884      <author fullname="David L. Mills" initials="D." surname="Mills">
1885        <organization>University of Delaware, Electrical Engineering Department</organization>
1886        <address><email>mills@udel.edu</email></address>
1887      </author>
1888      <date month="March" year="1992"/>
1889    </front>
1890    <seriesInfo name="RFC" value="1305"/>
1891  </reference>
1892
1893  <reference anchor="RFC2616">
1894    <front>
1895      <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
1896      <author fullname="R. Fielding" initials="R." surname="Fielding">
1897        <organization>University of California, Irvine</organization>
1898        <address><email>fielding@ics.uci.edu</email></address>
1899      </author>
1900      <author fullname="J. Gettys" initials="J." surname="Gettys">
1901        <organization>W3C</organization>
1902        <address><email>jg@w3.org</email></address>
1903      </author>
1904      <author fullname="J. Mogul" initials="J." surname="Mogul">
1905        <organization>Compaq Computer Corporation</organization>
1906        <address><email>mogul@wrl.dec.com</email></address>
1907      </author>
1908      <author fullname="H. Frystyk" initials="H." surname="Frystyk">
1909        <organization>MIT Laboratory for Computer Science</organization>
1910        <address><email>frystyk@w3.org</email></address>
1911      </author>
1912      <author fullname="L. Masinter" initials="L." surname="Masinter">
1913        <organization>Xerox Corporation</organization>
1914        <address><email>masinter@parc.xerox.com</email></address>
1915      </author>
1916      <author fullname="P. Leach" initials="P." surname="Leach">
1917        <organization>Microsoft Corporation</organization>
1918        <address><email>paulle@microsoft.com</email></address>
1919      </author>
1920      <author fullname="T. Berners-Lee" initials="T." surname="Berners-Lee">
1921        <organization>W3C</organization>
1922        <address><email>timbl@w3.org</email></address>
1923      </author>
1924      <date month="June" year="1999"/>
1925    </front>
1926    <seriesInfo name="RFC" value="2616"/>
1927  </reference>
1928
1929  <reference anchor="RFC3864">
1930    <front>
1931      <title>Registration Procedures for Message Header Fields</title>
1932      <author fullname="G. Klyne" initials="G." surname="Klyne">
1933        <organization>Nine by Nine</organization>
1934        <address><email>GK-IETF@ninebynine.org</email></address>
1935      </author>
1936      <author fullname="M. Nottingham" initials="M." surname="Nottingham">
1937        <organization>BEA Systems</organization>
1938        <address><email>mnot@pobox.com</email></address>
1939      </author>
1940      <author fullname="J. Mogul" initials="J." surname="Mogul">
1941        <organization>HP Labs</organization>
1942        <address><email>JeffMogul@acm.org</email></address>
1943      </author>
1944      <date month="September" year="2004"/>
1945    </front>
1946    <seriesInfo name="BCP" value="90"/>
1947    <seriesInfo name="RFC" value="3864"/>
1948  </reference>
1949
1950</references>
1951
1952<section anchor="compatibility" title="Compatibility with Previous Versions">
1953
1954<section anchor="changes.from.rfc.2068" title="Changes from RFC 2068">
1955<t>
1956  A case was missed in the Cache-Control model of HTTP/1.1; s-maxage was introduced to add
1957  this missing case.
1958  (Sections <xref format="counter" target="response.cacheability"/>, <xref format="counter" target="header.cache-control"/>).
1959</t>
1960<t>
1961  Range request responses would become very verbose if all meta-data were always returned;
1962  by allowing the server to only send needed headers in a 206 response, this problem can be
1963  avoided.
1964  (<xref target="combining.headers"/>)
1965</t>
1966<t>
1967  The Cache-Control: max-age directive was not properly defined for responses.
1968  (<xref target="cache-response-directive"/>)
1969</t>
1970<t>
1971  Warnings could be cached incorrectly, or not updated appropriately. (Section <xref format="counter" target="expiration.model"/>, <xref format="counter" target="combining.headers"/>, <xref format="counter" target="header.cache-control"/>,
1972  and <xref format="counter" target="header.warning"/>) Warning also needed to be a general
1973  header, as PUT or other methods may have need for it in requests.
1974</t>
1975</section>
1976
1977<section anchor="changes.from.rfc.2616" title="Changes from RFC 2616">
1978<t>
1979  Remove requirement to consider Content-Location in successful responses
1980  in order to determine the appropriate response to use.
1981  (<xref target="validation.model"/>)
1982</t>
1983<t>
1984  Clarify denial of service attack avoidance requirement.
1985  (<xref target="invalidation.after.updates.or.deletions"/>)
1986</t>
1987<t>
1988  Do not mention RFC 2047 encoding and multiple languages in Warning headers
1989  anymore, as these aspects never were implemented.
1990  (<xref target="header.warning"/>)
1991</t>
1992</section>
1993
1994    </section>
1995
1996
1997<section title="Collected ABNF" anchor="collected.abnf">
1998<figure>
1999<artwork type="abnf" name="p6-cache.parsed-abnf"><![CDATA[
2000Age = "Age:" OWS Age-v
2001Age-v = delta-seconds
2002
2003Cache-Control = "Cache-Control:" OWS Cache-Control-v
2004Cache-Control-v = *( "," OWS ) cache-directive *( OWS "," [ OWS
2005 cache-directive ] )
2006
2007Expires = "Expires:" OWS Expires-v
2008Expires-v = HTTP-date
2009
2010HTTP-date = <HTTP-date, defined in [Part1], Section 6.1>
2011
2012OWS = <OWS, defined in [Part1], Section 1.2.2>
2013
2014Pragma = "Pragma:" OWS Pragma-v
2015Pragma-v = *( "," OWS ) pragma-directive *( OWS "," [ OWS
2016 pragma-directive ] )
2017
2018Vary = "Vary:" OWS Vary-v
2019Vary-v = "*" / ( *( "," OWS ) field-name *( OWS "," [ OWS field-name
2020 ] ) )
2021
2022Warning = "Warning:" OWS Warning-v
2023Warning-v = *( "," OWS ) warning-value *( OWS "," [ OWS warning-value
2024 ] )
2025
2026cache-directive = cache-request-directive / cache-response-directive
2027cache-extension = token [ "=" ( token / quoted-string ) ]
2028cache-request-directive = "no-cache" / "no-store" / ( "max-age="
2029 delta-seconds ) / ( "max-stale" [ "=" delta-seconds ] ) / (
2030 "min-fresh=" delta-seconds ) / "no-transform" / "only-if-cached" /
2031 cache-extension
2032cache-response-directive = "public" / ( "private" [ "=" DQUOTE *( ","
2033 OWS ) field-name *( OWS "," [ OWS field-name ] ) DQUOTE ] ) / (
2034 "no-cache" [ "=" DQUOTE *( "," OWS ) field-name *( OWS "," [ OWS
2035 field-name ] ) DQUOTE ] ) / "no-store" / "no-transform" /
2036 "must-revalidate" / "proxy-revalidate" / ( "max-age=" delta-seconds
2037 ) / ( "s-maxage=" delta-seconds ) / cache-extension
2038
2039delta-seconds = 1*DIGIT
2040
2041extension-pragma = token [ "=" ( token / quoted-string ) ]
2042
2043field-name = <field-name, defined in [Part1], Section 3.2>
2044
2045port = <port, defined in [Part1], Section 2.6>
2046pragma-directive = "no-cache" / extension-pragma
2047pseudonym = <pseudonym, defined in [Part1], Section 9.9>
2048
2049quoted-string = <quoted-string, defined in [Part1], Section 1.2.2>
2050
2051token = <token, defined in [Part1], Section 1.2.2>
2052
2053uri-host = <uri-host, defined in [Part1], Section 2.6>
2054
2055warn-agent = ( uri-host [ ":" port ] ) / pseudonym
2056warn-code = 3DIGIT
2057warn-date = DQUOTE HTTP-date DQUOTE
2058warn-text = quoted-string
2059warning-value = warn-code SP warn-agent SP warn-text [ SP warn-date
2060 ]
2061]]></artwork>
2062</figure>
2063<figure><preamble>ABNF diagnostics:</preamble><artwork type="inline"><![CDATA[
2064; Age defined but not used
2065; Cache-Control defined but not used
2066; Expires defined but not used
2067; Pragma defined but not used
2068; Vary defined but not used
2069; Warning defined but not used
2070]]></artwork></figure></section>
2071
2072
2073<section anchor="change.log" title="Change Log (to be removed by RFC Editor before publication)">
2074
2075<section title="Since RFC2616">
2076  <t>Extracted relevant partitions from <xref target="RFC2616"/>.</t>
2077</section>
2078
2079<section title="Since draft-ietf-httpbis-p6-cache-00">
2080<t>
2081  Closed issues:
2082  <list style="symbols">
2083    <t>
2084      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/9"/>: "Trailer" (<eref target="http://purl.org/NET/http-errata#trailer-hop"/>)</t>
2085    <t>
2086      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/12"/>: "Invalidation after Update or Delete" (<eref target="http://purl.org/NET/http-errata#invalidupd"/>)</t>
2087    <t>
2088      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/35"/>: "Normative and Informative references"</t>
2089    <t>
2090      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/48"/>: "Date reference typo"</t>
2091    <t>
2092      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/49"/>: "Connection header text"</t>
2093    <t>
2094      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/65"/>: "Informative references"</t>
2095    <t>
2096      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/66"/>: "ISO-8859-1 Reference"</t>
2097    <t>
2098      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/86"/>: "Normative up-to-date references"</t>
2099    <t>
2100      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/87"/>: "typo in 13.2.2"</t>
2101  </list>
2102</t>
2103<t>
2104  Other changes:
2105  <list style="symbols">
2106    <t>Use names of RFC4234 core rules DQUOTE and HTAB (work in progress on <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>)</t>
2107  </list>
2108</t>
2109</section>
2110
2111<section title="Since draft-ietf-httpbis-p6-cache-01">
2112<t>
2113  Closed issues:
2114  <list style="symbols">
2115    <t>
2116      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/82"/>: "rel_path not used"</t>
2117  </list>
2118</t>
2119<t>
2120  Other changes:
2121  <list style="symbols">
2122    <t>Get rid of duplicate BNF rule names ("host" -&gt; "uri-host") (work in progress
2123      on <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>)</t>
2124    <t>Add explicit references to BNF syntax and rules imported from other parts of the
2125      specification.</t>
2126  </list>
2127</t>
2128</section>
2129
2130<section anchor="changes.since.02" title="Since draft-ietf-httpbis-p6-cache-02">
2131<t>
2132  Ongoing work on IANA Message Header Registration (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/40"/>):
2133  <list style="symbols">
2134    <t>Reference RFC 3984, and update header registrations for headers defined in this
2135      document.</t>
2136  </list>
2137</t>
2138</section>
2139
2140<section anchor="changes.since.03" title="Since draft-ietf-httpbis-p6-cache-03">
2141<t>
2142  Closed issues:
2143  <list style="symbols">
2144    <t>
2145      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/106"/>: "Vary header classification"</t>
2146  </list>
2147</t>
2148</section>
2149
2150<section anchor="changes.since.04" title="Since draft-ietf-httpbis-p6-cache-04">
2151<t>
2152  Ongoing work on ABNF conversion (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>):
2153  <list style="symbols"> 
2154    <t>
2155      Use "/" instead of "|" for alternatives.
2156    </t>
2157    <t>
2158      Introduce new ABNF rules for "bad" whitespace ("BWS"), optional
2159      whitespace ("OWS") and required whitespace ("RWS").
2160    </t>
2161    <t>
2162      Rewrite ABNFs to spell out whitespace rules, factor out
2163      header value format definitions.
2164    </t>
2165  </list>
2166</t>
2167</section>
2168
2169<section anchor="changes.since.05" title="Since draft-ietf-httpbis-p6-cache-05">
2170<t>
2171  This is a total rewrite of this part of the specification.
2172</t>
2173<t>
2174  Affected issues:
2175  <list style="symbols">
2176    <t>
2177      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/54"/>: "Definition of 1xx Warn-Codes"</t>
2178    <t>
2179      <eref target="http://trac.tools.ietf.org/wg/httpbis/trac/ticket/60"/>: "Placement of 13.5.1 and 13.5.2"</t>
2180    <t>
2181      <eref target="http://trac.tools.ietf.org/wg/httpbis/trac/ticket/138"/>: "The role of Warning and Semantic Transparency in Caching"</t>
2182    <t>
2183      <eref target="http://trac.tools.ietf.org/wg/httpbis/trac/ticket/139"/>: "Methods and Caching"</t>
2184  </list>
2185</t>
2186<t>
2187  In addition: Final work on ABNF conversion (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>):
2188  <list style="symbols"> 
2189    <t>
2190      Add appendix containing collected and expanded ABNF, reorganize ABNF introduction.
2191    </t>
2192  </list>
2193</t>
2194</section>
2195
2196<section anchor="changes.since.06" title="Since draft-ietf-httpbis-p6-cache-06">
2197<t>
2198  Closed issues:
2199  <list style="symbols"> 
2200    <t>
2201      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/161"/>:
2202      "base for numeric protocol elements"
2203    </t>
2204  </list>
2205</t>
2206<t>
2207  Affected issues:
2208  <list style="symbols">
2209    <t>
2210      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/37"/>:
2211      Vary and non-existant headers
2212    </t>
2213  </list>
2214</t>
2215</section>
2216
2217<section anchor="changes.since.07" title="Since draft-ietf-httpbis-p6-cache-07">
2218<t>
2219  Closed issues:
2220  <list style="symbols"> 
2221    <t>
2222      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/54"/>:
2223      "Definition of 1xx Warn-Codes"
2224    </t>
2225    <t>
2226      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/167"/>:
2227      "Content-Location on 304 responses"
2228    </t>
2229    <t>
2230      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/169"/>:
2231      "private and no-cache CC directives with headers"
2232    </t>
2233    <t>
2234      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/187"/>:
2235      "RFC2047 and warn-text"
2236    </t>
2237  </list>
2238</t>
2239</section>
2240
2241<section anchor="changes.since.08" title="Since draft-ietf-httpbis-p6-cache-08">
2242<t>
2243  Closed issues:
2244  <list style="symbols"> 
2245    <t>
2246      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/147"/>:
2247      "serving negotiated responses from cache: header-specific canonicalization"
2248    </t>
2249    <t>
2250      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/197"/>:
2251      "Effect of CC directives on history lists"
2252    </t>
2253  </list>
2254</t>
2255<t>
2256  Affected issues:
2257  <list style="symbols">
2258    <t>
2259      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/199"/>:
2260      Status codes and caching
2261    </t>
2262  </list>
2263</t>
2264<t>
2265  Partly resolved issues:
2266  <list style="symbols"> 
2267    <t>
2268      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/60"/>:
2269      "Placement of 13.5.1 and 13.5.2"
2270    </t>
2271  </list>
2272</t>
2273</section>
2274
2275</section>
2276  </back>
2277</rfc>
Note: See TracBrowser for help on using the repository browser.