source: draft-ietf-httpbis/08/draft-ietf-httpbis-p6-cache-08.xml @ 1837

Last change on this file since 1837 was 1500, checked in by julian.reschke@…, 8 years ago

fix mime types

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