source: draft-ietf-httpbis/06/draft-ietf-httpbis-p6-cache-06.xml @ 784

Last change on this file since 784 was 558, checked in by fielding@…, 11 years ago

Draft 06 (as recorded by www.ietf.org)

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