source: draft-ietf-httpbis/17/draft-ietf-httpbis-p6-cache-17.txt

Last change on this file was 1467, checked in by julian.reschke@…, 9 years ago

Prepare publication of -17.

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