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