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