source: draft-ietf-httpbis/21/draft-ietf-httpbis-p6-cache-21.txt @ 2229

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

prepare release of -21 drafts on Oct 4

  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 82.0 KB
Line 
1
2
3
4HTTPbis Working Group                                   R. Fielding, Ed.
5Internet-Draft                                                     Adobe
6Obsoletes: 2616 (if approved)                         M. Nottingham, Ed.
7Intended status: Standards Track                                  Akamai
8Expires: April 7, 2013                                   J. Reschke, Ed.
9                                                              greenbytes
10                                                         October 4, 2012
11
12
13            Hypertext Transfer Protocol (HTTP/1.1): Caching
14                     draft-ietf-httpbis-p6-cache-21
15
16Abstract
17
18   The Hypertext Transfer Protocol (HTTP) is an application-level
19   protocol for distributed, collaborative, hypertext information
20   systems.  This document defines requirements on HTTP caches and the
21   associated header fields that control cache behavior or indicate
22   cacheable response messages.
23
24Editorial Note (To be removed by RFC Editor)
25
26   Discussion of this draft takes place on the HTTPBIS working group
27   mailing list (ietf-http-wg@w3.org), which is archived at
28   <http://lists.w3.org/Archives/Public/ietf-http-wg/>.
29
30   The current issues list is at
31   <http://tools.ietf.org/wg/httpbis/trac/report/3> and related
32   documents (including fancy diffs) can be found at
33   <http://tools.ietf.org/wg/httpbis/>.
34
35   The changes in this draft are summarized in Appendix D.2.
36
37Status of This Memo
38
39   This Internet-Draft is submitted in full conformance with the
40   provisions of BCP 78 and BCP 79.
41
42   Internet-Drafts are working documents of the Internet Engineering
43   Task Force (IETF).  Note that other groups may also distribute
44   working documents as Internet-Drafts.  The list of current Internet-
45   Drafts is at http://datatracker.ietf.org/drafts/current/.
46
47   Internet-Drafts are draft documents valid for a maximum of six months
48   and may be updated, replaced, or obsoleted by other documents at any
49   time.  It is inappropriate to use Internet-Drafts as reference
50   material or to cite them other than as "work in progress."
51
52
53
54
55Fielding, et al.          Expires April 7, 2013                 [Page 1]
56
57Internet-Draft              HTTP/1.1 Caching                October 2012
58
59
60   This Internet-Draft will expire on April 7, 2013.
61
62Copyright Notice
63
64   Copyright (c) 2012 IETF Trust and the persons identified as the
65   document authors.  All rights reserved.
66
67   This document is subject to BCP 78 and the IETF Trust's Legal
68   Provisions Relating to IETF Documents
69   (http://trustee.ietf.org/license-info) in effect on the date of
70   publication of this document.  Please review these documents
71   carefully, as they describe your rights and restrictions with respect
72   to this document.  Code Components extracted from this document must
73   include Simplified BSD License text as described in Section 4.e of
74   the Trust Legal Provisions and are provided without warranty as
75   described in the Simplified BSD License.
76
77   This document may contain material from IETF Documents or IETF
78   Contributions published or made publicly available before November
79   10, 2008.  The person(s) controlling the copyright in some of this
80   material may not have granted the IETF Trust the right to allow
81   modifications of such material outside the IETF Standards Process.
82   Without obtaining an adequate license from the person(s) controlling
83   the copyright in such materials, this document may not be modified
84   outside the IETF Standards Process, and derivative works of it may
85   not be created outside the IETF Standards Process, except to format
86   it for publication as an RFC or to translate it into languages other
87   than English.
88
89Table of Contents
90
91   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  4
92     1.1.  Purpose  . . . . . . . . . . . . . . . . . . . . . . . . .  4
93     1.2.  Terminology  . . . . . . . . . . . . . . . . . . . . . . .  4
94     1.3.  Conformance and Error Handling . . . . . . . . . . . . . .  6
95     1.4.  Syntax Notation  . . . . . . . . . . . . . . . . . . . . .  6
96       1.4.1.  Delta Seconds  . . . . . . . . . . . . . . . . . . . .  6
97   2.  Overview of Cache Operation  . . . . . . . . . . . . . . . . .  6
98   3.  Storing Responses in Caches  . . . . . . . . . . . . . . . . .  7
99     3.1.  Storing Incomplete Responses . . . . . . . . . . . . . . .  8
100     3.2.  Storing Responses to Authenticated Requests  . . . . . . .  8
101   4.  Constructing Responses from Caches . . . . . . . . . . . . . .  9
102     4.1.  Freshness Model  . . . . . . . . . . . . . . . . . . . . . 10
103       4.1.1.  Calculating Freshness Lifetime . . . . . . . . . . . . 11
104       4.1.2.  Calculating Heuristic Freshness  . . . . . . . . . . . 12
105       4.1.3.  Calculating Age  . . . . . . . . . . . . . . . . . . . 12
106       4.1.4.  Serving Stale Responses  . . . . . . . . . . . . . . . 14
107     4.2.  Validation Model . . . . . . . . . . . . . . . . . . . . . 15
108
109
110
111Fielding, et al.          Expires April 7, 2013                 [Page 2]
112
113Internet-Draft              HTTP/1.1 Caching                October 2012
114
115
116       4.2.1.  Freshening Responses with 304 Not Modified . . . . . . 16
117     4.3.  Using Negotiated Responses . . . . . . . . . . . . . . . . 16
118     4.4.  Combining Partial Content  . . . . . . . . . . . . . . . . 17
119   5.  Updating Caches with HEAD Responses  . . . . . . . . . . . . . 18
120   6.  Request Methods that Invalidate  . . . . . . . . . . . . . . . 18
121   7.  Header Field Definitions . . . . . . . . . . . . . . . . . . . 19
122     7.1.  Age  . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
123     7.2.  Cache-Control  . . . . . . . . . . . . . . . . . . . . . . 20
124       7.2.1.  Request Cache-Control Directives . . . . . . . . . . . 20
125       7.2.2.  Response Cache-Control Directives  . . . . . . . . . . 22
126       7.2.3.  Cache Control Extensions . . . . . . . . . . . . . . . 25
127     7.3.  Expires  . . . . . . . . . . . . . . . . . . . . . . . . . 27
128     7.4.  Pragma . . . . . . . . . . . . . . . . . . . . . . . . . . 28
129     7.5.  Warning  . . . . . . . . . . . . . . . . . . . . . . . . . 28
130       7.5.1.  110 Response is Stale  . . . . . . . . . . . . . . . . 30
131       7.5.2.  111 Revalidation Failed  . . . . . . . . . . . . . . . 30
132       7.5.3.  112 Disconnected Operation . . . . . . . . . . . . . . 30
133       7.5.4.  113 Heuristic Expiration . . . . . . . . . . . . . . . 30
134       7.5.5.  199 Miscellaneous Warning  . . . . . . . . . . . . . . 30
135       7.5.6.  214 Transformation Applied . . . . . . . . . . . . . . 30
136       7.5.7.  299 Miscellaneous Persistent Warning . . . . . . . . . 31
137       7.5.8.  Warn Code Extensions . . . . . . . . . . . . . . . . . 31
138   8.  History Lists  . . . . . . . . . . . . . . . . . . . . . . . . 31
139   9.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 31
140     9.1.  Cache Directive Registry . . . . . . . . . . . . . . . . . 31
141     9.2.  Warn Code Registry . . . . . . . . . . . . . . . . . . . . 32
142     9.3.  Header Field Registration  . . . . . . . . . . . . . . . . 33
143   10. Security Considerations  . . . . . . . . . . . . . . . . . . . 33
144   11. Acknowledgments  . . . . . . . . . . . . . . . . . . . . . . . 34
145   12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 34
146     12.1. Normative References . . . . . . . . . . . . . . . . . . . 34
147     12.2. Informative References . . . . . . . . . . . . . . . . . . 34
148   Appendix A.  Changes from RFC 2616 . . . . . . . . . . . . . . . . 35
149   Appendix B.  Imported ABNF . . . . . . . . . . . . . . . . . . . . 35
150   Appendix C.  Collected ABNF  . . . . . . . . . . . . . . . . . . . 37
151   Appendix D.  Change Log (to be removed by RFC Editor before
152                publication)  . . . . . . . . . . . . . . . . . . . . 38
153     D.1.  Since draft-ietf-httpbis-p6-cache-19 . . . . . . . . . . . 38
154     D.2.  Since draft-ietf-httpbis-p6-cache-20 . . . . . . . . . . . 38
155   Index  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
156
157
158
159
160
161
162
163
164
165
166
167Fielding, et al.          Expires April 7, 2013                 [Page 3]
168
169Internet-Draft              HTTP/1.1 Caching                October 2012
170
171
1721.  Introduction
173
174   HTTP is typically used for distributed information systems, where
175   performance can be improved by the use of response caches.  This
176   document defines aspects of HTTP/1.1 related to caching and reusing
177   response messages.
178
1791.1.  Purpose
180
181   An HTTP cache is a local store of response messages and the subsystem
182   that controls its message storage, retrieval, and deletion.  A cache
183   stores cacheable responses in order to reduce the response time and
184   network bandwidth consumption on future, equivalent requests.  Any
185   client or server MAY employ a cache, though a cache cannot be used by
186   a server that is acting as a tunnel.
187
188   The goal of caching in HTTP/1.1 is to significantly improve
189   performance by reusing a prior response message to satisfy a current
190   request.  A stored response is considered "fresh", as defined in
191   Section 4.1, if the response can be reused without "validation"
192   (checking with the origin server to see if the cached response
193   remains valid for this request).  A fresh cache response can
194   therefore reduce both latency and network transfers each time it is
195   reused.  When a cached response is not fresh, it might still be
196   reusable if it can be freshened by validation (Section 4.2) or if the
197   origin is unavailable.
198
1991.2.  Terminology
200
201   This specification uses a number of terms to refer to the roles
202   played by participants in, and objects of, HTTP caching.
203
204   cache
205
206      A conformant implementation of a HTTP cache.  Note that this
207      implies an HTTP/1.1 cache; this specification does not define
208      conformance for HTTP/1.0 caches.
209
210   shared cache
211
212      A cache that stores responses to be reused by more than one user;
213      usually (but not always) deployed as part of an intermediary.
214
215   private cache
216
217      A cache that is dedicated to a single user.
218
219
220
221
222
223Fielding, et al.          Expires April 7, 2013                 [Page 4]
224
225Internet-Draft              HTTP/1.1 Caching                October 2012
226
227
228   cacheable
229
230      A response is cacheable if a cache is allowed to store a copy of
231      the response message for use in answering subsequent requests.
232      Even when a response is cacheable, there might be additional
233      constraints on whether a cache can use the stored copy to satisfy
234      a particular request.
235
236   explicit expiration time
237
238      The time at which the origin server intends that a representation
239      no longer be returned by a cache without further validation.
240
241   heuristic expiration time
242
243      An expiration time assigned by a cache when no explicit expiration
244      time is available.
245
246   age
247
248      The age of a response is the time since it was sent by, or
249      successfully validated with, the origin server.
250
251   first-hand
252
253      A response is first-hand if the freshness model is not in use;
254      i.e., its age is 0.
255
256   freshness lifetime
257
258      The length of time between the generation of a response and its
259      expiration time.
260
261   fresh
262
263      A response is fresh if its age has not yet exceeded its freshness
264      lifetime.
265
266   stale
267
268      A response is stale if its age has passed its freshness lifetime
269      (either explicit or heuristic).
270
271   validator
272
273      A protocol element (e.g., an entity-tag or a Last-Modified time)
274      that is used to find out whether a stored response is an
275      equivalent copy of a representation.  See Section 2.1 of [Part4].
276
277
278
279Fielding, et al.          Expires April 7, 2013                 [Page 5]
280
281Internet-Draft              HTTP/1.1 Caching                October 2012
282
283
284   strong validator
285
286      A validator that is defined by the origin server such that its
287      current value will change if the representation data changes;
288      i.e., an entity-tag that is not marked as weak (Section 2.3 of
289      [Part4]) or, if no entity-tag is provided, a Last-Modified value
290      that is strong in the sense defined by Section 2.2.2 of [Part4].
291
2921.3.  Conformance and Error Handling
293
294   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
295   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
296   document are to be interpreted as described in [RFC2119].
297
298   Conformance criteria and considerations regarding error handling are
299   defined in Section 2.5 of [Part1].
300
3011.4.  Syntax Notation
302
303   This specification uses the Augmented Backus-Naur Form (ABNF)
304   notation of [RFC5234] with the list rule extension defined in Section
305   1.2 of [Part1].  Appendix B describes rules imported from other
306   documents.  Appendix C shows the collected ABNF with the list rule
307   expanded.
308
3091.4.1.  Delta Seconds
310
311   The delta-seconds rule specifies a non-negative integer, representing
312   time in seconds.
313
314     delta-seconds  = 1*DIGIT
315
316   If an implementation receives a delta-seconds value larger than the
317   largest positive integer it can represent, or if any of its
318   subsequent calculations overflows, it MUST consider the value to be
319   2147483648 (2^31).  Recipients parsing a delta-seconds value MUST use
320   an arithmetic type of at least 31 bits of range, and senders MUST NOT
321   send delta-seconds with a value greater than 2147483648.
322
3232.  Overview of Cache Operation
324
325   Proper cache operation preserves the semantics of HTTP transfers
326   ([Part2]) while eliminating the transfer of information already held
327   in the cache.  Although caching is an entirely OPTIONAL feature of
328   HTTP, we assume that reusing the cached response is desirable and
329   that such reuse is the default behavior when no requirement or
330   locally-desired configuration prevents it.  Therefore, HTTP cache
331   requirements are focused on preventing a cache from either storing a
332
333
334
335Fielding, et al.          Expires April 7, 2013                 [Page 6]
336
337Internet-Draft              HTTP/1.1 Caching                October 2012
338
339
340   non-reusable response or reusing a stored response inappropriately.
341
342   Each cache entry consists of a cache key and one or more HTTP
343   responses corresponding to prior requests that used the same key.
344   The most common form of cache entry is a successful result of a
345   retrieval request: i.e., a 200 (OK) response containing a
346   representation of the resource identified by the request target.
347   However, it is also possible to cache negative results (e.g., 404
348   (Not Found), incomplete results (e.g., 206 (Partial Content)), and
349   responses to methods other than GET if the method's definition allows
350   such caching and defines something suitable for use as a cache key.
351
352   The default cache key consists of the request method and target URI.
353   However, since HTTP caches in common use today are typically limited
354   to caching responses to GET, many implementations simply decline
355   other methods and use only the URI as the key.
356
357   If a request target is subject to content negotiation, its cache
358   entry might consist of multiple stored responses, each differentiated
359   by a secondary key for the values of the original request's selecting
360   header fields (Section 4.3).
361
3623.  Storing Responses in Caches
363
364   A cache MUST NOT store a response to any request, unless:
365
366   o  The request method is understood by the cache and defined as being
367      cacheable, and
368
369   o  the response status code is understood by the cache, and
370
371   o  the "no-store" cache directive (see Section 7.2) does not appear
372      in request or response header fields, and
373
374   o  the "private" cache response directive (see Section 7.2.2.2) does
375      not appear in the response, if the cache is shared, and
376
377   o  the Authorization header field (see Section 4.1 of [Part7]) does
378      not appear in the request, if the cache is shared, unless the
379      response explicitly allows it (see Section 3.2), and
380
381   o  the response either:
382
383      *  contains an Expires header field (see Section 7.3), or
384
385      *  contains a max-age response cache directive (see
386         Section 7.2.2.7), or
387
388
389
390
391Fielding, et al.          Expires April 7, 2013                 [Page 7]
392
393Internet-Draft              HTTP/1.1 Caching                October 2012
394
395
396      *  contains a s-maxage response cache directive and the cache is
397         shared, or
398
399      *  contains a Cache Control Extension (see Section 7.2.3) that
400         allows it to be cached, or
401
402      *  has a status code that can be served with heuristic freshness
403         (see Section 4.1.2).
404
405   Note that any of the requirements listed above can be overridden by a
406   cache-control extension; see Section 7.2.3.
407
408   In this context, a cache has "understood" a request method or a
409   response status code if it recognizes it and implements any cache-
410   specific behavior.
411
412   Note that, in normal operation, many caches will not store a response
413   that has neither a cache validator nor an explicit expiration time,
414   as such responses are not usually useful to store.  However, caches
415   are not prohibited from storing such responses.
416
4173.1.  Storing Incomplete Responses
418
419   A response message is considered complete when all of the octets
420   indicated by the message framing ([Part1]) are received prior to the
421   connection being closed.  If the request is GET, the response status
422   is 200 (OK), and the entire response header block has been received,
423   a cache MAY store an incomplete response message body if the cache
424   entry is recorded as incomplete.  Likewise, a 206 (Partial Content)
425   response MAY be stored as if it were an incomplete 200 (OK) cache
426   entry.  However, a cache MUST NOT store incomplete or partial content
427   responses if it does not support the Range and Content-Range header
428   fields or if it does not understand the range units used in those
429   fields.
430
431   A cache MAY complete a stored incomplete response by making a
432   subsequent range request ([Part5]) and combining the successful
433   response with the stored entry, as defined in Section 4.4.  A cache
434   MUST NOT use an incomplete response to answer requests unless the
435   response has been made complete or the request is partial and
436   specifies a range that is wholly within the incomplete response.  A
437   cache MUST NOT send a partial response to a client without explicitly
438   marking it as such using the 206 (Partial Content) status code.
439
4403.2.  Storing Responses to Authenticated Requests
441
442   A shared cache MUST NOT use a cached response to a request with an
443   Authorization header field (Section 4.1 of [Part7]) to satisfy any
444
445
446
447Fielding, et al.          Expires April 7, 2013                 [Page 8]
448
449Internet-Draft              HTTP/1.1 Caching                October 2012
450
451
452   subsequent request unless a cache directive that allows such
453   responses to be stored is present in the response.
454
455   In this specification, the following Cache-Control response
456   directives (Section 7.2.2) have such an effect: must-revalidate,
457   public, s-maxage.
458
459   Note that cached responses that contain the "must-revalidate" and/or
460   "s-maxage" response directives are not allowed to be served stale
461   (Section 4.1.4) by shared caches.  In particular, a response with
462   either "max-age=0, must-revalidate" or "s-maxage=0" cannot be used to
463   satisfy a subsequent request without revalidating it on the origin
464   server.
465
4664.  Constructing Responses from Caches
467
468   For a presented request, a cache MUST NOT return a stored response,
469   unless:
470
471   o  The presented effective request URI (Section 5.5 of [Part1]) and
472      that of the stored response match, and
473
474   o  the request method associated with the stored response allows it
475      to be used for the presented request, and
476
477   o  selecting header fields nominated by the stored response (if any)
478      match those presented (see Section 4.3), and
479
480   o  the presented request does not contain the no-cache pragma
481      (Section 7.4), nor the no-cache cache directive (Section 7.2.1),
482      unless the stored response is successfully validated
483      (Section 4.2), and
484
485   o  the stored response does not contain the no-cache cache directive
486      (Section 7.2.2.3), unless it is successfully validated
487      (Section 4.2), and
488
489   o  the stored response is either:
490
491      *  fresh (see Section 4.1), or
492
493      *  allowed to be served stale (see Section 4.1.4), or
494
495      *  successfully validated (see Section 4.2).
496
497   Note that any of the requirements listed above can be overridden by a
498   cache-control extension; see Section 7.2.3.
499
500
501
502
503Fielding, et al.          Expires April 7, 2013                 [Page 9]
504
505Internet-Draft              HTTP/1.1 Caching                October 2012
506
507
508   When a stored response is used to satisfy a request without
509   validation, a cache MUST include a single Age header field
510   (Section 7.1) in the response with a value equal to the stored
511   response's current_age; see Section 4.1.3.
512
513   A cache MUST write through requests with methods that are unsafe
514   (Section 5.2.1 of [Part2]) to the origin server; i.e., a cache is not
515   allowed to generate a reply to such a request before having forwarded
516   the request and having received a corresponding response.
517
518   Also, note that unsafe requests might invalidate already stored
519   responses; see Section 6.
520
521   When more than one suitable response is stored, a cache MUST use the
522   most recent response (as determined by the Date header field).  It
523   can also forward a request with "Cache-Control: max-age=0" or "Cache-
524   Control: no-cache" to disambiguate which response to use.
525
526   A cache that does not have a clock available MUST NOT use stored
527   responses without revalidating them on every use.  A cache,
528   especially a shared cache, SHOULD use a mechanism, such as NTP
529   [RFC1305], to synchronize its clock with a reliable external
530   standard.
531
5324.1.  Freshness Model
533
534   When a response is "fresh" in the cache, it can be used to satisfy
535   subsequent requests without contacting the origin server, thereby
536   improving efficiency.
537
538   The primary mechanism for determining freshness is for an origin
539   server to provide an explicit expiration time in the future, using
540   either the Expires header field (Section 7.3) or the max-age response
541   cache directive (Section 7.2.2.7).  Generally, origin servers will
542   assign future explicit expiration times to responses in the belief
543   that the representation is not likely to change in a semantically
544   significant way before the expiration time is reached.
545
546   If an origin server wishes to force a cache to validate every
547   request, it can assign an explicit expiration time in the past to
548   indicate that the response is already stale.  Compliant caches will
549   normally validate the cached response before reusing it for
550   subsequent requests (see Section 4.1.4).
551
552   Since origin servers do not always provide explicit expiration times,
553   a cache MAY assign a heuristic expiration time when an explicit time
554   is not specified, employing algorithms that use other header field
555   values (such as the Last-Modified time) to estimate a plausible
556
557
558
559Fielding, et al.          Expires April 7, 2013                [Page 10]
560
561Internet-Draft              HTTP/1.1 Caching                October 2012
562
563
564   expiration time.  This specification does not provide specific
565   algorithms, but does impose worst-case constraints on their results.
566
567   The calculation to determine if a response is fresh is:
568
569      response_is_fresh = (freshness_lifetime > current_age)
570
571   The freshness_lifetime is defined in Section 4.1.1; the current_age
572   is defined in Section 4.1.3.
573
574   Additionally, clients can influence freshness calculation -- either
575   constraining it relaxing it -- by using the max-age and min-fresh
576   request cache directives.  See Section 7.2.1 for details.
577
578   Note that freshness applies only to cache operation; it cannot be
579   used to force a user agent to refresh its display or reload a
580   resource.  See Section 8 for an explanation of the difference between
581   caches and history mechanisms.
582
5834.1.1.  Calculating Freshness Lifetime
584
585   A cache can calculate the freshness lifetime (denoted as
586   freshness_lifetime) of a response by using the first match of:
587
588   o  If the cache is shared and the s-maxage response cache directive
589      (Section 7.2.2.8) is present, use its value, or
590
591   o  If the max-age response cache directive (Section 7.2.2.7) is
592      present, use its value, or
593
594   o  If the Expires response header field (Section 7.3) is present, use
595      its value minus the value of the Date response header field, or
596
597   o  Otherwise, no explicit expiration time is present in the response.
598      A heuristic freshness lifetime might be applicable; see
599      Section 4.1.2.
600
601   Note that this calculation is not vulnerable to clock skew, since all
602   of the information comes from the origin server.
603
604   When there is more than one value present for a given directive
605   (e.g., two Expires header fields, multiple Cache-Control: max-age
606   directives), it is considered invalid.  Caches are encouraged to
607   consider responses that have invalid freshness information to be
608   stale.
609
610
611
612
613
614
615Fielding, et al.          Expires April 7, 2013                [Page 11]
616
617Internet-Draft              HTTP/1.1 Caching                October 2012
618
619
6204.1.2.  Calculating Heuristic Freshness
621
622   If no explicit expiration time is present in a stored response that
623   has a status code whose definition allows heuristic freshness to be
624   used (including the following in Section 7 of [Part2]: 200 (OK), 203
625   (Non-Authoritative Information), 206 (Partial Content), 300 (Multiple
626   Choices), 301 (Moved Permanently) and 410 (Gone)), a cache MAY
627   calculate a heuristic expiration time.  A cache MUST NOT use
628   heuristics to determine freshness for responses with status codes
629   that do not explicitly allow it.
630
631   When a heuristic is used to calculate freshness lifetime, a cache
632   SHOULD attach a Warning header field with a 113 warn-code to the
633   response if its current_age is more than 24 hours and such a warning
634   is not already present.
635
636   Also, if the response has a Last-Modified header field (Section 2.2
637   of [Part4]), caches are encouraged to use a heuristic expiration
638   value that is no more than some fraction of the interval since that
639   time.  A typical setting of this fraction might be 10%.
640
641      Note: Section 13.9 of [RFC2616] prohibited caches from calculating
642      heuristic freshness for URIs with query components (i.e., those
643      containing '?').  In practice, this has not been widely
644      implemented.  Therefore, servers are encouraged to send explicit
645      directives (e.g., Cache-Control: no-cache) if they wish to
646      preclude caching.
647
6484.1.3.  Calculating Age
649
650   HTTP/1.1 uses the Age header field to convey the estimated age of the
651   response message when obtained from a cache.  The Age field value is
652   the cache's estimate of the amount of time since the response was
653   generated or validated by the origin server.  In essence, the Age
654   value is the sum of the time that the response has been resident in
655   each of the caches along the path from the origin server, plus the
656   amount of time it has been in transit along network paths.
657
658   The following data is used for the age calculation:
659
660   age_value
661
662      The term "age_value" denotes the value of the Age header field
663      (Section 7.1), in a form appropriate for arithmetic operation; or
664      0, if not available.
665
666
667
668
669
670
671Fielding, et al.          Expires April 7, 2013                [Page 12]
672
673Internet-Draft              HTTP/1.1 Caching                October 2012
674
675
676   date_value
677
678      HTTP/1.1 requires origin servers to send a Date header field, if
679      possible, with every response, giving the time at which the
680      response was generated.  The term "date_value" denotes the value
681      of the Date header field, in a form appropriate for arithmetic
682      operations.  See Section 8.1.1.2 of [Part2] for the definition of
683      the Date header field, and for requirements regarding responses
684      without it.
685
686   now
687
688      The term "now" means "the current value of the clock at the host
689      performing the calculation".  A cache SHOULD use NTP ([RFC1305])
690      or some similar protocol to synchronize its clocks to a globally
691      accurate time standard.
692
693   request_time
694
695      The current value of the clock at the host at the time the request
696      resulting in the stored response was made.
697
698   response_time
699
700      The current value of the clock at the host at the time the
701      response was received.
702
703   A response's age can be calculated in two entirely independent ways:
704
705   1.  the "apparent_age": response_time minus date_value, if the local
706       clock is reasonably well synchronized to the origin server's
707       clock.  If the result is negative, the result is replaced by
708       zero.
709
710   2.  the "corrected_age_value", if all of the caches along the
711       response path implement HTTP/1.1.  A cache MUST interpret this
712       value relative to the time the request was initiated, not the
713       time that the response was received.
714
715
716     apparent_age = max(0, response_time - date_value);
717
718     response_delay = response_time - request_time;
719     corrected_age_value = age_value + response_delay;
720
721
722
723
724
725
726
727Fielding, et al.          Expires April 7, 2013                [Page 13]
728
729Internet-Draft              HTTP/1.1 Caching                October 2012
730
731
732   These SHOULD be combined as
733
734     corrected_initial_age = max(apparent_age, corrected_age_value);
735
736   unless the cache is confident in the value of the Age header field
737   (e.g., because there are no HTTP/1.0 hops in the Via header field),
738   in which case the corrected_age_value MAY be used as the
739   corrected_initial_age.
740
741   The current_age of a stored response can then be calculated by adding
742   the amount of time (in seconds) since the stored response was last
743   validated by the origin server to the corrected_initial_age.
744
745     resident_time = now - response_time;
746     current_age = corrected_initial_age + resident_time;
747
748   Additionally, to avoid common problems in date parsing:
749
750   o  Recipients SHOULD assume that an RFC-850 date which appears to be
751      more than 50 years in the future is in fact in the past (this
752      helps solve the "year 2000" problem).
753
754   o  Although all date formats are specified to be case-sensitive,
755      recipients SHOULD match day, week and timezone names case-
756      insensitively.
757
758   o  An implementation MAY internally represent a parsed Expires date
759      as earlier than the proper value, but MUST NOT internally
760      represent a parsed Expires date as later than the proper value.
761
762   o  Recipients MUST perform all expiration-related calculations in
763      GMT.  The local time zone MUST NOT influence the calculation or
764      comparison of an age or expiration time.
765
766   o  Caches SHOULD consider dates with time zones other than "GMT"
767      invalid.
768
7694.1.4.  Serving Stale Responses
770
771   A "stale" response is one that either has explicit expiry information
772   or is allowed to have heuristic expiry calculated, but is not fresh
773   according to the calculations in Section 4.1.
774
775   A cache MUST NOT return a stale response if it is prohibited by an
776   explicit in-protocol directive (e.g., by a "no-store" or "no-cache"
777   cache directive, a "must-revalidate" cache-response-directive, or an
778   applicable "s-maxage" or "proxy-revalidate" cache-response-directive;
779   see Section 7.2.2).
780
781
782
783Fielding, et al.          Expires April 7, 2013                [Page 14]
784
785Internet-Draft              HTTP/1.1 Caching                October 2012
786
787
788   A cache MUST NOT return stale responses unless it is disconnected
789   (i.e., it cannot contact the origin server or otherwise find a
790   forward path) or doing so is explicitly allowed (e.g., by the max-
791   stale request directive; see Section 7.2.1).
792
793   A cache SHOULD append a Warning header field with the 110 warn-code
794   (see Section 7.5) to stale responses.  Likewise, a cache SHOULD add
795   the 112 warn-code to stale responses if the cache is disconnected.
796
797   If a cache receives a first-hand response (either an entire response,
798   or a 304 (Not Modified) response) that it would normally forward to
799   the requesting client, and the received response is no longer fresh,
800   the cache can forward it to the requesting client without adding a
801   new Warning (but without removing any existing Warning header
802   fields).  A cache shouldn't attempt to validate a response simply
803   because that response became stale in transit.
804
8054.2.  Validation Model
806
807   When a cache has one or more stored responses for a requested URI,
808   but cannot serve any of them (e.g., because they are not fresh, or
809   one cannot be selected; see Section 4.3), it can use the conditional
810   request mechanism [Part4] in the forwarded request to give the origin
811   server an opportunity to both select a valid stored response to be
812   used, and to update it.  This process is known as "validating" or
813   "revalidating" the stored response.
814
815   When sending such a conditional request, a cache adds an If-Modified-
816   Since header field whose value is that of the Last-Modified header
817   field from the selected (see Section 4.3) stored response, if
818   available.
819
820   Additionally, a cache can add an If-None-Match header field whose
821   value is that of the ETag header field(s) from all responses stored
822   for the requested URI, if present.  However, if any of the stored
823   responses contains only partial content, the cache shouldn't include
824   its entity-tag in the If-None-Match header field unless the request
825   is for a range that would be fully satisfied by that stored response.
826
827   Cache handling of a response to a conditional request is dependent
828   upon its status code:
829
830   o  A 304 (Not Modified) response status code indicates that the
831      stored response can be updated and reused; see Section 4.2.1.
832
833   o  A full response (i.e., one with a payload body) indicates that
834      none of the stored responses nominated in the conditional request
835      is suitable.  Instead, the cache can use the full response to
836
837
838
839Fielding, et al.          Expires April 7, 2013                [Page 15]
840
841Internet-Draft              HTTP/1.1 Caching                October 2012
842
843
844      satisfy the request and MAY replace the stored response(s).
845
846   o  However, if a cache receives a 5xx (Server Error) response while
847      attempting to validate a response, it can either forward this
848      response to the requesting client, or act as if the server failed
849      to respond.  In the latter case, it can return a previously stored
850      response (see Section 4.1.4).
851
8524.2.1.  Freshening Responses with 304 Not Modified
853
854   When a cache receives a 304 (Not Modified) response and already has
855   one or more stored 200 (OK) responses for the same cache key, the
856   cache needs to identify which of the stored responses are updated by
857   this new response and then update the stored response(s) with the new
858   information provided in the 304 response.
859
860   o  If the new response contains a strong validator, then that strong
861      validator identifies the selected representation.  All of the
862      stored responses with the same strong validator are selected.  If
863      none of the stored responses contain the same strong validator,
864      then this new response corresponds to a new selected
865      representation and MUST NOT update the existing stored responses.
866
867   o  If the new response contains a weak validator and that validator
868      corresponds to one of the cache's stored responses, then the most
869      recent of those matching stored responses is selected.
870
871   o  If the new response does not include any form of validator, there
872      is only one stored response, and that stored response also lacks a
873      validator, then that stored response is selected.
874
875   If a stored response is selected for update, the cache MUST:
876
877   o  delete any Warning header fields in the stored response with warn-
878      code 1xx (see Section 7.5);
879
880   o  retain any Warning header fields in the stored response with warn-
881      code 2xx; and,
882
883   o  use other header fields provided in the 304 (Not Modified)
884      response to replace all instances of the corresponding header
885      fields in the stored response.
886
8874.3.  Using Negotiated Responses
888
889   When a cache receives a request that can be satisfied by a stored
890   response that has a Vary header field (Section 8.2.1 of [Part2]), it
891   MUST NOT use that response unless all of the selecting header fields
892
893
894
895Fielding, et al.          Expires April 7, 2013                [Page 16]
896
897Internet-Draft              HTTP/1.1 Caching                October 2012
898
899
900   nominated by the Vary header field match in both the original request
901   (i.e., that associated with the stored response), and the presented
902   request.
903
904   The selecting header fields from two requests are defined to match if
905   and only if those in the first request can be transformed to those in
906   the second request by applying any of the following:
907
908   o  adding or removing whitespace, where allowed in the header field's
909      syntax
910
911   o  combining multiple header fields with the same field name (see
912      Section 3.2 of [Part1])
913
914   o  normalizing both header field values in a way that is known to
915      have identical semantics, according to the header field's
916      specification (e.g., re-ordering field values when order is not
917      significant; case-normalization, where values are defined to be
918      case-insensitive)
919
920   If (after any normalization that might take place) a header field is
921   absent from a request, it can only match another request if it is
922   also absent there.
923
924   A Vary header field-value of "*" always fails to match, and
925   subsequent requests to that resource can only be properly interpreted
926   by the origin server.
927
928   The stored response with matching selecting header fields is known as
929   the selected response.
930
931   If multiple selected responses are available, the most recent
932   response (as determined by the Date header field) is used; see
933   Section 4.
934
935   If no selected response is available, the cache can forward the
936   presented request to the origin server in a conditional request; see
937   Section 4.2.
938
9394.4.  Combining Partial Content
940
941   A response might transfer only a partial representation if the
942   connection closed prematurely or if the request used one or more
943   Range specifiers ([Part5]).  After several such transfers, a cache
944   might have received several ranges of the same representation.  A
945   cache MAY combine these ranges into a single stored response, and
946   reuse that response to satisfy later requests, if they all share the
947   same strong validator and the cache complies with the client
948
949
950
951Fielding, et al.          Expires April 7, 2013                [Page 17]
952
953Internet-Draft              HTTP/1.1 Caching                October 2012
954
955
956   requirements in Section 4.2 of [Part5].
957
958   When combining the new response with one or more stored responses, a
959   cache MUST:
960
961   o  delete any Warning header fields in the stored response with warn-
962      code 1xx (see Section 7.5);
963
964   o  retain any Warning header fields in the stored response with warn-
965      code 2xx; and,
966
967   o  use other header fields provided in the new response, aside from
968      Content-Range, to replace all instances of the corresponding
969      header fields in the stored response.
970
9715.  Updating Caches with HEAD Responses
972
973   A response to the HEAD method is identical to what an equivalent
974   request made with a GET would have been, except it lacks a body.
975   This property of HEAD responses is used to both invalidate and update
976   cached GET responses.
977
978   If one or more stored GET responses can be selected (as per
979   Section 4.3) for a HEAD request, and the Content-Length, ETag or
980   Last-Modified value of a HEAD response differs from that in a
981   selected GET response, the cache MUST consider that selected response
982   to be stale.
983
984   If the Content-Length, ETag and Last-Modified values of a HEAD
985   response (when present) are the same as that in a selected GET
986   response (as per Section 4.3), the cache SHOULD update the remaining
987   header fields in the stored response using the following rules:
988
989   o  delete any Warning header fields in the stored response with warn-
990      code 1xx (see Section 7.5);
991
992   o  retain any Warning header fields in the stored response with warn-
993      code 2xx; and,
994
995   o  use other header fields provided in the response to replace all
996      instances of the corresponding header fields in the stored
997      response.
998
9996.  Request Methods that Invalidate
1000
1001   Because unsafe request methods (Section 5.2.1 of [Part2]) such as
1002   PUT, POST or DELETE have the potential for changing state on the
1003   origin server, intervening caches can use them to keep their contents
1004
1005
1006
1007Fielding, et al.          Expires April 7, 2013                [Page 18]
1008
1009Internet-Draft              HTTP/1.1 Caching                October 2012
1010
1011
1012   up-to-date.
1013
1014   A cache MUST invalidate the effective Request URI (Section 5.5 of
1015   [Part1]) as well as the URI(s) in the Location and Content-Location
1016   response header fields (if present) when a non-error response to a
1017   request with an unsafe method is received.
1018
1019   However, a cache MUST NOT invalidate a URI from a Location or
1020   Content-Location response header field if the host part of that URI
1021   differs from the host part in the effective request URI (Section 5.5
1022   of [Part1]).  This helps prevent denial of service attacks.
1023
1024   A cache MUST invalidate the effective request URI (Section 5.5 of
1025   [Part1]) when it receives a non-error response to a request with a
1026   method whose safety is unknown.
1027
1028   Here, a "non-error response" is one with a 2xx (Successful) or 3xx
1029   (Redirection) status code.  "Invalidate" means that the cache will
1030   either remove all stored responses related to the effective request
1031   URI, or will mark these as "invalid" and in need of a mandatory
1032   validation before they can be returned in response to a subsequent
1033   request.
1034
1035   Note that this does not guarantee that all appropriate responses are
1036   invalidated.  For example, the request that caused the change at the
1037   origin server might not have gone through the cache where a response
1038   is stored.
1039
10407.  Header Field Definitions
1041
1042   This section defines the syntax and semantics of HTTP/1.1 header
1043   fields related to caching.
1044
10457.1.  Age
1046
1047   The "Age" header field conveys the sender's estimate of the amount of
1048   time since the response was generated or successfully validated at
1049   the origin server.  Age values are calculated as specified in
1050   Section 4.1.3.
1051
1052     Age = delta-seconds
1053
1054   Age field-values are non-negative integers, representing time in
1055   seconds (see Section 1.4.1).
1056
1057   The presence of an Age header field in a response implies that a
1058   response is not first-hand.  However, the converse is not true, since
1059   HTTP/1.0 caches might not implement the Age header field.
1060
1061
1062
1063Fielding, et al.          Expires April 7, 2013                [Page 19]
1064
1065Internet-Draft              HTTP/1.1 Caching                October 2012
1066
1067
10687.2.  Cache-Control
1069
1070   The "Cache-Control" header field is used to specify directives for
1071   caches along the request/response chain.  Such cache directives are
1072   unidirectional in that the presence of a directive in a request does
1073   not imply that the same directive is to be given in the response.
1074
1075   A cache MUST obey the requirements of the Cache-Control directives
1076   defined in this section.  See Section 7.2.3 for information about how
1077   Cache-Control directives defined elsewhere are handled.
1078
1079      Note: HTTP/1.0 caches might not implement Cache-Control and might
1080      only implement Pragma: no-cache (see Section 7.4).
1081
1082   A proxy, whether or not it implements a cache, MUST pass cache
1083   directives through in forwarded messages, regardless of their
1084   significance to that application, since the directives might be
1085   applicable to all recipients along the request/response chain.  It is
1086   not possible to target a directive to a specific cache.
1087
1088   Cache directives are identified by a token, to be compared case-
1089   insensitively, and have an optional argument, that can use both token
1090   and quoted-string syntax.  For the directives defined below that
1091   define arguments, recipients ought to accept both forms, even if one
1092   is documented to be preferred.  For any directive not defined by this
1093   specification, recipients MUST accept both forms.
1094
1095     Cache-Control   = 1#cache-directive
1096
1097     cache-directive = token [ "=" ( token / quoted-string ) ]
1098
1099   For the cache directives defined below, no argument is defined (nor
1100   allowed) otherwise stated otherwise.
1101
11027.2.1.  Request Cache-Control Directives
1103
11047.2.1.1.  no-cache
1105
1106   The "no-cache" request directive indicates that a cache MUST NOT use
1107   a stored response to satisfy the request without successful
1108   validation on the origin server.
1109
11107.2.1.2.  no-store
1111
1112   The "no-store" request directive indicates that a cache MUST NOT
1113   store any part of either this request or any response to it.  This
1114   directive applies to both private and shared caches.  "MUST NOT
1115   store" in this context means that the cache MUST NOT intentionally
1116
1117
1118
1119Fielding, et al.          Expires April 7, 2013                [Page 20]
1120
1121Internet-Draft              HTTP/1.1 Caching                October 2012
1122
1123
1124   store the information in non-volatile storage, and MUST make a best-
1125   effort attempt to remove the information from volatile storage as
1126   promptly as possible after forwarding it.
1127
1128   This directive is NOT a reliable or sufficient mechanism for ensuring
1129   privacy.  In particular, malicious or compromised caches might not
1130   recognize or obey this directive, and communications networks might
1131   be vulnerable to eavesdropping.
1132
1133   Note that if a request containing this directive is satisfied from a
1134   cache, the no-store request directive does not apply to the already
1135   stored response.
1136
11377.2.1.3.  max-age
1138
1139   Argument syntax:
1140
1141      delta-seconds (see Section 1.4.1)
1142
1143   The "max-age" request directive indicates that the client is
1144   unwilling to accept a response whose age is greater than the
1145   specified number of seconds.  Unless the max-stale request directive
1146   is also present, the client is not willing to accept a stale
1147   response.
1148
1149   Note: This directive uses the token form of the argument syntax;
1150   e.g., 'max-age=5', not 'max-age="5"'.  Senders SHOULD NOT use the
1151   quoted-string form.
1152
11537.2.1.4.  max-stale
1154
1155   Argument syntax:
1156
1157      delta-seconds (see Section 1.4.1)
1158
1159   The "max-stale" request directive indicates that the client is
1160   willing to accept a response that has exceeded its expiration time.
1161   If max-stale is assigned a value, then the client is willing to
1162   accept a response that has exceeded its expiration time by no more
1163   than the specified number of seconds.  If no value is assigned to
1164   max-stale, then the client is willing to accept a stale response of
1165   any age.
1166
1167   Note: This directive uses the token form of the argument syntax;
1168   e.g., 'max-stale=10', not 'max-stale="10"'.  Senders SHOULD NOT use
1169   the quoted-string form.
1170
1171
1172
1173
1174
1175Fielding, et al.          Expires April 7, 2013                [Page 21]
1176
1177Internet-Draft              HTTP/1.1 Caching                October 2012
1178
1179
11807.2.1.5.  min-fresh
1181
1182   Argument syntax:
1183
1184      delta-seconds (see Section 1.4.1)
1185
1186   The "min-fresh" request directive indicates that the client is
1187   willing to accept a response whose freshness lifetime is no less than
1188   its current age plus the specified time in seconds.  That is, the
1189   client wants a response that will still be fresh for at least the
1190   specified number of seconds.
1191
1192   Note: This directive uses the token form of the argument syntax;
1193   e.g., 'min-fresh=20', not 'min-fresh="20"'.  Senders SHOULD NOT use
1194   the quoted-string form.
1195
11967.2.1.6.  no-transform
1197
1198   The "no-transform" request directive indicates that an intermediary
1199   (whether or not it implements a cache) MUST NOT change the Content-
1200   Encoding, Content-Range or Content-Type request header fields, nor
1201   the request representation.
1202
12037.2.1.7.  only-if-cached
1204
1205   The "only-if-cached" request directive indicates that the client only
1206   wishes to obtain a stored response.  If it receives this directive, a
1207   cache SHOULD either respond using a stored response that is
1208   consistent with the other constraints of the request, or respond with
1209   a 504 (Gateway Timeout) status code.  If a group of caches is being
1210   operated as a unified system with good internal connectivity, a
1211   member cache MAY forward such a request within that group of caches.
1212
12137.2.2.  Response Cache-Control Directives
1214
12157.2.2.1.  public
1216
1217   The "public" response directive indicates that a response whose
1218   associated request contains an 'Authentication' header MAY be stored
1219   (see Section 3.2).
1220
12217.2.2.2.  private
1222
1223   Argument syntax:
1224
1225      #field-name
1226
1227   The "private" response directive indicates that the response message
1228
1229
1230
1231Fielding, et al.          Expires April 7, 2013                [Page 22]
1232
1233Internet-Draft              HTTP/1.1 Caching                October 2012
1234
1235
1236   is intended for a single user and MUST NOT be stored by a shared
1237   cache.  A private cache MAY store the response.
1238
1239   If the private response directive specifies one or more field-names,
1240   this requirement is limited to the field-values associated with the
1241   listed response header fields.  That is, a shared cache MUST NOT
1242   store the specified field-names(s), whereas it MAY store the
1243   remainder of the response message.
1244
1245   The field-names given are not limited to the set of standard header
1246   fields defined by this specification.  Field names are case-
1247   insensitive.
1248
1249   Note: This usage of the word "private" only controls where the
1250   response can be stored; it cannot ensure the privacy of the message
1251   content.  Also, private response directives with field-names are
1252   often handled by implementations as if an unqualified private
1253   directive was received; i.e., the special handling for the qualified
1254   form is not widely implemented.
1255
1256   Note: This directive uses the quoted-string form of the argument
1257   syntax.  Senders SHOULD NOT use the token form (even if quoting
1258   appears not to be needed for single-entry lists).
1259
12607.2.2.3.  no-cache
1261
1262   Argument syntax:
1263
1264      #field-name
1265
1266   The "no-cache" response directive indicates that the response MUST
1267   NOT be used to satisfy a subsequent request without successful
1268   validation on the origin server.  This allows an origin server to
1269   prevent a cache from using it to satisfy a request without contacting
1270   it, even by caches that have been configured to return stale
1271   responses.
1272
1273   If the no-cache response directive specifies one or more field-names,
1274   then a cache MAY use the response to satisfy a subsequent request,
1275   subject to any other restrictions on caching.  However, any header
1276   fields in the response that have the field-name(s) listed MUST NOT be
1277   sent in the response to a subsequent request without successful
1278   revalidation with the origin server.  This allows an origin server to
1279   prevent the re-use of certain header fields in a response, while
1280   still allowing caching of the rest of the response.
1281
1282   The field-names given are not limited to the set of standard header
1283   fields defined by this specification.  Field names are case-
1284
1285
1286
1287Fielding, et al.          Expires April 7, 2013                [Page 23]
1288
1289Internet-Draft              HTTP/1.1 Caching                October 2012
1290
1291
1292   insensitive.
1293
1294   Note: Many HTTP/1.0 caches will not recognize or obey this directive.
1295   Also, no-cache response directives with field-names are often handled
1296   by implementations as if an unqualified no-cache directive was
1297   received; i.e., the special handling for the qualified form is not
1298   widely implemented.
1299
1300   Note: This directive uses the quoted-string form of the argument
1301   syntax.  Senders SHOULD NOT use the token form (even if quoting
1302   appears not to be needed for single-entry lists).
1303
13047.2.2.4.  no-store
1305
1306   The "no-store" response directive indicates that a cache MUST NOT
1307   store any part of either the immediate request or response.  This
1308   directive applies to both private and shared caches.  "MUST NOT
1309   store" in this context means that the cache MUST NOT intentionally
1310   store the information in non-volatile storage, and MUST make a best-
1311   effort attempt to remove the information from volatile storage as
1312   promptly as possible after forwarding it.
1313
1314   This directive is NOT a reliable or sufficient mechanism for ensuring
1315   privacy.  In particular, malicious or compromised caches might not
1316   recognize or obey this directive, and communications networks might
1317   be vulnerable to eavesdropping.
1318
13197.2.2.5.  must-revalidate
1320
1321   The "must-revalidate" response directive indicates that once it has
1322   become stale, a cache MUST NOT use the response to satisfy subsequent
1323   requests without successful validation on the origin server.
1324
1325   The must-revalidate directive is necessary to support reliable
1326   operation for certain protocol features.  In all circumstances a
1327   cache MUST obey the must-revalidate directive; in particular, if a
1328   cache cannot reach the origin server for any reason, it MUST generate
1329   a 504 (Gateway Timeout) response.
1330
1331   The must-revalidate directive ought to be used by servers if and only
1332   if failure to validate a request on the representation could result
1333   in incorrect operation, such as a silently unexecuted financial
1334   transaction.
1335
13367.2.2.6.  proxy-revalidate
1337
1338   The "proxy-revalidate" response directive has the same meaning as the
1339   must-revalidate response directive, except that it does not apply to
1340
1341
1342
1343Fielding, et al.          Expires April 7, 2013                [Page 24]
1344
1345Internet-Draft              HTTP/1.1 Caching                October 2012
1346
1347
1348   private caches.
1349
13507.2.2.7.  max-age
1351
1352   Argument syntax:
1353
1354      delta-seconds (see Section 1.4.1)
1355
1356   The "max-age" response directive indicates that the response is to be
1357   considered stale after its age is greater than the specified number
1358   of seconds.
1359
1360   Note: This directive uses the token form of the argument syntax;
1361   e.g., 'max-age=5', not 'max-age="5"'.  Senders SHOULD NOT use the
1362   quoted-string form.
1363
13647.2.2.8.  s-maxage
1365
1366   Argument syntax:
1367
1368      delta-seconds (see Section 1.4.1)
1369
1370   The "s-maxage" response directive indicates that, in shared caches,
1371   the maximum age specified by this directive overrides the maximum age
1372   specified by either the max-age directive or the Expires header
1373   field.  The s-maxage directive also implies the semantics of the
1374   proxy-revalidate response directive.
1375
1376   Note: This directive uses the token form of the argument syntax;
1377   e.g., 's-maxage=10', not 's-maxage="10"'.  Senders SHOULD NOT use the
1378   quoted-string form.
1379
13807.2.2.9.  no-transform
1381
1382   The "no-transform" response directive indicates that an intermediary
1383   (regardless of whether it implements a cache) MUST NOT change the
1384   Content-Encoding, Content-Range or Content-Type response header
1385   fields, nor the response representation.
1386
13877.2.3.  Cache Control Extensions
1388
1389   The Cache-Control header field can be extended through the use of one
1390   or more cache-extension tokens, each with an optional value.
1391   Informational extensions (those that do not require a change in cache
1392   behavior) can be added without changing the semantics of other
1393   directives.  Behavioral extensions are designed to work by acting as
1394   modifiers to the existing base of cache directives.  Both the new
1395   directive and the standard directive are supplied, such that
1396
1397
1398
1399Fielding, et al.          Expires April 7, 2013                [Page 25]
1400
1401Internet-Draft              HTTP/1.1 Caching                October 2012
1402
1403
1404   applications that do not understand the new directive will default to
1405   the behavior specified by the standard directive, and those that
1406   understand the new directive will recognize it as modifying the
1407   requirements associated with the standard directive.  In this way,
1408   extensions to the cache-control directives can be made without
1409   requiring changes to the base protocol.
1410
1411   This extension mechanism depends on an HTTP cache obeying all of the
1412   cache-control directives defined for its native HTTP-version, obeying
1413   certain extensions, and ignoring all directives that it does not
1414   understand.
1415
1416   For example, consider a hypothetical new response directive called
1417   "community" that acts as a modifier to the private directive.  We
1418   define this new directive to mean that, in addition to any private
1419   cache, any cache that is shared only by members of the community
1420   named within its value is allowed to cache the response.  An origin
1421   server wishing to allow the UCI community to use an otherwise private
1422   response in their shared cache(s) could do so by including
1423
1424     Cache-Control: private, community="UCI"
1425
1426   A cache seeing this header field will act correctly even if the cache
1427   does not understand the community cache-extension, since it will also
1428   see and understand the private directive and thus default to the safe
1429   behavior.
1430
1431   A cache MUST ignore unrecognized cache directives; it is assumed that
1432   any cache directive likely to be unrecognized by an HTTP/1.1 cache
1433   will be combined with standard directives (or the response's default
1434   cacheability) such that the cache behavior will remain minimally
1435   correct even if the cache does not understand the extension(s).
1436
1437   New extension directives ought to consider defining:
1438
1439   o  What it means for a directive to be specified multiple times,
1440
1441   o  When the directive does not take an argument, what it means when
1442      an argument is present,
1443
1444   o  When the directive requires an argument, what it means when it is
1445      missing.
1446
1447   The HTTP Cache Directive Registry defines the name space for the
1448   cache directives.
1449
1450   A registration MUST include the following fields:
1451
1452
1453
1454
1455Fielding, et al.          Expires April 7, 2013                [Page 26]
1456
1457Internet-Draft              HTTP/1.1 Caching                October 2012
1458
1459
1460   o  Cache Directive Name
1461
1462   o  Pointer to specification text
1463
1464   Values to be added to this name space require IETF Review (see
1465   [RFC5226], Section 4.1).
1466
1467   The registry itself is maintained at
1468   <http://www.iana.org/assignments/http-cache-directives>.
1469
14707.3.  Expires
1471
1472   The "Expires" header field gives the date/time after which the
1473   response is considered stale.  See Section 4.1 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.1.1.1 of [Part2]; a sender MUST use the rfc1123-date
1482   format.
1483
1484     Expires = HTTP-date
1485
1486   For example
1487
1488     Expires: Thu, 01 Dec 1994 16:00:00 GMT
1489
1490   A cache MUST treat other invalid date formats, especially including
1491   the value "0", as in the past (i.e., "already expired").
1492
1493      Note: If a response includes a Cache-Control field with the max-
1494      age directive (see Section 7.2.2.7), that directive overrides the
1495      Expires field.  Likewise, the s-maxage directive (Section 7.2.2.8)
1496      overrides the Expires header fieldin shared caches.
1497
1498   Historically, HTTP required the Expires field-value to be no more
1499   than a year in the future.  While longer freshness lifetimes are no
1500   longer prohibited, extremely large values have been demonstrated to
1501   cause problems (e.g., clock overflows due to use of 32-bit integers
1502   for time values), and many caches will evict a response far sooner
1503   than that.  Therefore, senders ought not produce them.
1504
1505   An origin server without a clock MUST NOT assign Expires values to a
1506   response unless these values were associated with the resource by a
1507   system or user with a reliable clock.  It MAY assign an Expires value
1508
1509
1510
1511Fielding, et al.          Expires April 7, 2013                [Page 27]
1512
1513Internet-Draft              HTTP/1.1 Caching                October 2012
1514
1515
1516   that is known, at or before server configuration time, to be in the
1517   past (this allows "pre-expiration" of responses without storing
1518   separate Expires values for each resource).
1519
15207.4.  Pragma
1521
1522   The "Pragma" header field allows backwards compatibility with
1523   HTTP/1.0 caches, so that clients can specify a "no-cache" request
1524   that they will understand (as Cache-Control was not defined until
1525   HTTP/1.1).  When the Cache-Control header field is also present and
1526   understood in a request, Pragma is ignored.
1527
1528   In HTTP/1.0, Pragma was defined as an extensible field for
1529   implementation-specified directives for recipients.  This
1530   specification deprecates such extensions to improve interoperability.
1531
1532     Pragma           = 1#pragma-directive
1533     pragma-directive = "no-cache" / extension-pragma
1534     extension-pragma = token [ "=" ( token / quoted-string ) ]
1535
1536   When the Cache-Control header field is not present in a request, the
1537   no-cache request pragma-directive MUST have the same effect on caches
1538   as if "Cache-Control: no-cache" were present (see Section 7.2.1).
1539
1540   When sending a no-cache request, a client ought to include both the
1541   pragma and cache-control directives, unless Cache-Control: no-cache
1542   is purposefully omitted to target other Cache-Control response
1543   directives at HTTP/1.1 caches.  For example:
1544
1545     GET / HTTP/1.1
1546     Host: www.example.com
1547     Cache-Control: max-age=30
1548     Pragma: no-cache
1549
1550
1551   will constrain HTTP/1.1 caches to serve a response no older than 30
1552   seconds, while precluding implementations that do not understand
1553   Cache-Control from serving a cached response.
1554
1555      Note: Because the meaning of "Pragma: no-cache" in responses is
1556      not specified, it does not provide a reliable replacement for
1557      "Cache-Control: no-cache" in them.
1558
15597.5.  Warning
1560
1561   The "Warning" header field is used to carry additional information
1562   about the status or transformation of a message that might not be
1563   reflected in the message.  This information is typically used to warn
1564
1565
1566
1567Fielding, et al.          Expires April 7, 2013                [Page 28]
1568
1569Internet-Draft              HTTP/1.1 Caching                October 2012
1570
1571
1572   about possible incorrectness introduced by caching operations or
1573   transformations applied to the payload of the message.
1574
1575   Warnings can be used for other purposes, both cache-related and
1576   otherwise.  The use of a warning, rather than an error status code,
1577   distinguishes these responses from true failures.
1578
1579   Warning header fields can in general be applied to any message,
1580   however some warn-codes are specific to caches and can only be
1581   applied to response messages.
1582
1583     Warning       = 1#warning-value
1584
1585     warning-value = warn-code SP warn-agent SP warn-text
1586                                           [SP warn-date]
1587
1588     warn-code  = 3DIGIT
1589     warn-agent = ( uri-host [ ":" port ] ) / pseudonym
1590                     ; the name or pseudonym of the server adding
1591                     ; the Warning header field, for use in debugging
1592     warn-text  = quoted-string
1593     warn-date  = DQUOTE HTTP-date DQUOTE
1594
1595   Multiple warnings can be attached to a response (either by the origin
1596   server or by a cache), including multiple warnings with the same code
1597   number, only differing in warn-text.
1598
1599   When this occurs, the user agent SHOULD inform the user of as many of
1600   them as possible, in the order that they appear in the response.
1601
1602   Systems that generate multiple Warning header fields are encouraged
1603   to order them with this user agent behavior in mind.  New Warning
1604   header fields are added after any existing Warning header fields.
1605
1606   Warnings are assigned three digit warn-codes.  The first digit
1607   indicates whether the Warning is required to be deleted from a stored
1608   response after validation:
1609
1610   o  1xx Warnings describe the freshness or validation status of the
1611      response, and so MUST be deleted by a cache after validation.
1612      They can only be generated by a cache when validating a cached
1613      entry, and MUST NOT be generated in any other situation.
1614
1615   o  2xx Warnings describe some aspect of the representation that is
1616      not rectified by a validation (for example, a lossy compression of
1617      the representation) and MUST NOT be deleted by a cache after
1618      validation, unless a full response is returned, in which case they
1619      MUST be.
1620
1621
1622
1623Fielding, et al.          Expires April 7, 2013                [Page 29]
1624
1625Internet-Draft              HTTP/1.1 Caching                October 2012
1626
1627
1628   If an implementation sends a message with one or more Warning header
1629   fields to a receiver whose version is HTTP/1.0 or lower, then the
1630   sender MUST include in each warning-value a warn-date that matches
1631   the Date header field in the message.
1632
1633   If a system receives a message with a warning-value that includes a
1634   warn-date, and that warn-date is different from the Date value in the
1635   response, then that warning-value MUST be deleted from the message
1636   before storing, forwarding, or using it. (preventing the consequences
1637   of naive caching of Warning header fields.)  If all of the warning-
1638   values are deleted for this reason, the Warning header field MUST be
1639   deleted as well.
1640
1641   The following warn-codes are defined by this specification, each with
1642   a recommended warn-text in English, and a description of its meaning.
1643
16447.5.1.  110 Response is Stale
1645
1646   A cache SHOULD include this whenever the returned response is stale.
1647
16487.5.2.  111 Revalidation Failed
1649
1650   A cache SHOULD include this when returning a stale response because
1651   an attempt to validate the response failed, due to an inability to
1652   reach the server.
1653
16547.5.3.  112 Disconnected Operation
1655
1656   A cache SHOULD include this if it is intentionally disconnected from
1657   the rest of the network for a period of time.
1658
16597.5.4.  113 Heuristic Expiration
1660
1661   A cache SHOULD include this if it heuristically chose a freshness
1662   lifetime greater than 24 hours and the response's age is greater than
1663   24 hours.
1664
16657.5.5.  199 Miscellaneous Warning
1666
1667   The warning text can include arbitrary information to be presented to
1668   a human user, or logged.  A system receiving this warning MUST NOT
1669   take any automated action, besides presenting the warning to the
1670   user.
1671
16727.5.6.  214 Transformation Applied
1673
1674   MUST be added by a proxy if it applies any transformation to the
1675   representation, such as changing the content-coding, media-type, or
1676
1677
1678
1679Fielding, et al.          Expires April 7, 2013                [Page 30]
1680
1681Internet-Draft              HTTP/1.1 Caching                October 2012
1682
1683
1684   modifying the representation data, unless this Warning code already
1685   appears in the response.
1686
16877.5.7.  299 Miscellaneous Persistent Warning
1688
1689   The warning text can include arbitrary information to be presented to
1690   a human user, or logged.  A system receiving this warning MUST NOT
1691   take any automated action.
1692
16937.5.8.  Warn Code Extensions
1694
1695   The HTTP Warn Code Registry defines the name space for warn codes.
1696
1697   A registration MUST include the following fields:
1698
1699   o  Warn Code (3 digits)
1700
1701   o  Short Description
1702
1703   o  Pointer to specification text
1704
1705   Values to be added to this name space require IETF Review (see
1706   [RFC5226], Section 4.1).
1707
1708   The registry itself is maintained at
1709   <http://www.iana.org/assignments/http-warn-codes>.
1710
17118.  History Lists
1712
1713   User agents often have history mechanisms, such as "Back" buttons and
1714   history lists, that can be used to redisplay a representation
1715   retrieved earlier in a session.
1716
1717   The freshness model (Section 4.1) does not necessarily apply to
1718   history mechanisms.  I.e., a history mechanism can display a previous
1719   representation even if it has expired.
1720
1721   This does not prohibit the history mechanism from telling the user
1722   that a view might be stale, or from honoring cache directives (e.g.,
1723   Cache-Control: no-store).
1724
17259.  IANA Considerations
1726
17279.1.  Cache Directive Registry
1728
1729   The registration procedure for HTTP Cache Directives is defined by
1730   Section 7.2.3 of this document.
1731
1732
1733
1734
1735Fielding, et al.          Expires April 7, 2013                [Page 31]
1736
1737Internet-Draft              HTTP/1.1 Caching                October 2012
1738
1739
1740   The HTTP Cache Directive Registry shall be created at
1741   <http://www.iana.org/assignments/http-cache-directives> and be
1742   populated with the registrations below:
1743
1744   +------------------------+----------------------------------+
1745   | Cache Directive        | Reference                        |
1746   +------------------------+----------------------------------+
1747   | max-age                | Section 7.2.1.3, Section 7.2.2.7 |
1748   | max-stale              | Section 7.2.1.4                  |
1749   | min-fresh              | Section 7.2.1.5                  |
1750   | must-revalidate        | Section 7.2.2.5                  |
1751   | no-cache               | Section 7.2.1.1, Section 7.2.2.3 |
1752   | no-store               | Section 7.2.1.2, Section 7.2.2.4 |
1753   | no-transform           | Section 7.2.1.6, Section 7.2.2.9 |
1754   | only-if-cached         | Section 7.2.1.7                  |
1755   | private                | Section 7.2.2.2                  |
1756   | proxy-revalidate       | Section 7.2.2.6                  |
1757   | public                 | Section 7.2.2.1                  |
1758   | s-maxage               | Section 7.2.2.8                  |
1759   | stale-if-error         | [RFC5861], Section 4             |
1760   | stale-while-revalidate | [RFC5861], Section 3             |
1761   +------------------------+----------------------------------+
1762
17639.2.  Warn Code Registry
1764
1765   The registration procedure for HTTP Warn Codes is defined by
1766   Section 7.5.8 of this document.
1767
1768   The HTTP Warn Code Registry shall be created at
1769   <http://www.iana.org/assignments/http-cache-directives> and be
1770   populated with the registrations below:
1771
1772   +-----------+----------------------------------+---------------+
1773   | Warn Code | Short Description                | Reference     |
1774   +-----------+----------------------------------+---------------+
1775   | 110       | Response is Stale                | Section 7.5.1 |
1776   | 111       | Revalidation Failed              | Section 7.5.2 |
1777   | 112       | Disconnected Operation           | Section 7.5.3 |
1778   | 113       | Heuristic Expiration             | Section 7.5.4 |
1779   | 199       | Miscellaneous Warning            | Section 7.5.5 |
1780   | 214       | Transformation Applied           | Section 7.5.6 |
1781   | 299       | Miscellaneous Persistent Warning | Section 7.5.7 |
1782   +-----------+----------------------------------+---------------+
1783
1784
1785
1786
1787
1788
1789
1790
1791Fielding, et al.          Expires April 7, 2013                [Page 32]
1792
1793Internet-Draft              HTTP/1.1 Caching                October 2012
1794
1795
17969.3.  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 7.1 |
1806   | Cache-Control     | http     | standard | Section 7.2 |
1807   | Expires           | http     | standard | Section 7.3 |
1808   | Pragma            | http     | standard | Section 7.4 |
1809   | Warning           | http     | standard | Section 7.5 |
1810   +-------------------+----------+----------+-------------+
1811
1812   The change controller is: "IETF (iesg@ietf.org) - Internet
1813   Engineering Task Force".
1814
181510.  Security Considerations
1816
1817   Caches expose additional potential vulnerabilities, since the
1818   contents of the cache represent an attractive target for malicious
1819   exploitation.  Because cache contents persist after an HTTP request
1820   is complete, an attack on the cache can reveal information long after
1821   a user believes that the information has been removed from the
1822   network.  Therefore, cache contents need to be protected as sensitive
1823   information.
1824
1825   Implementation flaws might allow attackers to insert content into a
1826   cache ("cache poisoning"), leading to compromise of clients that
1827   trust that content.  Because of their nature, these attacks are
1828   difficult to mitigate.
1829
1830   Likewise, implementation flaws (as well as misunderstanding of cache
1831   operation) might lead to caching of sensitive information (e.g.,
1832   authentication credentials) that is thought to be private, exposing
1833   it to unauthorised parties.
1834
1835   Note that the Set-Cookie response header [RFC6265] does not inhibit
1836   caching; a cacheable response with a Set-Cookie header can be (and
1837   often is) used to satisfy subsequent requests to caches.  Servers who
1838   wish to control caching of these responses are encouraged to emit
1839   appropriate Cache-Control response headers.
1840
1841
1842
1843
1844
1845
1846
1847Fielding, et al.          Expires April 7, 2013                [Page 33]
1848
1849Internet-Draft              HTTP/1.1 Caching                October 2012
1850
1851
185211.  Acknowledgments
1853
1854   See Section 9 of [Part1].
1855
185612.  References
1857
185812.1.  Normative References
1859
1860   [Part1]    Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
1861              Protocol (HTTP/1.1): Message Syntax and Routing",
1862              draft-ietf-httpbis-p1-messaging-21 (work in progress),
1863              October 2012.
1864
1865   [Part2]    Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
1866              Protocol (HTTP/1.1): Semantics and Content",
1867              draft-ietf-httpbis-p2-semantics-21 (work in progress),
1868              October 2012.
1869
1870   [Part4]    Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
1871              Protocol (HTTP/1.1): Conditional Requests",
1872              draft-ietf-httpbis-p4-conditional-21 (work in progress),
1873              October 2012.
1874
1875   [Part5]    Fielding, R., Ed., Lafon, Y., Ed., and J. Reschke, Ed.,
1876              "Hypertext Transfer Protocol (HTTP/1.1): Range Requests",
1877              draft-ietf-httpbis-p5-range-21 (work in progress),
1878              October 2012.
1879
1880   [Part7]    Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
1881              Protocol (HTTP/1.1): Authentication",
1882              draft-ietf-httpbis-p7-auth-21 (work in progress),
1883              October 2012.
1884
1885   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
1886              Requirement Levels", BCP 14, RFC 2119, March 1997.
1887
1888   [RFC5234]  Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
1889              Specifications: ABNF", STD 68, RFC 5234, January 2008.
1890
189112.2.  Informative References
1892
1893   [RFC1305]  Mills, D., "Network Time Protocol (Version 3)
1894              Specification, Implementation", RFC 1305, March 1992.
1895
1896   [RFC2616]  Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
1897              Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
1898              Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
1899
1900
1901
1902
1903Fielding, et al.          Expires April 7, 2013                [Page 34]
1904
1905Internet-Draft              HTTP/1.1 Caching                October 2012
1906
1907
1908   [RFC3864]  Klyne, G., Nottingham, M., and J. Mogul, "Registration
1909              Procedures for Message Header Fields", BCP 90, RFC 3864,
1910              September 2004.
1911
1912   [RFC5226]  Narten, T. and H. Alvestrand, "Guidelines for Writing an
1913              IANA Considerations Section in RFCs", BCP 26, RFC 5226,
1914              May 2008.
1915
1916   [RFC5861]  Nottingham, M., "HTTP Cache-Control Extensions for Stale
1917              Content", RFC 5861, April 2010.
1918
1919   [RFC6265]  Barth, A., "HTTP State Management Mechanism", RFC 6265,
1920              April 2011.
1921
1922Appendix A.  Changes from RFC 2616
1923
1924   Make the specified age calculation algorithm less conservative.
1925   (Section 4.1.3)
1926
1927   Remove requirement to consider "Content-Location" in successful
1928   responses in order to determine the appropriate response to use.
1929   (Section 4.2)
1930
1931   Clarify denial of service attack avoidance requirement.  (Section 6)
1932
1933   Do not mention RFC 2047 encoding and multiple languages in "Warning"
1934   header fields anymore, as these aspects never were implemented.
1935   (Section 7.5)
1936
1937   Introduce Cache Directive and Warn Code Registries.  (Section 7.2.3
1938   and Section 7.5.8)
1939
1940Appendix B.  Imported ABNF
1941
1942   The following core rules are included by reference, as defined in
1943   Appendix B.1 of [RFC5234]: ALPHA (letters), CR (carriage return),
1944   CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double
1945   quote), HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any
1946   8-bit sequence of data), SP (space), and VCHAR (any visible US-ASCII
1947   character).
1948
1949   The rules below are defined in [Part1]:
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959Fielding, et al.          Expires April 7, 2013                [Page 35]
1960
1961Internet-Draft              HTTP/1.1 Caching                October 2012
1962
1963
1964     OWS           = <OWS, defined in [Part1], Section 3.2.1>
1965     field-name    = <field-name, defined in [Part1], Section 3.2>
1966     quoted-string = <quoted-string, defined in [Part1], Section 3.2.4>
1967     token         = <token, defined in [Part1], Section 3.2.4>
1968
1969     port          = <port, defined in [Part1], Section 2.7>
1970     pseudonym     = <pseudonym, defined in [Part1], Section 5.7>
1971     uri-host      = <uri-host, defined in [Part1], Section 2.7>
1972
1973   The rules below are defined in other parts:
1974
1975     HTTP-date     = <HTTP-date, defined in [Part2], Section 8.1.1.1>
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015Fielding, et al.          Expires April 7, 2013                [Page 36]
2016
2017Internet-Draft              HTTP/1.1 Caching                October 2012
2018
2019
2020Appendix C.  Collected ABNF
2021
2022   Age = delta-seconds
2023
2024   Cache-Control = *( "," OWS ) cache-directive *( OWS "," [ OWS
2025    cache-directive ] )
2026
2027   Expires = HTTP-date
2028
2029   HTTP-date = <HTTP-date, defined in [Part2], Section 8.1.1.1>
2030
2031   OWS = <OWS, defined in [Part1], Section 3.2.1>
2032
2033   Pragma = *( "," OWS ) pragma-directive *( OWS "," [ OWS
2034    pragma-directive ] )
2035
2036   Warning = *( "," OWS ) warning-value *( OWS "," [ OWS warning-value ]
2037    )
2038
2039   cache-directive = token [ "=" ( token / quoted-string ) ]
2040
2041   delta-seconds = 1*DIGIT
2042
2043   extension-pragma = token [ "=" ( token / quoted-string ) ]
2044
2045   field-name = <field-name, defined in [Part1], Section 3.2>
2046
2047   port = <port, defined in [Part1], Section 2.7>
2048   pragma-directive = "no-cache" / extension-pragma
2049   pseudonym = <pseudonym, defined in [Part1], Section 5.7>
2050
2051   quoted-string = <quoted-string, defined in [Part1], Section 3.2.4>
2052
2053   token = <token, defined in [Part1], Section 3.2.4>
2054
2055   uri-host = <uri-host, defined in [Part1], Section 2.7>
2056
2057   warn-agent = ( uri-host [ ":" port ] ) / pseudonym
2058   warn-code = 3DIGIT
2059   warn-date = DQUOTE HTTP-date DQUOTE
2060   warn-text = quoted-string
2061   warning-value = warn-code SP warn-agent SP warn-text [ SP warn-date
2062    ]
2063
2064
2065
2066
2067
2068
2069
2070
2071Fielding, et al.          Expires April 7, 2013                [Page 37]
2072
2073Internet-Draft              HTTP/1.1 Caching                October 2012
2074
2075
2076Appendix D.  Change Log (to be removed by RFC Editor before publication)
2077
2078   Changes up to the first Working Group Last Call draft are summarized
2079   in <http://trac.tools.ietf.org/html/
2080   draft-ietf-httpbis-p6-cache-19#appendix-C>.
2081
2082D.1.  Since draft-ietf-httpbis-p6-cache-19
2083
2084   Closed issues:
2085
2086   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/307>: "untangle
2087      Cache-Control ABNF"
2088
2089   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/353>: "Multiple
2090      values in Cache-Control header fields"
2091
2092   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/355>: "Case
2093      sensitivity of header fields in CC values"
2094
2095   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/356>: "Spurious
2096      'MAYs'"
2097
2098   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/360>: "enhance
2099      considerations for new cache control directives"
2100
2101   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/361>: "ABNF
2102      requirements for recipients"
2103
2104   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/368>: "note
2105      introduction of new IANA registries as normative changes"
2106
2107   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/373>: "broken prose
2108      in description of 'Vary'"
2109
2110D.2.  Since draft-ietf-httpbis-p6-cache-20
2111
2112   Closed issues:
2113
2114   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/375>: "'Most
2115      Conservative'"
2116
2117   Other changes:
2118
2119   o  Conformance criteria and considerations regarding error handling
2120      are now defined in Part 1.
2121
2122   o  Move definition of "Vary" header field into Part 2.
2123
2124
2125
2126
2127Fielding, et al.          Expires April 7, 2013                [Page 38]
2128
2129Internet-Draft              HTTP/1.1 Caching                October 2012
2130
2131
2132   o  Add security considerations with respect to cache poisoning and
2133      the "Set-Cookie" header field.
2134
2135Index
2136
2137   1
2138      110 Response is Stale (warn code)  30
2139      111 Revalidation Failed (warn code)  30
2140      112 Disconnected Operation (warn code)  30
2141      113 Heuristic Expiration (warn code)  30
2142      199 Miscellaneous Warning (warn code)  30
2143
2144   2
2145      214 Transformation Applied (warn code)  30
2146      299 Miscellaneous Persistent Warning (warn code)  31
2147
2148   A
2149      age  5
2150      Age header field  19
2151
2152   C
2153      cache  4
2154      cache entry  6
2155      cache key  6
2156      Cache-Control header field  20
2157      cacheable  4
2158
2159   E
2160      Expires header field  27
2161      explicit expiration time  5
2162
2163   F
2164      first-hand  5
2165      fresh  5
2166      freshness lifetime  5
2167
2168   G
2169      Grammar
2170         Age  19
2171         Cache-Control  20
2172         cache-directive  20
2173         delta-seconds  6
2174         Expires  27
2175         extension-pragma  28
2176         Pragma  28
2177         pragma-directive  28
2178         warn-agent  29
2179         warn-code  29
2180
2181
2182
2183Fielding, et al.          Expires April 7, 2013                [Page 39]
2184
2185Internet-Draft              HTTP/1.1 Caching                October 2012
2186
2187
2188         warn-date  29
2189         warn-text  29
2190         Warning  29
2191         warning-value  29
2192
2193   H
2194      heuristic expiration time  5
2195
2196   M
2197      max-age (cache directive)  21, 25
2198      max-stale (cache directive)  21
2199      min-fresh (cache directive)  22
2200      must-revalidate (cache directive)  24
2201
2202   N
2203      no-cache (cache directive)  20, 23
2204      no-store (cache directive)  20, 24
2205      no-transform (cache directive)  22, 25
2206
2207   O
2208      only-if-cached (cache directive)  22
2209
2210   P
2211      Pragma header field  28
2212      private (cache directive)  22
2213      private cache  4
2214      proxy-revalidate (cache directive)  24
2215      public (cache directive)  22
2216
2217   S
2218      s-maxage (cache directive)  25
2219      shared cache  4
2220      stale  5
2221      strong validator  6
2222
2223   V
2224      validator  5
2225         strong  6
2226
2227   W
2228      Warning header field  28
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239Fielding, et al.          Expires April 7, 2013                [Page 40]
2240
2241Internet-Draft              HTTP/1.1 Caching                October 2012
2242
2243
2244Authors' Addresses
2245
2246   Roy T. Fielding (editor)
2247   Adobe Systems Incorporated
2248   345 Park Ave
2249   San Jose, CA  95110
2250   USA
2251
2252   EMail: fielding@gbiv.com
2253   URI:   http://roy.gbiv.com/
2254
2255
2256   Mark Nottingham (editor)
2257   Akamai
2258
2259   EMail: mnot@mnot.net
2260   URI:   http://www.mnot.net/
2261
2262
2263   Julian F. Reschke (editor)
2264   greenbytes GmbH
2265   Hafenweg 16
2266   Muenster, NW  48155
2267   Germany
2268
2269   EMail: julian.reschke@greenbytes.de
2270   URI:   http://greenbytes.de/tech/webdav/
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295Fielding, et al.          Expires April 7, 2013                [Page 41]
2296
Note: See TracBrowser for help on using the repository browser.