| draft-ietf-httpbis-p6-cache-00.txt | draft-ietf-httpbis-p6-cache-01.txt | |||
|---|---|---|---|---|
| Network Working Group R. Fielding, Ed. | Network Working Group R. Fielding, Ed. | |||
| Internet-Draft Day Software | Internet-Draft Day Software | |||
| Obsoletes: 2068, 2616 J. Gettys | Obsoletes: 2616 (if approved) J. Gettys | |||
| (if approved) One Laptop per Child | Intended status: Standards Track One Laptop per Child | |||
| Intended status: Standards Track J. Mogul | Expires: July 15, 2008 J. Mogul | |||
| Expires: June 22, 2008 HP | HP | |||
| H. Frystyk | H. Frystyk | |||
| Microsoft | Microsoft | |||
| L. Masinter | L. Masinter | |||
| Adobe Systems | Adobe Systems | |||
| P. Leach | P. Leach | |||
| Microsoft | Microsoft | |||
| T. Berners-Lee | T. Berners-Lee | |||
| W3C/MIT | W3C/MIT | |||
| December 20, 2007 | Y. Lafon, Ed. | |||
| W3C | ||||
| J. Reschke, Ed. | ||||
| greenbytes | ||||
| January 12, 2008 | ||||
| HTTP/1.1, part 6: Caching | HTTP/1.1, part 6: Caching | |||
| draft-ietf-httpbis-p6-cache-00 | draft-ietf-httpbis-p6-cache-01 | |||
| Status of this Memo | Status of this Memo | |||
| By submitting this Internet-Draft, each author represents that any | By submitting this Internet-Draft, each author represents that any | |||
| applicable patent or other IPR claims of which he or she is aware | applicable patent or other IPR claims of which he or she is aware | |||
| have been or will be disclosed, and any of which he or she becomes | have been or will be disclosed, and any of which he or she becomes | |||
| aware will be disclosed, in accordance with Section 6 of BCP 79. | aware will be disclosed, in accordance with Section 6 of BCP 79. | |||
| Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
| Task Force (IETF), its areas, and its working groups. Note that | Task Force (IETF), its areas, and its working groups. Note that | |||
| skipping to change at page 1, line 45 | skipping to change at page 1, line 49 | |||
| and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
| time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
| material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
| The list of current Internet-Drafts can be accessed at | The list of current Internet-Drafts can be accessed at | |||
| http://www.ietf.org/ietf/1id-abstracts.txt. | http://www.ietf.org/ietf/1id-abstracts.txt. | |||
| The list of Internet-Draft Shadow Directories can be accessed at | The list of Internet-Draft Shadow Directories can be accessed at | |||
| http://www.ietf.org/shadow.html. | http://www.ietf.org/shadow.html. | |||
| This Internet-Draft will expire on June 22, 2008. | This Internet-Draft will expire on July 15, 2008. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (C) The IETF Trust (2007). | Copyright (C) The IETF Trust (2008). | |||
| Abstract | Abstract | |||
| The Hypertext Transfer Protocol (HTTP) is an application-level | The Hypertext Transfer Protocol (HTTP) is an application-level | |||
| protocol for distributed, collaborative, hypermedia information | protocol for distributed, collaborative, hypermedia information | |||
| systems. HTTP has been in use by the World Wide Web global | systems. HTTP has been in use by the World Wide Web global | |||
| information initiative since 1990. This document is Part 6 of the | information initiative since 1990. This document is Part 6 of the | |||
| seven-part specification that defines the protocol referred to as | seven-part specification that defines the protocol referred to as | |||
| "HTTP/1.1" and, taken together, obsoletes RFC 2616. Part 6 defines | "HTTP/1.1" and, taken together, obsoletes RFC 2616. Part 6 defines | |||
| requirements on HTTP caches and the associated header fields that | requirements on HTTP caches and the associated header fields that | |||
| control cache behavior or indicate cacheable response messages. | control cache behavior or indicate cacheable response messages. | |||
| Editorial Note (To be removed by RFC Editor) | Editorial Note (To be removed by RFC Editor) | |||
| This version of the HTTP specification contains only minimal | ||||
| editorial changes from [RFC2616] (abstract, introductory paragraph, | ||||
| and authors' addresses). All other changes are due to partitioning | ||||
| the original into seven mostly independent parts. The intent is for | ||||
| readers of future drafts to able to use draft 00 as the basis for | ||||
| comparison when the WG makes later changes to the specification text. | ||||
| This draft will shortly be followed by draft 01 (containing the first | ||||
| round of changes that have already been agreed to on the mailing | ||||
| list). There is no point in reviewing this draft other than to | ||||
| verify that the partitioning has been done correctly. Roy T. | ||||
| Fielding, Yves Lafon, and Julian Reschke will be the editors after | ||||
| draft 00 is submitted. | ||||
| Discussion of this draft should take place on the HTTPBIS working | Discussion of this draft should take place on the HTTPBIS working | |||
| group mailing list (ietf-http-wg@w3.org). The current issues list is | group mailing list (ietf-http-wg@w3.org). The current issues list is | |||
| at <http://www3.tools.ietf.org/wg/httpbis/trac/report/11> and related | at <http://www.tools.ietf.org/wg/httpbis/trac/report/11> and related | |||
| documents (including fancy diffs) can be found at | documents (including fancy diffs) can be found at | |||
| <http://www3.tools.ietf.org/wg/httpbis/>. | <http://www.tools.ietf.org/wg/httpbis/>. | |||
| This draft incorporates those issue resolutions that were either | ||||
| collected in the original RFC2616 errata list | ||||
| (<http://purl.org/NET/http-errata>), or which were agreed upon on the | ||||
| mailing list between October 2006 and November 2007 (as published in | ||||
| "draft-lafon-rfc2616bis-03"). | ||||
| Table of Contents | Table of Contents | |||
| 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 5 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 5 | |||
| 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5 | 1.1. Purpose . . . . . . . . . . . . . . . . . . . . . . . . . 5 | |||
| 1.2. Delta Seconds . . . . . . . . . . . . . . . . . . . . . . 6 | 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 6 | |||
| 2. Caching in HTTP . . . . . . . . . . . . . . . . . . . . . . . 6 | 1.3. Requirements . . . . . . . . . . . . . . . . . . . . . . . 7 | |||
| 2.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . 6 | 2. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 | |||
| 2.1.1. Cache Correctness . . . . . . . . . . . . . . . . . . 8 | 2.1. Cache Correctness . . . . . . . . . . . . . . . . . . . . 8 | |||
| 2.1.2. Warnings . . . . . . . . . . . . . . . . . . . . . . . 9 | 2.2. Warnings . . . . . . . . . . . . . . . . . . . . . . . . . 8 | |||
| 2.1.3. Cache-control Mechanisms . . . . . . . . . . . . . . . 10 | 2.3. Cache-control Mechanisms . . . . . . . . . . . . . . . . . 10 | |||
| 2.1.4. Explicit User Agent Warnings . . . . . . . . . . . . . 10 | 2.4. Explicit User Agent Warnings . . . . . . . . . . . . . . . 10 | |||
| 2.1.5. Exceptions to the Rules and Warnings . . . . . . . . . 11 | 2.5. Exceptions to the Rules and Warnings . . . . . . . . . . . 11 | |||
| 2.1.6. Client-controlled Behavior . . . . . . . . . . . . . . 11 | 2.6. Client-controlled Behavior . . . . . . . . . . . . . . . . 11 | |||
| 2.2. Expiration Model . . . . . . . . . . . . . . . . . . . . . 11 | 3. Expiration Model . . . . . . . . . . . . . . . . . . . . . . . 11 | |||
| 2.2.1. Server-Specified Expiration . . . . . . . . . . . . . 11 | 3.1. Server-Specified Expiration . . . . . . . . . . . . . . . 11 | |||
| 2.2.2. Heuristic Expiration . . . . . . . . . . . . . . . . . 12 | 3.2. Heuristic Expiration . . . . . . . . . . . . . . . . . . . 12 | |||
| 2.2.3. Age Calculations . . . . . . . . . . . . . . . . . . . 13 | 3.3. Age Calculations . . . . . . . . . . . . . . . . . . . . . 13 | |||
| 2.2.4. Expiration Calculations . . . . . . . . . . . . . . . 15 | 3.4. Expiration Calculations . . . . . . . . . . . . . . . . . 15 | |||
| 2.2.5. Disambiguating Expiration Values . . . . . . . . . . . 16 | 3.5. Disambiguating Expiration Values . . . . . . . . . . . . . 16 | |||
| 2.2.6. Disambiguating Multiple Responses . . . . . . . . . . 16 | 3.6. Disambiguating Multiple Responses . . . . . . . . . . . . 16 | |||
| 2.3. Validation Model . . . . . . . . . . . . . . . . . . . . . 17 | 4. Validation Model . . . . . . . . . . . . . . . . . . . . . . . 17 | |||
| 2.3.1. Last-Modified Dates . . . . . . . . . . . . . . . . . 18 | 4.1. Last-Modified Dates . . . . . . . . . . . . . . . . . . . 18 | |||
| 2.3.2. Entity Tag Cache Validators . . . . . . . . . . . . . 18 | 4.2. Entity Tag Cache Validators . . . . . . . . . . . . . . . 18 | |||
| 2.3.3. Non-validating Conditionals . . . . . . . . . . . . . 18 | 4.3. Non-validating Conditionals . . . . . . . . . . . . . . . 18 | |||
| 2.4. Response Cacheability . . . . . . . . . . . . . . . . . . 18 | 5. Response Cacheability . . . . . . . . . . . . . . . . . . . . 18 | |||
| 2.5. Constructing Responses From Caches . . . . . . . . . . . . 19 | 6. Constructing Responses From Caches . . . . . . . . . . . . . . 19 | |||
| 2.5.1. End-to-end and Hop-by-hop Headers . . . . . . . . . . 19 | 6.1. End-to-end and Hop-by-hop Headers . . . . . . . . . . . . 19 | |||
| 2.5.2. Non-modifiable Headers . . . . . . . . . . . . . . . . 20 | 6.2. Non-modifiable Headers . . . . . . . . . . . . . . . . . . 20 | |||
| 2.5.3. Combining Headers . . . . . . . . . . . . . . . . . . 21 | 6.3. Combining Headers . . . . . . . . . . . . . . . . . . . . 21 | |||
| 2.6. Caching Negotiated Responses . . . . . . . . . . . . . . . 22 | 7. Caching Negotiated Responses . . . . . . . . . . . . . . . . . 22 | |||
| 2.7. Shared and Non-Shared Caches . . . . . . . . . . . . . . . 24 | 8. Shared and Non-Shared Caches . . . . . . . . . . . . . . . . . 24 | |||
| 2.8. Errors or Incomplete Response Cache Behavior . . . . . . . 24 | 9. Errors or Incomplete Response Cache Behavior . . . . . . . . . 24 | |||
| 2.9. Side Effects of GET and HEAD . . . . . . . . . . . . . . . 24 | 10. Side Effects of GET and HEAD . . . . . . . . . . . . . . . . . 24 | |||
| 2.10. Invalidation After Updates or Deletions . . . . . . . . . 25 | 11. Invalidation After Updates or Deletions . . . . . . . . . . . 25 | |||
| 2.11. Write-Through Mandatory . . . . . . . . . . . . . . . . . 25 | 12. Write-Through Mandatory . . . . . . . . . . . . . . . . . . . 26 | |||
| 2.12. Cache Replacement . . . . . . . . . . . . . . . . . . . . 26 | 13. Cache Replacement . . . . . . . . . . . . . . . . . . . . . . 26 | |||
| 2.13. History Lists . . . . . . . . . . . . . . . . . . . . . . 26 | 14. History Lists . . . . . . . . . . . . . . . . . . . . . . . . 26 | |||
| 3. Header Field Definitions . . . . . . . . . . . . . . . . . . . 27 | 15. Header Field Definitions . . . . . . . . . . . . . . . . . . . 27 | |||
| 3.1. Age . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 | 15.1. Age . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 | |||
| 3.2. Cache-Control . . . . . . . . . . . . . . . . . . . . . . 27 | 15.2. Cache-Control . . . . . . . . . . . . . . . . . . . . . . 28 | |||
| 3.2.1. What is Cacheable . . . . . . . . . . . . . . . . . . 29 | 15.2.1. What is Cacheable . . . . . . . . . . . . . . . . . . 30 | |||
| 3.2.2. What May be Stored by Caches . . . . . . . . . . . . . 30 | 15.2.2. What May be Stored by Caches . . . . . . . . . . . . 31 | |||
| 3.2.3. Modifications of the Basic Expiration Mechanism . . . 31 | 15.2.3. Modifications of the Basic Expiration Mechanism . . . 31 | |||
| 3.2.4. Cache Revalidation and Reload Controls . . . . . . . . 33 | 15.2.4. Cache Revalidation and Reload Controls . . . . . . . 33 | |||
| 3.2.5. No-Transform Directive . . . . . . . . . . . . . . . . 35 | 15.2.5. No-Transform Directive . . . . . . . . . . . . . . . 36 | |||
| 3.2.6. Cache Control Extensions . . . . . . . . . . . . . . . 36 | 15.2.6. Cache Control Extensions . . . . . . . . . . . . . . 37 | |||
| 3.3. Expires . . . . . . . . . . . . . . . . . . . . . . . . . 37 | 15.3. Expires . . . . . . . . . . . . . . . . . . . . . . . . . 37 | |||
| 3.4. Pragma . . . . . . . . . . . . . . . . . . . . . . . . . . 38 | 15.4. Pragma . . . . . . . . . . . . . . . . . . . . . . . . . . 38 | |||
| 3.5. Vary . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 | 15.5. Vary . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 | |||
| 3.6. Warning . . . . . . . . . . . . . . . . . . . . . . . . . 39 | 15.6. Warning . . . . . . . . . . . . . . . . . . . . . . . . . 40 | |||
| 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 42 | 16. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 43 | |||
| 5. Security Considerations . . . . . . . . . . . . . . . . . . . 42 | 17. Security Considerations . . . . . . . . . . . . . . . . . . . 43 | |||
| 6. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 42 | 18. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 43 | |||
| 7. References . . . . . . . . . . . . . . . . . . . . . . . . . . 42 | 19. References . . . . . . . . . . . . . . . . . . . . . . . . . . 43 | |||
| Appendix A. Changes from RFC 2068 . . . . . . . . . . . . . . . . 43 | 19.1. Normative References . . . . . . . . . . . . . . . . . . . 43 | |||
| Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 | 19.2. Informative References . . . . . . . . . . . . . . . . . . 44 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 46 | Appendix A. Compatibility with Previous Versions . . . . . . . . 44 | |||
| Intellectual Property and Copyright Statements . . . . . . . . . . 49 | A.1. Changes from RFC 2068 . . . . . . . . . . . . . . . . . . 44 | |||
| A.2. Changes from RFC 2616 . . . . . . . . . . . . . . . . . . 45 | ||||
| Appendix B. Change Log (to be removed by RFC Editor before | ||||
| publication) . . . . . . . . . . . . . . . . . . . . 45 | ||||
| B.1. Since RFC2616 . . . . . . . . . . . . . . . . . . . . . . 45 | ||||
| B.2. Since draft-ietf-httpbis-p6-cache-00 . . . . . . . . . . . 45 | ||||
| Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 | ||||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 48 | ||||
| Intellectual Property and Copyright Statements . . . . . . . . . . 52 | ||||
| 1. Introduction | 1. Introduction | |||
| This document will define aspects of HTTP related to caching response | HTTP is typically used for distributed information systems, where | |||
| messages. Right now it only includes the extracted relevant sections | performance can be improved by the use of response caches, and | |||
| of RFC 2616 [RFC2616] without edit. | includes a number of elements intended to make caching work as well | |||
| as possible. Because these elements interact with each other, it is | ||||
| useful to describe the caching design of HTTP separately. This | ||||
| document defines aspects of HTTP/1.1 related to caching and reusing | ||||
| response messages. | ||||
| 1.1. Terminology | 1.1. Purpose | |||
| This specification uses a number of terms to refer to the roles | An HTTP cache is a local store of response messages and the subsystem | |||
| played by participants in, and objects of, the HTTP communication. | that controls its message storage, retrieval, and deletion. A cache | |||
| stores cacheable responses in order to reduce the response time and | ||||
| network bandwidth consumption on future, equivalent requests. Any | ||||
| client or server may include a cache, though a cache cannot be used | ||||
| by a server that is acting as a tunnel. | ||||
| cache | Caching would be useless if it did not significantly improve | |||
| performance. The goal of caching in HTTP/1.1 is to eliminate the | ||||
| need to send requests in many cases, and to eliminate the need to | ||||
| send full responses in many other cases. The former reduces the | ||||
| number of network round-trips required for many operations; we use an | ||||
| "expiration" mechanism for this purpose (see Section 3). The latter | ||||
| reduces network bandwidth requirements; we use a "validation" | ||||
| mechanism for this purpose (see Section 4). | ||||
| A program's local store of response messages and the subsystem | A cache behaves in a "semantically transparent" manner, with respect | |||
| that controls its message storage, retrieval, and deletion. A | to a particular response, when its use affects neither the requesting | |||
| cache stores cacheable responses in order to reduce the response | client nor the origin server, except to improve performance. When a | |||
| time and network bandwidth consumption on future, equivalent | cache is semantically transparent, the client receives exactly the | |||
| requests. Any client or server may include a cache, though a | same response (except for hop-by-hop headers) that it would have | |||
| cache cannot be used by a server that is acting as a tunnel. | received had its request been handled directly by the origin server. | |||
| In an ideal world, all interactions with an HTTP cache would be | ||||
| semantically transparent. However, for some resources, semantic | ||||
| transparency is not always necessary and can be effectively traded | ||||
| for the sake of bandwidth scaling, disconnected operation, and high | ||||
| availability. HTTP/1.1 allows origin servers, caches, and clients to | ||||
| explicitly reduce transparency when necessary. However, because non- | ||||
| transparent operation may confuse non-expert users and might be | ||||
| incompatible with certain server applications (such as those for | ||||
| ordering merchandise), the protocol requires that transparency be | ||||
| relaxed | ||||
| o only by an explicit protocol-level request when relaxed by client | ||||
| or origin server | ||||
| o only with an explicit warning to the end user when relaxed by | ||||
| cache or client | ||||
| Therefore, HTTP/1.1 provides these important elements: | ||||
| 1. Protocol features that provide full semantic transparency when | ||||
| this is required by all parties. | ||||
| 2. Protocol features that allow an origin server or user agent to | ||||
| explicitly request and control non-transparent operation. | ||||
| 3. Protocol features that allow a cache to attach warnings to | ||||
| responses that do not preserve the requested approximation of | ||||
| semantic transparency. | ||||
| A basic principle is that it must be possible for the clients to | ||||
| detect any potential relaxation of semantic transparency. | ||||
| Note: The server, cache, or client implementor might be faced with | ||||
| design decisions not explicitly discussed in this specification. | ||||
| If a decision might affect semantic transparency, the implementor | ||||
| ought to err on the side of maintaining transparency unless a | ||||
| careful and complete analysis shows significant benefits in | ||||
| breaking transparency. | ||||
| 1.2. Terminology | ||||
| This specification uses a number of terms to refer to the roles | ||||
| played by participants in, and objects of, HTTP caching. | ||||
| cacheable | cacheable | |||
| A response is cacheable if a cache is allowed to store a copy of | A response is cacheable if a cache is allowed to store a copy of | |||
| the response message for use in answering subsequent requests. | the response message for use in answering subsequent requests. | |||
| The rules for determining the cacheability of HTTP responses are | Even if a resource is cacheable, there may be additional | |||
| defined in Section 2. Even if a resource is cacheable, there may | constraints on whether a cache can use the cached copy for a | |||
| be additional constraints on whether a cache can use the cached | particular request. | |||
| copy for a particular request. | ||||
| first-hand | first-hand | |||
| A response is first-hand if it comes directly and without | A response is first-hand if it comes directly and without | |||
| unnecessary delay from the origin server, perhaps via one or more | unnecessary delay from the origin server, perhaps via one or more | |||
| proxies. A response is also first-hand if its validity has just | proxies. A response is also first-hand if its validity has just | |||
| been checked directly with the origin server. | been checked directly with the origin server. | |||
| explicit expiration time | explicit expiration time | |||
| The time at which the origin server intends that an entity should | The time at which the origin server intends that an entity should | |||
| no longer be returned by a cache without further validation. | no longer be returned by a cache without further validation. | |||
| heuristic expiration time | heuristic expiration time | |||
| An expiration time assigned by a cache when no explicit expiration | An expiration time assigned by a cache when no explicit expiration | |||
| time is available. | time is available. | |||
| age | age | |||
| The age of a response is the time since it was sent by, or | The age of a response is the time since it was sent by, or | |||
| successfully validated with, the origin server. | successfully validated with, the origin server. | |||
| freshness lifetime | freshness lifetime | |||
| The length of time between the generation of a response and its | The length of time between the generation of a response and its | |||
| expiration time. | expiration time. | |||
| fresh | fresh | |||
| skipping to change at page 6, line 21 | skipping to change at page 7, line 31 | |||
| fresh | fresh | |||
| A response is fresh if its age has not yet exceeded its freshness | A response is fresh if its age has not yet exceeded its freshness | |||
| lifetime. | lifetime. | |||
| stale | stale | |||
| A response is stale if its age has passed its freshness lifetime. | A response is stale if its age has passed its freshness lifetime. | |||
| semantically transparent | ||||
| A cache behaves in a "semantically transparent" manner, with | ||||
| respect to a particular response, when its use affects neither the | ||||
| requesting client nor the origin server, except to improve | ||||
| performance. When a cache is semantically transparent, the client | ||||
| receives exactly the same response (except for hop-by-hop headers) | ||||
| that it would have received had its request been handled directly | ||||
| by the origin server. | ||||
| validator | validator | |||
| A protocol element (e.g., an entity tag or a Last-Modified time) | A protocol element (e.g., an entity tag or a Last-Modified time) | |||
| that is used to find out whether a cache entry is an equivalent | that is used to find out whether a cache entry is an equivalent | |||
| copy of an entity. | copy of an entity. | |||
| 1.2. Delta Seconds | 1.3. Requirements | |||
| Some HTTP header fields allow a time value to be specified as an | ||||
| integer number of seconds, represented in decimal, after the time | ||||
| that the message was received. | ||||
| delta-seconds = 1*DIGIT | ||||
| 2. Caching in HTTP | ||||
| 2.1. Overview | ||||
| HTTP is typically used for distributed information systems, where | ||||
| performance can be improved by the use of response caches. The | ||||
| HTTP/1.1 protocol includes a number of elements intended to make | ||||
| caching work as well as possible. Because these elements are | ||||
| inextricable from other aspects of the protocol, and because they | ||||
| interact with each other, it is useful to describe the basic caching | ||||
| design of HTTP separately from the detailed descriptions of methods, | ||||
| headers, response codes, etc. | ||||
| Caching would be useless if it did not significantly improve | ||||
| performance. The goal of caching in HTTP/1.1 is to eliminate the | ||||
| need to send requests in many cases, and to eliminate the need to | ||||
| send full responses in many other cases. The former reduces the | ||||
| number of network round-trips required for many operations; we use an | ||||
| "expiration" mechanism for this purpose (see Section 2.2). The | ||||
| latter reduces network bandwidth requirements; we use a "validation" | ||||
| mechanism for this purpose (see Section 2.3). | ||||
| Requirements for performance, availability, and disconnected | ||||
| operation require us to be able to relax the goal of semantic | ||||
| transparency. The HTTP/1.1 protocol allows origin servers, caches, | ||||
| and clients to explicitly reduce transparency when necessary. | ||||
| However, because non-transparent operation may confuse non-expert | ||||
| users, and might be incompatible with certain server applications | ||||
| (such as those for ordering merchandise), the protocol requires that | ||||
| transparency be relaxed | ||||
| o only by an explicit protocol-level request when relaxed by client | ||||
| or origin server | ||||
| o only with an explicit warning to the end user when relaxed by | ||||
| cache or client | ||||
| Therefore, the HTTP/1.1 protocol provides these important elements: | ||||
| 1. Protocol features that provide full semantic transparency when | ||||
| this is required by all parties. | ||||
| 2. Protocol features that allow an origin server or user agent to | ||||
| explicitly request and control non-transparent operation. | ||||
| 3. Protocol features that allow a cache to attach warnings to | ||||
| responses that do not preserve the requested approximation of | ||||
| semantic transparency. | ||||
| A basic principle is that it must be possible for the clients to | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |||
| detect any potential relaxation of semantic transparency. | "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this | |||
| document are to be interpreted as described in [RFC2119]. | ||||
| Note: The server, cache, or client implementor might be faced with | An implementation is not compliant if it fails to satisfy one or more | |||
| design decisions not explicitly discussed in this specification. | of the MUST or REQUIRED level requirements for the protocols it | |||
| implements. An implementation that satisfies all the MUST or | ||||
| REQUIRED level and all the SHOULD level requirements for its | ||||
| protocols is said to be "unconditionally compliant"; one that | ||||
| satisfies all the MUST level requirements but not all the SHOULD | ||||
| level requirements for its protocols is said to be "conditionally | ||||
| compliant." | ||||
| If a decision might affect semantic transparency, the implementor | 2. Overview | |||
| ought to err on the side of maintaining transparency unless a | ||||
| careful and complete analysis shows significant benefits in | ||||
| breaking transparency. | ||||
| 2.1.1. Cache Correctness | 2.1. Cache Correctness | |||
| A correct cache MUST respond to a request with the most up-to-date | A correct cache MUST respond to a request with the most up-to-date | |||
| response held by the cache that is appropriate to the request (see | response held by the cache that is appropriate to the request (see | |||
| sections 2.2.5, 2.2.6, and 2.12) which meets one of the following | Sections 3.5, 3.6, and 13) which meets one of the following | |||
| conditions: | conditions: | |||
| 1. It has been checked for equivalence with what the origin server | 1. It has been checked for equivalence with what the origin server | |||
| would have returned by revalidating the response with the origin | would have returned by revalidating the response with the origin | |||
| server (Section 2.3); | server (Section 4); | |||
| 2. It is "fresh enough" (see Section 2.2). In the default case, | 2. It is "fresh enough" (see Section 3). In the default case, this | |||
| this means it meets the least restrictive freshness requirement | means it meets the least restrictive freshness requirement of the | |||
| of the client, origin server, and cache (see Section 3.2); if the | client, origin server, and cache (see Section 15.2); if the | |||
| origin server so specifies, it is the freshness requirement of | origin server so specifies, it is the freshness requirement of | |||
| the origin server alone. If a stored response is not "fresh | the origin server alone. If a stored response is not "fresh | |||
| enough" by the most restrictive freshness requirement of both the | enough" by the most restrictive freshness requirement of both the | |||
| client and the origin server, in carefully considered | client and the origin server, in carefully considered | |||
| circumstances the cache MAY still return the response with the | circumstances the cache MAY still return the response with the | |||
| appropriate Warning header (see section 2.1.5 and 3.6), unless | appropriate Warning header (see Sections 2.5 and 15.6), unless | |||
| such a response is prohibited (e.g., by a "no-store" cache- | such a response is prohibited (e.g., by a "no-store" cache- | |||
| directive, or by a "no-cache" cache-request-directive; see | directive, or by a "no-cache" cache-request-directive; see | |||
| Section 3.2). | Section 15.2). | |||
| 3. It is an appropriate 304 (Not Modified), 305 (Proxy Redirect), or | 3. It is an appropriate 304 (Not Modified), 305 (Use Proxy), or | |||
| error (4xx or 5xx) response message. | error (4xx or 5xx) response message. | |||
| If the cache can not communicate with the origin server, then a | If the cache can not communicate with the origin server, then a | |||
| correct cache SHOULD respond as above if the response can be | correct cache SHOULD respond as above if the response can be | |||
| correctly served from the cache; if not it MUST return an error or | correctly served from the cache; if not it MUST return an error or | |||
| warning indicating that there was a communication failure. | warning indicating that there was a communication failure. | |||
| If a cache receives a response (either an entire response, or a 304 | If a cache receives a response (either an entire response, or a 304 | |||
| (Not Modified) response) that it would normally forward to the | (Not Modified) response) that it would normally forward to the | |||
| requesting client, and the received response is no longer fresh, the | requesting client, and the received response is no longer fresh, the | |||
| cache SHOULD forward it to the requesting client without adding a new | cache SHOULD forward it to the requesting client without adding a new | |||
| Warning (but without removing any existing Warning headers). A cache | Warning (but without removing any existing Warning headers). A cache | |||
| SHOULD NOT attempt to revalidate a response simply because that | SHOULD NOT attempt to revalidate a response simply because that | |||
| response became stale in transit; this might lead to an infinite | response became stale in transit; this might lead to an infinite | |||
| loop. A user agent that receives a stale response without a Warning | loop. A user agent that receives a stale response without a Warning | |||
| MAY display a warning indication to the user. | MAY display a warning indication to the user. | |||
| 2.1.2. Warnings | 2.2. Warnings | |||
| Whenever a cache returns a response that is neither first-hand nor | Whenever a cache returns a response that is neither first-hand nor | |||
| "fresh enough" (in the sense of condition 2 in Section 2.1.1), it | "fresh enough" (in the sense of condition 2 in Section 2.1), it MUST | |||
| MUST attach a warning to that effect, using a Warning general-header. | attach a warning to that effect, using a Warning general-header. The | |||
| The Warning header and the currently defined warnings are described | Warning header and the currently defined warnings are described in | |||
| in Section 3.6. The warning allows clients to take appropriate | Section 15.6. The warning allows clients to take appropriate action. | |||
| action. | ||||
| Warnings MAY be used for other purposes, both cache-related and | Warnings MAY be used for other purposes, both cache-related and | |||
| otherwise. The use of a warning, rather than an error status code, | otherwise. The use of a warning, rather than an error status code, | |||
| distinguish these responses from true failures. | distinguish these responses from true failures. | |||
| Warnings are assigned three digit warn-codes. The first digit | Warnings are assigned three digit warn-codes. The first digit | |||
| indicates whether the Warning MUST or MUST NOT be deleted from a | indicates whether the Warning MUST or MUST NOT be deleted from a | |||
| stored cache entry after a successful revalidation: | stored cache entry after a successful revalidation: | |||
| 1xx Warnings that describe the freshness or revalidation status of | 1xx Warnings that describe the freshness or revalidation status of | |||
| the response, and so MUST be deleted after a successful | the response, and so MUST be deleted after a successful | |||
| revalidation. 1XX warn-codes MAY be generated by a cache only when | revalidation. 1xx warn-codes MAY be generated by a cache only when | |||
| validating a cached entry. It MUST NOT be generated by clients. | validating a cached entry. It MUST NOT be generated by clients. | |||
| 2xx Warnings that describe some aspect of the entity body or entity | 2xx Warnings that describe some aspect of the entity body or entity | |||
| headers that is not rectified by a revalidation (for example, a | headers that is not rectified by a revalidation (for example, a | |||
| lossy compression of the entity bodies) and which MUST NOT be | lossy compression of the entity bodies) and which MUST NOT be | |||
| deleted after a successful revalidation. | deleted after a successful revalidation. | |||
| See Section 3.6 for the definitions of the codes themselves. | See Section 15.6 for the definitions of the codes themselves. | |||
| HTTP/1.0 caches will cache all Warnings in responses, without | HTTP/1.0 caches will cache all Warnings in responses, without | |||
| deleting the ones in the first category. Warnings in responses that | deleting the ones in the first category. Warnings in responses that | |||
| are passed to HTTP/1.0 caches carry an extra warning-date field, | are passed to HTTP/1.0 caches carry an extra warning-date field, | |||
| which prevents a future HTTP/1.1 recipient from believing an | which prevents a future HTTP/1.1 recipient from believing an | |||
| erroneously cached Warning. | erroneously cached Warning. | |||
| Warnings also carry a warning text. The text MAY be in any | Warnings also carry a warning text. The text MAY be in any | |||
| appropriate natural language (perhaps based on the client's Accept | appropriate natural language (perhaps based on the client's Accept | |||
| headers), and include an OPTIONAL indication of what character set is | headers), and include an OPTIONAL indication of what character set is | |||
| skipping to change at page 10, line 7 | skipping to change at page 10, line 5 | |||
| server or by a cache), including multiple warnings with the same code | server or by a cache), including multiple warnings with the same code | |||
| number. For example, a server might provide the same warning with | number. For example, a server might provide the same warning with | |||
| texts in both English and Basque. | texts in both English and Basque. | |||
| When multiple warnings are attached to a response, it might not be | When multiple warnings are attached to a response, it might not be | |||
| practical or reasonable to display all of them to the user. This | practical or reasonable to display all of them to the user. This | |||
| version of HTTP does not specify strict priority rules for deciding | version of HTTP does not specify strict priority rules for deciding | |||
| which warnings to display and in what order, but does suggest some | which warnings to display and in what order, but does suggest some | |||
| heuristics. | heuristics. | |||
| 2.1.3. Cache-control Mechanisms | 2.3. Cache-control Mechanisms | |||
| The basic cache mechanisms in HTTP/1.1 (server-specified expiration | The basic cache mechanisms in HTTP/1.1 (server-specified expiration | |||
| times and validators) are implicit directives to caches. In some | times and validators) are implicit directives to caches. In some | |||
| cases, a server or client might need to provide explicit directives | cases, a server or client might need to provide explicit directives | |||
| to the HTTP caches. We use the Cache-Control header for this | to the HTTP caches. We use the Cache-Control header for this | |||
| purpose. | purpose. | |||
| The Cache-Control header allows a client or server to transmit a | The Cache-Control header allows a client or server to transmit a | |||
| variety of directives in either requests or responses. These | variety of directives in either requests or responses. These | |||
| directives typically override the default caching algorithms. As a | directives typically override the default caching algorithms. As a | |||
| general rule, if there is any apparent conflict between header | general rule, if there is any apparent conflict between header | |||
| values, the most restrictive interpretation is applied (that is, the | values, the most restrictive interpretation is applied (that is, the | |||
| one that is most likely to preserve semantic transparency). However, | one that is most likely to preserve semantic transparency). However, | |||
| in some cases, cache-control directives are explicitly specified as | in some cases, cache-control directives are explicitly specified as | |||
| weakening the approximation of semantic transparency (for example, | weakening the approximation of semantic transparency (for example, | |||
| "max-stale" or "public"). | "max-stale" or "public"). | |||
| The cache-control directives are described in detail in Section 3.2. | The cache-control directives are described in detail in Section 15.2. | |||
| 2.1.4. Explicit User Agent Warnings | 2.4. Explicit User Agent Warnings | |||
| Many user agents make it possible for users to override the basic | Many user agents make it possible for users to override the basic | |||
| caching mechanisms. For example, the user agent might allow the user | caching mechanisms. For example, the user agent might allow the user | |||
| to specify that cached entities (even explicitly stale ones) are | to specify that cached entities (even explicitly stale ones) are | |||
| never validated. Or the user agent might habitually add "Cache- | never validated. Or the user agent might habitually add "Cache- | |||
| Control: max-stale=3600" to every request. The user agent SHOULD NOT | Control: max-stale=3600" to every request. The user agent SHOULD NOT | |||
| default to either non-transparent behavior, or behavior that results | default to either non-transparent behavior, or behavior that results | |||
| in abnormally ineffective caching, but MAY be explicitly configured | in abnormally ineffective caching, but MAY be explicitly configured | |||
| to do so by an explicit action of the user. | to do so by an explicit action of the user. | |||
| skipping to change at page 11, line 7 | skipping to change at page 11, line 5 | |||
| need not be a dialog box; it could be an icon (for example, a picture | need not be a dialog box; it could be an icon (for example, a picture | |||
| of a rotting fish) or some other indicator. | of a rotting fish) or some other indicator. | |||
| If the user has overridden the caching mechanisms in a way that would | If the user has overridden the caching mechanisms in a way that would | |||
| abnormally reduce the effectiveness of caches, the user agent SHOULD | abnormally reduce the effectiveness of caches, the user agent SHOULD | |||
| continually indicate this state to the user (for example, by a | continually indicate this state to the user (for example, by a | |||
| display of a picture of currency in flames) so that the user does not | display of a picture of currency in flames) so that the user does not | |||
| inadvertently consume excess resources or suffer from excessive | inadvertently consume excess resources or suffer from excessive | |||
| latency. | latency. | |||
| 2.1.5. Exceptions to the Rules and Warnings | 2.5. Exceptions to the Rules and Warnings | |||
| In some cases, the operator of a cache MAY choose to configure it to | In some cases, the operator of a cache MAY choose to configure it to | |||
| return stale responses even when not requested by clients. This | return stale responses even when not requested by clients. This | |||
| decision ought not be made lightly, but may be necessary for reasons | decision ought not be made lightly, but may be necessary for reasons | |||
| of availability or performance, especially when the cache is poorly | of availability or performance, especially when the cache is poorly | |||
| connected to the origin server. Whenever a cache returns a stale | connected to the origin server. Whenever a cache returns a stale | |||
| response, it MUST mark it as such (using a Warning header) enabling | response, it MUST mark it as such (using a Warning header) enabling | |||
| the client software to alert the user that there might be a potential | the client software to alert the user that there might be a potential | |||
| problem. | problem. | |||
| It also allows the user agent to take steps to obtain a first-hand or | It also allows the user agent to take steps to obtain a first-hand or | |||
| fresh response. For this reason, a cache SHOULD NOT return a stale | fresh response. For this reason, a cache SHOULD NOT return a stale | |||
| response if the client explicitly requests a first-hand or fresh one, | response if the client explicitly requests a first-hand or fresh one, | |||
| unless it is impossible to comply for technical or policy reasons. | unless it is impossible to comply for technical or policy reasons. | |||
| 2.1.6. Client-controlled Behavior | 2.6. Client-controlled Behavior | |||
| While the origin server (and to a lesser extent, intermediate caches, | While the origin server (and to a lesser extent, intermediate caches, | |||
| by their contribution to the age of a response) are the primary | by their contribution to the age of a response) are the primary | |||
| source of expiration information, in some cases the client might need | source of expiration information, in some cases the client might need | |||
| to control a cache's decision about whether to return a cached | to control a cache's decision about whether to return a cached | |||
| response without validating it. Clients do this using several | response without validating it. Clients do this using several | |||
| directives of the Cache-Control header. | directives of the Cache-Control header. | |||
| A client's request MAY specify the maximum age it is willing to | A client's request MAY specify the maximum age it is willing to | |||
| accept of an unvalidated response; specifying a value of zero forces | accept of an unvalidated response; specifying a value of zero forces | |||
| skipping to change at page 11, line 46 | skipping to change at page 11, line 44 | |||
| options increase constraints on the behavior of caches, and so cannot | options increase constraints on the behavior of caches, and so cannot | |||
| further relax the cache's approximation of semantic transparency. | further relax the cache's approximation of semantic transparency. | |||
| A client MAY also specify that it will accept stale responses, up to | A client MAY also specify that it will accept stale responses, up to | |||
| some maximum amount of staleness. This loosens the constraints on | some maximum amount of staleness. This loosens the constraints on | |||
| the caches, and so might violate the origin server's specified | the caches, and so might violate the origin server's specified | |||
| constraints on semantic transparency, but might be necessary to | constraints on semantic transparency, but might be necessary to | |||
| support disconnected operation, or high availability in the face of | support disconnected operation, or high availability in the face of | |||
| poor connectivity. | poor connectivity. | |||
| 2.2. Expiration Model | 3. Expiration Model | |||
| 2.2.1. Server-Specified Expiration | 3.1. Server-Specified Expiration | |||
| HTTP caching works best when caches can entirely avoid making | HTTP caching works best when caches can entirely avoid making | |||
| requests to the origin server. The primary mechanism for avoiding | requests to the origin server. The primary mechanism for avoiding | |||
| requests is for an origin server to provide an explicit expiration | requests is for an origin server to provide an explicit expiration | |||
| time in the future, indicating that a response MAY be used to satisfy | time in the future, indicating that a response MAY be used to satisfy | |||
| subsequent requests. In other words, a cache can return a fresh | subsequent requests. In other words, a cache can return a fresh | |||
| response without first contacting the server. | response without first contacting the server. | |||
| Our expectation is that servers will assign future explicit | Our expectation is that servers will assign future explicit | |||
| expiration times to responses in the belief that the entity is not | expiration times to responses in the belief that the entity is not | |||
| skipping to change at page 12, line 24 | skipping to change at page 12, line 22 | |||
| chosen. | chosen. | |||
| The expiration mechanism applies only to responses taken from a cache | The expiration mechanism applies only to responses taken from a cache | |||
| and not to first-hand responses forwarded immediately to the | and not to first-hand responses forwarded immediately to the | |||
| requesting client. | requesting client. | |||
| If an origin server wishes to force a semantically transparent cache | If an origin server wishes to force a semantically transparent cache | |||
| to validate every request, it MAY assign an explicit expiration time | to validate every request, it MAY assign an explicit expiration time | |||
| in the past. This means that the response is always stale, and so | in the past. This means that the response is always stale, and so | |||
| the cache SHOULD validate it before using it for subsequent requests. | the cache SHOULD validate it before using it for subsequent requests. | |||
| See Section 3.2.4 for a more restrictive way to force revalidation. | See Section 15.2.4 for a more restrictive way to force revalidation. | |||
| If an origin server wishes to force any HTTP/1.1 cache, no matter how | If an origin server wishes to force any HTTP/1.1 cache, no matter how | |||
| it is configured, to validate every request, it SHOULD use the "must- | it is configured, to validate every request, it SHOULD use the "must- | |||
| revalidate" cache-control directive (see Section 3.2). | revalidate" cache-control directive (see Section 15.2). | |||
| Servers specify explicit expiration times using either the Expires | Servers specify explicit expiration times using either the Expires | |||
| header, or the max-age directive of the Cache-Control header. | header, or the max-age directive of the Cache-Control header. | |||
| An expiration time cannot be used to force a user agent to refresh | An expiration time cannot be used to force a user agent to refresh | |||
| its display or reload a resource; its semantics apply only to caching | its display or reload a resource; its semantics apply only to caching | |||
| mechanisms, and such mechanisms need only check a resource's | mechanisms, and such mechanisms need only check a resource's | |||
| expiration status when a new request for that resource is initiated. | expiration status when a new request for that resource is initiated. | |||
| See Section 2.13 for an explanation of the difference between caches | See Section 14 for an explanation of the difference between caches | |||
| and history mechanisms. | and history mechanisms. | |||
| 2.2.2. Heuristic Expiration | 3.2. Heuristic Expiration | |||
| Since origin servers do not always provide explicit expiration times, | Since origin servers do not always provide explicit expiration times, | |||
| HTTP caches typically assign heuristic expiration times, employing | HTTP caches typically assign heuristic expiration times, employing | |||
| algorithms that use other header values (such as the Last-Modified | algorithms that use other header values (such as the Last-Modified | |||
| time) to estimate a plausible expiration time. The HTTP/1.1 | time) to estimate a plausible expiration time. The HTTP/1.1 | |||
| specification does not provide specific algorithms, but does impose | specification does not provide specific algorithms, but does impose | |||
| worst-case constraints on their results. Since heuristic expiration | worst-case constraints on their results. Since heuristic expiration | |||
| times might compromise semantic transparency, they ought to used | times might compromise semantic transparency, they ought to be used | |||
| cautiously, and we encourage origin servers to provide explicit | cautiously, and we encourage origin servers to provide explicit | |||
| expiration times as much as possible. | expiration times as much as possible. | |||
| 2.2.3. Age Calculations | 3.3. Age Calculations | |||
| In order to know if a cached entry is fresh, a cache needs to know if | In order to know if a cached entry is fresh, a cache needs to know if | |||
| its age exceeds its freshness lifetime. We discuss how to calculate | its age exceeds its freshness lifetime. We discuss how to calculate | |||
| the latter in Section 2.2.4; this section describes how to calculate | the latter in Section 3.4; this section describes how to calculate | |||
| the age of a response or cache entry. | the age of a response or cache entry. | |||
| In this discussion, we use the term "now" to mean "the current value | In this discussion, we use the term "now" to mean "the current value | |||
| of the clock at the host performing the calculation." Hosts that use | of the clock at the host performing the calculation." Hosts that use | |||
| HTTP, but especially hosts running origin servers and caches, SHOULD | HTTP, but especially hosts running origin servers and caches, SHOULD | |||
| use NTP [RFC1305] or some similar protocol to synchronize their | use NTP [RFC1305] or some similar protocol to synchronize their | |||
| clocks to a globally accurate time standard. | clocks to a globally accurate time standard. | |||
| HTTP/1.1 requires origin servers to send a Date header, if possible, | HTTP/1.1 requires origin servers to send a Date header, if possible, | |||
| with every response, giving the time at which the response was | with every response, giving the time at which the response was | |||
| skipping to change at page 15, line 16 | skipping to change at page 15, line 16 | |||
| header field in the response with a value equal to the cache entry's | header field in the response with a value equal to the cache entry's | |||
| current_age. | current_age. | |||
| The presence of an Age header field in a response implies that a | The presence of an Age header field in a response implies that a | |||
| response is not first-hand. However, the converse is not true, since | response is not first-hand. However, the converse is not true, since | |||
| the lack of an Age header field in a response does not imply that the | the lack of an Age header field in a response does not imply that the | |||
| response is first-hand unless all caches along the request path are | response is first-hand unless all caches along the request path are | |||
| compliant with HTTP/1.1 (i.e., older HTTP caches did not implement | compliant with HTTP/1.1 (i.e., older HTTP caches did not implement | |||
| the Age header field). | the Age header field). | |||
| 2.2.4. Expiration Calculations | 3.4. Expiration Calculations | |||
| In order to decide whether a response is fresh or stale, we need to | In order to decide whether a response is fresh or stale, we need to | |||
| compare its freshness lifetime to its age. The age is calculated as | compare its freshness lifetime to its age. The age is calculated as | |||
| described in Section 2.2.3; this section describes how to calculate | described in Section 3.3; this section describes how to calculate the | |||
| the freshness lifetime, and to determine if a response has expired. | freshness lifetime, and to determine if a response has expired. In | |||
| In the discussion below, the values can be represented in any form | the discussion below, the values can be represented in any form | |||
| appropriate for arithmetic operations. | appropriate for arithmetic operations. | |||
| We use the term "expires_value" to denote the value of the Expires | We use the term "expires_value" to denote the value of the Expires | |||
| header. We use the term "max_age_value" to denote an appropriate | header. We use the term "max_age_value" to denote an appropriate | |||
| value of the number of seconds carried by the "max-age" directive of | value of the number of seconds carried by the "max-age" directive of | |||
| the Cache-Control header in a response (see Section 3.2.3). | the Cache-Control header in a response (see Section 15.2.3). | |||
| The max-age directive takes priority over Expires, so if max-age is | The max-age directive takes priority over Expires, so if max-age is | |||
| present in a response, the calculation is simply: | present in a response, the calculation is simply: | |||
| freshness_lifetime = max_age_value | freshness_lifetime = max_age_value | |||
| Otherwise, if Expires is present in the response, the calculation is: | Otherwise, if Expires is present in the response, the calculation is: | |||
| freshness_lifetime = expires_value - date_value | freshness_lifetime = expires_value - date_value | |||
| Note that neither of these calculations is vulnerable to clock skew, | Note that neither of these calculations is vulnerable to clock skew, | |||
| since all of the information comes from the origin server. | since all of the information comes from the origin server. | |||
| If none of Expires, Cache-Control: max-age, or Cache-Control: | If none of Expires, Cache-Control: max-age, or Cache-Control: | |||
| s-maxage (see Section 3.2.3) appears in the response, and the | s-maxage (see Section 15.2.3) appears in the response, and the | |||
| response does not include other restrictions on caching, the cache | response does not include other restrictions on caching, the cache | |||
| MAY compute a freshness lifetime using a heuristic. The cache MUST | MAY compute a freshness lifetime using a heuristic. The cache MUST | |||
| attach Warning 113 to any response whose age is more than 24 hours if | attach Warning 113 to any response whose age is more than 24 hours if | |||
| such warning has not already been added. | such warning has not already been added. | |||
| Also, if the response does have a Last-Modified time, the heuristic | Also, if the response does have a Last-Modified time, the heuristic | |||
| expiration value SHOULD be no more than some fraction of the interval | expiration value SHOULD be no more than some fraction of the interval | |||
| since that time. A typical setting of this fraction might be 10%. | since that time. A typical setting of this fraction might be 10%. | |||
| The calculation to determine if a response has expired is quite | The calculation to determine if a response has expired is quite | |||
| simple: | simple: | |||
| response_is_fresh = (freshness_lifetime > current_age) | response_is_fresh = (freshness_lifetime > current_age) | |||
| 2.2.5. Disambiguating Expiration Values | 3.5. Disambiguating Expiration Values | |||
| Because expiration values are assigned optimistically, it is possible | Because expiration values are assigned optimistically, it is possible | |||
| for two caches to contain fresh values for the same resource that are | for two caches to contain fresh values for the same resource that are | |||
| different. | different. | |||
| If a client performing a retrieval receives a non-first-hand response | If a client performing a retrieval receives a non-first-hand response | |||
| for a request that was already fresh in its own cache, and the Date | for a request that was already fresh in its own cache, and the Date | |||
| header in its existing cache entry is newer than the Date on the new | header in its existing cache entry is newer than the Date on the new | |||
| response, then the client MAY ignore the response. If so, it MAY | response, then the client MAY ignore the response. If so, it MAY | |||
| retry the request with a "Cache-Control: max-age=0" directive (see | retry the request with a "Cache-Control: max-age=0" directive (see | |||
| Section 3.2), to force a check with the origin server. | Section 15.2), to force a check with the origin server. | |||
| If a cache has two fresh responses for the same representation with | If a cache has two fresh responses for the same representation with | |||
| different validators, it MUST use the one with the more recent Date | different validators, it MUST use the one with the more recent Date | |||
| header. This situation might arise because the cache is pooling | header. This situation might arise because the cache is pooling | |||
| responses from other caches, or because a client has asked for a | responses from other caches, or because a client has asked for a | |||
| reload or a revalidation of an apparently fresh cache entry. | reload or a revalidation of an apparently fresh cache entry. | |||
| 2.2.6. Disambiguating Multiple Responses | 3.6. Disambiguating Multiple Responses | |||
| Because a client might be receiving responses via multiple paths, so | Because a client might be receiving responses via multiple paths, so | |||
| that some responses flow through one set of caches and other | that some responses flow through one set of caches and other | |||
| responses flow through a different set of caches, a client might | responses flow through a different set of caches, a client might | |||
| receive responses in an order different from that in which the origin | receive responses in an order different from that in which the origin | |||
| server sent them. We would like the client to use the most recently | server sent them. We would like the client to use the most recently | |||
| generated response, even if older responses are still apparently | generated response, even if older responses are still apparently | |||
| fresh. | fresh. | |||
| Neither the entity tag nor the expiration value can impose an | Neither the entity tag nor the expiration value can impose an | |||
| skipping to change at page 17, line 15 | skipping to change at page 17, line 15 | |||
| to force any intermediate caches to obtain a new copy from the origin | to force any intermediate caches to obtain a new copy from the origin | |||
| server. | server. | |||
| If the Date values are equal, then the client MAY use either response | If the Date values are equal, then the client MAY use either response | |||
| (or MAY, if it is being extremely prudent, request a new response). | (or MAY, if it is being extremely prudent, request a new response). | |||
| Servers MUST NOT depend on clients being able to choose | Servers MUST NOT depend on clients being able to choose | |||
| deterministically between responses generated during the same second, | deterministically between responses generated during the same second, | |||
| if their expiration times overlap. | if their expiration times overlap. | |||
| 2.3. Validation Model | 4. Validation Model | |||
| When a cache has a stale entry that it would like to use as a | When a cache has a stale entry that it would like to use as a | |||
| response to a client's request, it first has to check with the origin | response to a client's request, it first has to check with the origin | |||
| server (or possibly an intermediate cache with a fresh response) to | server (or possibly an intermediate cache with a fresh response) to | |||
| see if its cached entry is still usable. We call this "validating" | see if its cached entry is still usable. We call this "validating" | |||
| the cache entry. Since we do not want to have to pay the overhead of | the cache entry. Since we do not want to have to pay the overhead of | |||
| retransmitting the full response if the cached entry is good, and we | retransmitting the full response if the cached entry is good, and we | |||
| do not want to pay the overhead of an extra round trip if the cached | do not want to pay the overhead of an extra round trip if the cached | |||
| entry is invalid, the HTTP/1.1 protocol supports the use of | entry is invalid, the HTTP/1.1 protocol supports the use of | |||
| conditional methods. | conditional methods. | |||
| skipping to change at page 18, line 11 | skipping to change at page 18, line 12 | |||
| validating conditions. That is, it is possible to request either | validating conditions. That is, it is possible to request either | |||
| that a method be performed if and only if a validator matches or if | that a method be performed if and only if a validator matches or if | |||
| and only if no validators match. | and only if no validators match. | |||
| Note: a response that lacks a validator may still be cached, and | Note: a response that lacks a validator may still be cached, and | |||
| served from cache until it expires, unless this is explicitly | served from cache until it expires, unless this is explicitly | |||
| prohibited by a cache-control directive. However, a cache cannot | prohibited by a cache-control directive. However, a cache cannot | |||
| do a conditional retrieval if it does not have a validator for the | do a conditional retrieval if it does not have a validator for the | |||
| entity, which means it will not be refreshable after it expires. | entity, which means it will not be refreshable after it expires. | |||
| 2.3.1. Last-Modified Dates | 4.1. Last-Modified Dates | |||
| The Last-Modified entity-header field value is often used as a cache | The Last-Modified entity-header field value is often used as a cache | |||
| validator. In simple terms, a cache entry is considered to be valid | validator. In simple terms, a cache entry is considered to be valid | |||
| if the entity has not been modified since the Last-Modified value. | if the entity has not been modified since the Last-Modified value. | |||
| 2.3.2. Entity Tag Cache Validators | 4.2. Entity Tag Cache Validators | |||
| The ETag response-header field value, an entity tag, provides for an | The ETag response-header field value, an entity tag, provides for an | |||
| "opaque" cache validator. This might allow more reliable validation | "opaque" cache validator. This might allow more reliable validation | |||
| in situations where it is inconvenient to store modification dates, | in situations where it is inconvenient to store modification dates, | |||
| where the one-second resolution of HTTP date values is not | where the one-second resolution of HTTP date values is not | |||
| sufficient, or where the origin server wishes to avoid certain | sufficient, or where the origin server wishes to avoid certain | |||
| paradoxes that might arise from the use of modification dates. | paradoxes that might arise from the use of modification dates. | |||
| Entity Tags are described in Section 2 of [Part4]. | Entity Tags are described in Section 2 of [Part4]. The headers used | |||
| with entity tags are described in Section 6 of [Part4]. | ||||
| 2.3.3. Non-validating Conditionals | 4.3. Non-validating Conditionals | |||
| The principle behind entity tags is that only the service author | The principle behind entity tags is that only the service author | |||
| knows the semantics of a resource well enough to select an | knows the semantics of a resource well enough to select an | |||
| appropriate cache validation mechanism, and the specification of any | appropriate cache validation mechanism, and the specification of any | |||
| validator comparison function more complex than byte-equality would | validator comparison function more complex than byte-equality would | |||
| open up a can of worms. Thus, comparisons of any other headers | open up a can of worms. Thus, comparisons of any other headers | |||
| (except Last-Modified, for compatibility with HTTP/1.0) are never | (except Last-Modified, for compatibility with HTTP/1.0) are never | |||
| used for purposes of validating a cache entry. | used for purposes of validating a cache entry. | |||
| 2.4. Response Cacheability | 5. Response Cacheability | |||
| Unless specifically constrained by a cache-control (Section 3.2) | Unless specifically constrained by a cache-control (Section 15.2) | |||
| directive, a caching system MAY always store a successful response | directive, a caching system MAY always store a successful response | |||
| (see Section 2.8) as a cache entry, MAY return it without validation | (see Section 9) as a cache entry, MAY return it without validation if | |||
| if it is fresh, and MAY return it after successful validation. If | it is fresh, and MAY return it after successful validation. If there | |||
| there is neither a cache validator nor an explicit expiration time | is neither a cache validator nor an explicit expiration time | |||
| associated with a response, we do not expect it to be cached, but | associated with a response, we do not expect it to be cached, but | |||
| certain caches MAY violate this expectation (for example, when little | certain caches MAY violate this expectation (for example, when little | |||
| or no network connectivity is available). A client can usually | or no network connectivity is available). A client can usually | |||
| detect that such a response was taken from a cache by comparing the | detect that such a response was taken from a cache by comparing the | |||
| Date header to the current time. | Date header to the current time. | |||
| Note: some HTTP/1.0 caches are known to violate this expectation | Note: some HTTP/1.0 caches are known to violate this expectation | |||
| without providing any Warning. | without providing any Warning. | |||
| However, in some cases it might be inappropriate for a cache to | However, in some cases it might be inappropriate for a cache to | |||
| skipping to change at page 19, line 29 | skipping to change at page 19, line 33 | |||
| 410 MAY be stored by a cache and used in reply to a subsequent | 410 MAY be stored by a cache and used in reply to a subsequent | |||
| request, subject to the expiration mechanism, unless a cache-control | request, subject to the expiration mechanism, unless a cache-control | |||
| directive prohibits caching. However, a cache that does not support | directive prohibits caching. However, a cache that does not support | |||
| the Range and Content-Range headers MUST NOT cache 206 (Partial | the Range and Content-Range headers MUST NOT cache 206 (Partial | |||
| Content) responses. | Content) responses. | |||
| A response received with any other status code (e.g. status codes 302 | A response received with any other status code (e.g. status codes 302 | |||
| and 307) MUST NOT be returned in a reply to a subsequent request | and 307) MUST NOT be returned in a reply to a subsequent request | |||
| unless there are cache-control directives or another header(s) that | unless there are cache-control directives or another header(s) that | |||
| explicitly allow it. For example, these include the following: an | explicitly allow it. For example, these include the following: an | |||
| Expires header (Section 3.3); a "max-age", "s-maxage", "must- | Expires header (Section 15.3); a "max-age", "s-maxage", "must- | |||
| revalidate", "proxy-revalidate", "public" or "private" cache-control | revalidate", "proxy-revalidate", "public" or "private" cache-control | |||
| directive (Section 3.2). | directive (Section 15.2). | |||
| 2.5. Constructing Responses From Caches | 6. Constructing Responses From Caches | |||
| The purpose of an HTTP cache is to store information received in | The purpose of an HTTP cache is to store information received in | |||
| response to requests for use in responding to future requests. In | response to requests for use in responding to future requests. In | |||
| many cases, a cache simply returns the appropriate parts of a | many cases, a cache simply returns the appropriate parts of a | |||
| response to the requester. However, if the cache holds a cache entry | response to the requester. However, if the cache holds a cache entry | |||
| based on a previous response, it might have to combine parts of a new | based on a previous response, it might have to combine parts of a new | |||
| response with what is held in the cache entry. | response with what is held in the cache entry. | |||
| 2.5.1. End-to-end and Hop-by-hop Headers | 6.1. End-to-end and Hop-by-hop Headers | |||
| For the purpose of defining the behavior of caches and non-caching | For the purpose of defining the behavior of caches and non-caching | |||
| proxies, we divide HTTP headers into two categories: | proxies, we divide HTTP headers into two categories: | |||
| o End-to-end headers, which are transmitted to the ultimate | o End-to-end headers, which are transmitted to the ultimate | |||
| recipient of a request or response. End-to-end headers in | recipient of a request or response. End-to-end headers in | |||
| responses MUST be stored as part of a cache entry and MUST be | responses MUST be stored as part of a cache entry and MUST be | |||
| transmitted in any response formed from a cache entry. | transmitted in any response formed from a cache entry. | |||
| o Hop-by-hop headers, which are meaningful only for a single | o Hop-by-hop headers, which are meaningful only for a single | |||
| skipping to change at page 20, line 21 | skipping to change at page 20, line 26 | |||
| o Connection | o Connection | |||
| o Keep-Alive | o Keep-Alive | |||
| o Proxy-Authenticate | o Proxy-Authenticate | |||
| o Proxy-Authorization | o Proxy-Authorization | |||
| o TE | o TE | |||
| o Trailers | o Trailer | |||
| o Transfer-Encoding | o Transfer-Encoding | |||
| o Upgrade | o Upgrade | |||
| All other headers defined by HTTP/1.1 are end-to-end headers. | All other headers defined by HTTP/1.1 are end-to-end headers. | |||
| Other hop-by-hop headers MUST be listed in a Connection header, | Other hop-by-hop headers MUST be listed in a Connection header | |||
| (Section 8.1 of [Part1]) to be introduced into HTTP/1.1 (or later). | (Section 8.1 of [Part1]). | |||
| 2.5.2. Non-modifiable Headers | 6.2. Non-modifiable Headers | |||
| Some features of the HTTP/1.1 protocol, such as Digest | Some features of the HTTP/1.1 protocol, such as Digest | |||
| Authentication, depend on the value of certain end-to-end headers. A | Authentication, depend on the value of certain end-to-end headers. A | |||
| transparent proxy SHOULD NOT modify an end-to-end header unless the | transparent proxy SHOULD NOT modify an end-to-end header unless the | |||
| definition of that header requires or specifically allows that. | definition of that header requires or specifically allows that. | |||
| A transparent proxy MUST NOT modify any of the following fields in a | A transparent proxy MUST NOT modify any of the following fields in a | |||
| request or response, and it MUST NOT add any of these fields if not | request or response, and it MUST NOT add any of these fields if not | |||
| already present: | already present: | |||
| skipping to change at page 21, line 24 | skipping to change at page 21, line 30 | |||
| o Content-Encoding | o Content-Encoding | |||
| o Content-Range | o Content-Range | |||
| o Content-Type | o Content-Type | |||
| A non-transparent proxy MAY modify or add these fields to a message | A non-transparent proxy MAY modify or add these fields to a message | |||
| that does not include no-transform, but if it does so, it MUST add a | that does not include no-transform, but if it does so, it MUST add a | |||
| Warning 214 (Transformation applied) if one does not already appear | Warning 214 (Transformation applied) if one does not already appear | |||
| in the message (see Section 3.6). | in the message (see Section 15.6). | |||
| Warning: unnecessary modification of end-to-end headers might | Warning: unnecessary modification of end-to-end headers might | |||
| cause authentication failures if stronger authentication | cause authentication failures if stronger authentication | |||
| mechanisms are introduced in later versions of HTTP. Such | mechanisms are introduced in later versions of HTTP. Such | |||
| authentication mechanisms MAY rely on the values of header fields | authentication mechanisms MAY rely on the values of header fields | |||
| not listed here. | not listed here. | |||
| The Content-Length field of a request or response is added or deleted | The Content-Length field of a request or response is added or deleted | |||
| according to the rules in Section 4.4 of [Part1]. A transparent | according to the rules in Section 4.4 of [Part1]. A transparent | |||
| proxy MUST preserve the entity-length (Section 3.2.2 of [Part3]) of | proxy MUST preserve the entity-length (Section 3.2.2 of [Part3]) of | |||
| the entity-body, although it MAY change the transfer-length (Section | the entity-body, although it MAY change the transfer-length (Section | |||
| 4.4 of [Part1]). | 4.4 of [Part1]). | |||
| 2.5.3. Combining Headers | 6.3. Combining Headers | |||
| When a cache makes a validating request to a server, and the server | When a cache makes a validating request to a server, and the server | |||
| provides a 304 (Not Modified) response or a 206 (Partial Content) | provides a 304 (Not Modified) response or a 206 (Partial Content) | |||
| response, the cache then constructs a response to send to the | response, the cache then constructs a response to send to the | |||
| requesting client. | requesting client. | |||
| If the status code is 304 (Not Modified), the cache uses the entity- | If the status code is 304 (Not Modified), the cache uses the entity- | |||
| body stored in the cache entry as the entity-body of this outgoing | body stored in the cache entry as the entity-body of this outgoing | |||
| response. If the status code is 206 (Partial Content) and the ETag | response. If the status code is 206 (Partial Content) and the ETag | |||
| or Last-Modified headers match exactly, the cache MAY combine the | or Last-Modified headers match exactly, the cache MAY combine the | |||
| contents stored in the cache entry with the new contents received in | contents stored in the cache entry with the new contents received in | |||
| the response and use the result as the entity-body of this outgoing | the response and use the result as the entity-body of this outgoing | |||
| response, (see Section 4 of [Part5]). | response, (see Section 4 of [Part5]). | |||
| The end-to-end headers stored in the cache entry are used for the | The end-to-end headers stored in the cache entry are used for the | |||
| constructed response, except that | constructed response, except that | |||
| o any stored Warning headers with warn-code 1xx (see Section 3.6) | o any stored Warning headers with warn-code 1xx (see Section 15.6) | |||
| MUST be deleted from the cache entry and the forwarded response. | MUST be deleted from the cache entry and the forwarded response. | |||
| o any stored Warning headers with warn-code 2xx MUST be retained in | o any stored Warning headers with warn-code 2xx MUST be retained in | |||
| the cache entry and the forwarded response. | the cache entry and the forwarded response. | |||
| o any end-to-end headers provided in the 304 or 206 response MUST | o any end-to-end headers provided in the 304 or 206 response MUST | |||
| replace the corresponding headers from the cache entry. | replace the corresponding headers from the cache entry. | |||
| Unless the cache decides to remove the cache entry, it MUST also | Unless the cache decides to remove the cache entry, it MUST also | |||
| replace the end-to-end headers stored with the cache entry with | replace the end-to-end headers stored with the cache entry with | |||
| skipping to change at page 22, line 38 | skipping to change at page 22, line 44 | |||
| Note: this rule allows an origin server to use a 304 (Not | Note: this rule allows an origin server to use a 304 (Not | |||
| Modified) or a 206 (Partial Content) response to update any header | Modified) or a 206 (Partial Content) response to update any header | |||
| associated with a previous response for the same entity or sub- | associated with a previous response for the same entity or sub- | |||
| ranges thereof, although it might not always be meaningful or | ranges thereof, although it might not always be meaningful or | |||
| correct to do so. This rule does not allow an origin server to | correct to do so. This rule does not allow an origin server to | |||
| use a 304 (Not Modified) or a 206 (Partial Content) response to | use a 304 (Not Modified) or a 206 (Partial Content) response to | |||
| entirely delete a header that it had provided with a previous | entirely delete a header that it had provided with a previous | |||
| response. | response. | |||
| 2.6. Caching Negotiated Responses | 7. Caching Negotiated Responses | |||
| Use of server-driven content negotiation (Section 4.1 of [Part3]), as | Use of server-driven content negotiation (Section 4.1 of [Part3]), as | |||
| indicated by the presence of a Vary header field in a response, | indicated by the presence of a Vary header field in a response, | |||
| alters the conditions and procedure by which a cache can use the | alters the conditions and procedure by which a cache can use the | |||
| response for subsequent requests. See Section 3.5 for use of the | response for subsequent requests. See Section 15.5 for use of the | |||
| Vary header field by servers. | Vary header field by servers. | |||
| A server SHOULD use the Vary header field to inform a cache of what | A server SHOULD use the Vary header field to inform a cache of what | |||
| request-header fields were used to select among multiple | request-header fields were used to select among multiple | |||
| representations of a cacheable response subject to server-driven | representations of a cacheable response subject to server-driven | |||
| negotiation. The set of header fields named by the Vary field value | negotiation. The set of header fields named by the Vary field value | |||
| is known as the "selecting" request-headers. | is known as the "selecting" request-headers. | |||
| When the cache receives a subsequent request whose Request-URI | When the cache receives a subsequent request whose Request-URI | |||
| specifies one or more cache entries including a Vary header field, | specifies one or more cache entries including a Vary header field, | |||
| skipping to change at page 24, line 5 | skipping to change at page 24, line 12 | |||
| the If-None-Match header field unless the request is for a range that | the If-None-Match header field unless the request is for a range that | |||
| would be fully satisfied by that entry. | would be fully satisfied by that entry. | |||
| If a cache receives a successful response whose Content-Location | If a cache receives a successful response whose Content-Location | |||
| field matches that of an existing cache entry for the same Request- | field matches that of an existing cache entry for the same Request- | |||
| URI, whose entity-tag differs from that of the existing entry, and | URI, whose entity-tag differs from that of the existing entry, and | |||
| whose Date is more recent than that of the existing entry, the | whose Date is more recent than that of the existing entry, the | |||
| existing entry SHOULD NOT be returned in response to future requests | existing entry SHOULD NOT be returned in response to future requests | |||
| and SHOULD be deleted from the cache. | and SHOULD be deleted from the cache. | |||
| 2.7. Shared and Non-Shared Caches | 8. Shared and Non-Shared Caches | |||
| For reasons of security and privacy, it is necessary to make a | For reasons of security and privacy, it is necessary to make a | |||
| distinction between "shared" and "non-shared" caches. A non-shared | distinction between "shared" and "non-shared" caches. A non-shared | |||
| cache is one that is accessible only to a single user. Accessibility | cache is one that is accessible only to a single user. Accessibility | |||
| in this case SHOULD be enforced by appropriate security mechanisms. | in this case SHOULD be enforced by appropriate security mechanisms. | |||
| All other caches are considered to be "shared." Other sections of | All other caches are considered to be "shared." Other sections of | |||
| this specification place certain constraints on the operation of | this specification place certain constraints on the operation of | |||
| shared caches in order to prevent loss of privacy or failure of | shared caches in order to prevent loss of privacy or failure of | |||
| access controls. | access controls. | |||
| 2.8. Errors or Incomplete Response Cache Behavior | 9. Errors or Incomplete Response Cache Behavior | |||
| A cache that receives an incomplete response (for example, with fewer | A cache that receives an incomplete response (for example, with fewer | |||
| bytes of data than specified in a Content-Length header) MAY store | bytes of data than specified in a Content-Length header) MAY store | |||
| the response. However, the cache MUST treat this as a partial | the response. However, the cache MUST treat this as a partial | |||
| response. Partial responses MAY be combined as described in Section | response. Partial responses MAY be combined as described in Section | |||
| 4 of [Part5]; the result might be a full response or might still be | 4 of [Part5]; the result might be a full response or might still be | |||
| partial. A cache MUST NOT return a partial response to a client | partial. A cache MUST NOT return a partial response to a client | |||
| without explicitly marking it as such, using the 206 (Partial | without explicitly marking it as such, using the 206 (Partial | |||
| Content) status code. A cache MUST NOT return a partial response | Content) status code. A cache MUST NOT return a partial response | |||
| using a status code of 200 (OK). | using a status code of 200 (OK). | |||
| If a cache receives a 5xx response while attempting to revalidate an | If a cache receives a 5xx response while attempting to revalidate an | |||
| entry, it MAY either forward this response to the requesting client, | entry, it MAY either forward this response to the requesting client, | |||
| or act as if the server failed to respond. In the latter case, it | or act as if the server failed to respond. In the latter case, it | |||
| MAY return a previously received response unless the cached entry | MAY return a previously received response unless the cached entry | |||
| includes the "must-revalidate" cache-control directive (see | includes the "must-revalidate" cache-control directive (see | |||
| Section 3.2). | Section 15.2). | |||
| 2.9. Side Effects of GET and HEAD | 10. Side Effects of GET and HEAD | |||
| Unless the origin server explicitly prohibits the caching of their | Unless the origin server explicitly prohibits the caching of their | |||
| responses, the application of GET and HEAD methods to any resources | responses, the application of GET and HEAD methods to any resources | |||
| SHOULD NOT have side effects that would lead to erroneous behavior if | SHOULD NOT have side effects that would lead to erroneous behavior if | |||
| these responses are taken from a cache. They MAY still have side | these responses are taken from a cache. They MAY still have side | |||
| effects, but a cache is not required to consider such side effects in | effects, but a cache is not required to consider such side effects in | |||
| its caching decisions. Caches are always expected to observe an | its caching decisions. Caches are always expected to observe an | |||
| origin server's explicit restrictions on caching. | origin server's explicit restrictions on caching. | |||
| We note one exception to this rule: since some applications have | We note one exception to this rule: since some applications have | |||
| traditionally used GETs and HEADs with query URLs (those containing a | traditionally used GETs and HEADs with query URLs (those containing a | |||
| "?" in the rel_path part) to perform operations with significant side | "?" in the rel_path part) to perform operations with significant side | |||
| effects, caches MUST NOT treat responses to such URIs as fresh unless | effects, caches MUST NOT treat responses to such URIs as fresh unless | |||
| the server provides an explicit expiration time. This specifically | the server provides an explicit expiration time. This specifically | |||
| means that responses from HTTP/1.0 servers for such URIs SHOULD NOT | means that responses from HTTP/1.0 servers for such URIs SHOULD NOT | |||
| be taken from a cache. See Section 8.1.1 of [Part2] for related | be taken from a cache. See Section 8.1.1 of [Part2] for related | |||
| information. | information. | |||
| 2.10. Invalidation After Updates or Deletions | 11. Invalidation After Updates or Deletions | |||
| The effect of certain methods performed on a resource at the origin | The effect of certain methods performed on a resource at the origin | |||
| server might cause one or more existing cache entries to become non- | server might cause one or more existing cache entries to become non- | |||
| transparently invalid. That is, although they might continue to be | transparently invalid. That is, although they might continue to be | |||
| "fresh," they do not accurately reflect what the origin server would | "fresh," they do not accurately reflect what the origin server would | |||
| return for a new request on that resource. | return for a new request on that resource. | |||
| There is no way for the HTTP protocol to guarantee that all such | There is no way for the HTTP protocol to guarantee that all such | |||
| cache entries are marked invalid. For example, the request that | cache entries are marked invalid. For example, the request that | |||
| caused the change at the origin server might not have gone through | caused the change at the origin server might not have gone through | |||
| skipping to change at page 25, line 36 | skipping to change at page 25, line 46 | |||
| is either the entity referred to by the Request-URI, or by the | is either the entity referred to by the Request-URI, or by the | |||
| Location or Content-Location headers (if present). These methods | Location or Content-Location headers (if present). These methods | |||
| are: | are: | |||
| o PUT | o PUT | |||
| o DELETE | o DELETE | |||
| o POST | o POST | |||
| In order to prevent denial of service attacks, an invalidation based | An invalidation based on the URI in a Location or Content-Location | |||
| on the URI in a Location or Content-Location header MUST only be | header MUST NOT be performed if the host part of that URI differs | |||
| performed if the host part is the same as in the Request-URI. | from the host part in the Request-URI. This helps prevent denial of | |||
| service attacks. | ||||
| A cache that passes through requests for methods it does not | A cache that passes through requests for methods it does not | |||
| understand SHOULD invalidate any entities referred to by the Request- | understand SHOULD invalidate any entities referred to by the Request- | |||
| URI. | URI. | |||
| 2.11. Write-Through Mandatory | 12. Write-Through Mandatory | |||
| All methods that might be expected to cause modifications to the | All methods that might be expected to cause modifications to the | |||
| origin server's resources MUST be written through to the origin | origin server's resources MUST be written through to the origin | |||
| server. This currently includes all methods except for GET and HEAD. | server. This currently includes all methods except for GET and HEAD. | |||
| A cache MUST NOT reply to such a request from a client before having | A cache MUST NOT reply to such a request from a client before having | |||
| transmitted the request to the inbound server, and having received a | transmitted the request to the inbound server, and having received a | |||
| corresponding response from the inbound server. This does not | corresponding response from the inbound server. This does not | |||
| prevent a proxy cache from sending a 100 (Continue) response before | prevent a proxy cache from sending a 100 (Continue) response before | |||
| the inbound server has sent its final reply. | the inbound server has sent its final reply. | |||
| The alternative (known as "write-back" or "copy-back" caching) is not | The alternative (known as "write-back" or "copy-back" caching) is not | |||
| allowed in HTTP/1.1, due to the difficulty of providing consistent | allowed in HTTP/1.1, due to the difficulty of providing consistent | |||
| updates and the problems arising from server, cache, or network | updates and the problems arising from server, cache, or network | |||
| failure prior to write-back. | failure prior to write-back. | |||
| 2.12. Cache Replacement | 13. Cache Replacement | |||
| If a new cacheable (see sections 3.2.2, 2.2.5, 2.2.6 and 2.8) | If a new cacheable (see Sections 15.2.2, 3.5, 3.6 and 9) response is | |||
| response is received from a resource while any existing responses for | received from a resource while any existing responses for the same | |||
| the same resource are cached, the cache SHOULD use the new response | resource are cached, the cache SHOULD use the new response to reply | |||
| to reply to the current request. It MAY insert it into cache storage | to the current request. It MAY insert it into cache storage and MAY, | |||
| and MAY, if it meets all other requirements, use it to respond to any | if it meets all other requirements, use it to respond to any future | |||
| future requests that would previously have caused the old response to | requests that would previously have caused the old response to be | |||
| be returned. If it inserts the new response into cache storage the | returned. If it inserts the new response into cache storage the | |||
| rules in Section 2.5.3 apply. | rules in Section 6.3 apply. | |||
| Note: a new response that has an older Date header value than | Note: a new response that has an older Date header value than | |||
| existing cached responses is not cacheable. | existing cached responses is not cacheable. | |||
| 2.13. History Lists | 14. History Lists | |||
| User agents often have history mechanisms, such as "Back" buttons and | User agents often have history mechanisms, such as "Back" buttons and | |||
| history lists, which can be used to redisplay an entity retrieved | history lists, which can be used to redisplay an entity retrieved | |||
| earlier in a session. | earlier in a session. | |||
| History mechanisms and caches are different. In particular history | History mechanisms and caches are different. In particular history | |||
| mechanisms SHOULD NOT try to show a semantically transparent view of | mechanisms SHOULD NOT try to show a semantically transparent view of | |||
| the current state of a resource. Rather, a history mechanism is | the current state of a resource. Rather, a history mechanism is | |||
| meant to show exactly what the user saw at the time when the resource | meant to show exactly what the user saw at the time when the resource | |||
| was retrieved. | was retrieved. | |||
| skipping to change at page 27, line 4 | skipping to change at page 27, line 20 | |||
| This is not to be construed to prohibit the history mechanism from | This is not to be construed to prohibit the history mechanism from | |||
| telling the user that a view might be stale. | telling the user that a view might be stale. | |||
| Note: if history list mechanisms unnecessarily prevent users from | Note: if history list mechanisms unnecessarily prevent users from | |||
| viewing stale resources, this will tend to force service authors | viewing stale resources, this will tend to force service authors | |||
| to avoid using HTTP expiration controls and cache controls when | to avoid using HTTP expiration controls and cache controls when | |||
| they would otherwise like to. Service authors may consider it | they would otherwise like to. Service authors may consider it | |||
| important that users not be presented with error messages or | important that users not be presented with error messages or | |||
| warning messages when they use navigation controls (such as BACK) | warning messages when they use navigation controls (such as BACK) | |||
| to view previously fetched resources. Even though sometimes such | to view previously fetched resources. Even though sometimes such | |||
| resources ought not to cached, or ought to expire quickly, user | resources ought not be cached, or ought to expire quickly, user | |||
| interface considerations may force service authors to resort to | interface considerations may force service authors to resort to | |||
| other means of preventing caching (e.g. "once-only" URLs) in order | other means of preventing caching (e.g. "once-only" URLs) in order | |||
| not to suffer the effects of improperly functioning history | not to suffer the effects of improperly functioning history | |||
| mechanisms. | mechanisms. | |||
| 3. Header Field Definitions | 15. Header Field Definitions | |||
| This section defines the syntax and semantics of all standard | This section defines the syntax and semantics of HTTP/1.1 header | |||
| HTTP/1.1 header fields. For entity-header fields, both sender and | fields related to caching. | |||
| recipient refer to either the client or the server, depending on who | ||||
| sends and who receives the entity. | ||||
| 3.1. Age | For entity-header fields, both sender and recipient refer to either | |||
| the client or the server, depending on who sends and who receives the | ||||
| entity. | ||||
| 15.1. Age | ||||
| The Age response-header field conveys the sender's estimate of the | The Age response-header field conveys the sender's estimate of the | |||
| amount of time since the response (or its revalidation) was generated | amount of time since the response (or its revalidation) was generated | |||
| at the origin server. A cached response is "fresh" if its age does | at the origin server. A cached response is "fresh" if its age does | |||
| not exceed its freshness lifetime. Age values are calculated as | not exceed its freshness lifetime. Age values are calculated as | |||
| specified in Section 2.2.3. | specified in Section 3.3. | |||
| Age = "Age" ":" age-value | Age = "Age" ":" age-value | |||
| age-value = delta-seconds | age-value = delta-seconds | |||
| Age values are non-negative decimal integers, representing time in | Age values are non-negative decimal integers, representing time in | |||
| seconds. | seconds. | |||
| delta-seconds = 1*DIGIT | ||||
| If a cache receives a value larger than the largest positive integer | If a cache receives a value larger than the largest positive integer | |||
| it can represent, or if any of its age calculations overflows, it | it can represent, or if any of its age calculations overflows, it | |||
| MUST transmit an Age header with a value of 2147483648 (2^31). An | MUST transmit an Age header with a value of 2147483648 (2^31). An | |||
| HTTP/1.1 server that includes a cache MUST include an Age header | HTTP/1.1 server that includes a cache MUST include an Age header | |||
| field in every response generated from its own cache. Caches SHOULD | field in every response generated from its own cache. Caches SHOULD | |||
| use an arithmetic type of at least 31 bits of range. | use an arithmetic type of at least 31 bits of range. | |||
| 3.2. Cache-Control | 15.2. Cache-Control | |||
| The Cache-Control general-header field is used to specify directives | The Cache-Control general-header field is used to specify directives | |||
| that MUST be obeyed by all caching mechanisms along the request/ | that MUST be obeyed by all caching mechanisms along the request/ | |||
| response chain. The directives specify behavior intended to prevent | response chain. The directives specify behavior intended to prevent | |||
| caches from adversely interfering with the request or response. | caches from adversely interfering with the request or response. | |||
| These directives typically override the default caching algorithms. | These directives typically override the default caching algorithms. | |||
| Cache directives are unidirectional in that the presence of a | Cache directives are unidirectional in that the presence of a | |||
| directive in a request does not imply that the same directive is to | directive in a request does not imply that the same directive is to | |||
| be given in the response. | be given in the response. | |||
| Note that HTTP/1.0 caches might not implement Cache-Control and | Note that HTTP/1.0 caches might not implement Cache-Control and | |||
| might only implement Pragma: no-cache (see Section 3.4). | might only implement Pragma: no-cache (see Section 15.4). | |||
| Cache directives MUST be passed through by a proxy or gateway | Cache directives MUST be passed through by a proxy or gateway | |||
| application, regardless of their significance to that application, | application, regardless of their significance to that application, | |||
| since the directives might be applicable to all recipients along the | since the directives might be applicable to all recipients along the | |||
| request/response chain. It is not possible to specify a cache- | request/response chain. It is not possible to specify a cache- | |||
| directive for a specific cache. | directive for a specific cache. | |||
| Cache-Control = "Cache-Control" ":" 1#cache-directive | Cache-Control = "Cache-Control" ":" 1#cache-directive | |||
| cache-directive = cache-request-directive | cache-directive = cache-request-directive | |||
| | cache-response-directive | | cache-response-directive | |||
| cache-request-directive = | cache-request-directive = | |||
| "no-cache" ; Section 3.2.1 | "no-cache" ; Section 15.2.1 | |||
| | "no-store" ; Section 3.2.2 | | "no-store" ; Section 15.2.2 | |||
| | "max-age" "=" delta-seconds ; Section 3.2.3, 3.2.4 | | "max-age" "=" delta-seconds ; Section 15.2.3, 15.2.4 | |||
| | "max-stale" [ "=" delta-seconds ] ; Section 3.2.3 | | "max-stale" [ "=" delta-seconds ] ; Section 15.2.3 | |||
| | "min-fresh" "=" delta-seconds ; Section 3.2.3 | | "min-fresh" "=" delta-seconds ; Section 15.2.3 | |||
| | "no-transform" ; Section 3.2.5 | | "no-transform" ; Section 15.2.5 | |||
| | "only-if-cached" ; Section 3.2.4 | | "only-if-cached" ; Section 15.2.4 | |||
| | cache-extension ; Section 3.2.6 | | cache-extension ; Section 15.2.6 | |||
| cache-response-directive = | cache-response-directive = | |||
| "public" ; Section 3.2.1 | "public" ; Section 15.2.1 | |||
| | "private" [ "=" <"> 1#field-name <"> ] ; Section 3.2.1 | | "private" [ "=" DQUOTE 1#field-name DQUOTE ] ; Section 15.2.1 | |||
| | "no-cache" [ "=" <"> 1#field-name <"> ]; Section 3.2.1 | | "no-cache" [ "=" DQUOTE 1#field-name DQUOTE ]; Section 15.2.1 | |||
| | "no-store" ; Section 3.2.2 | | "no-store" ; Section 15.2.2 | |||
| | "no-transform" ; Section 3.2.5 | | "no-transform" ; Section 15.2.5 | |||
| | "must-revalidate" ; Section 3.2.4 | | "must-revalidate" ; Section 15.2.4 | |||
| | "proxy-revalidate" ; Section 3.2.4 | | "proxy-revalidate" ; Section 15.2.4 | |||
| | "max-age" "=" delta-seconds ; Section 3.2.3 | | "max-age" "=" delta-seconds ; Section 15.2.3 | |||
| | "s-maxage" "=" delta-seconds ; Section 3.2.3 | | "s-maxage" "=" delta-seconds ; Section 15.2.3 | |||
| | cache-extension ; Section 3.2.6 | | cache-extension ; Section 15.2.6 | |||
| cache-extension = token [ "=" ( token | quoted-string ) ] | cache-extension = token [ "=" ( token | quoted-string ) ] | |||
| When a directive appears without any 1#field-name parameter, the | When a directive appears without any 1#field-name parameter, the | |||
| directive applies to the entire request or response. When such a | directive applies to the entire request or response. When such a | |||
| directive appears with a 1#field-name parameter, it applies only to | directive appears with a 1#field-name parameter, it applies only to | |||
| the named field or fields, and not to the rest of the request or | the named field or fields, and not to the rest of the request or | |||
| response. This mechanism supports extensibility; implementations of | response. This mechanism supports extensibility; implementations of | |||
| future versions of the HTTP protocol might apply these directives to | future versions of the HTTP protocol might apply these directives to | |||
| header fields not defined in HTTP/1.1. | header fields not defined in HTTP/1.1. | |||
| skipping to change at page 29, line 18 | skipping to change at page 30, line 12 | |||
| o Modifications of the basic expiration mechanism; these may be | o Modifications of the basic expiration mechanism; these may be | |||
| imposed by either the origin server or the user agent. | imposed by either the origin server or the user agent. | |||
| o Controls over cache revalidation and reload; these may only be | o Controls over cache revalidation and reload; these may only be | |||
| imposed by a user agent. | imposed by a user agent. | |||
| o Control over transformation of entities. | o Control over transformation of entities. | |||
| o Extensions to the caching system. | o Extensions to the caching system. | |||
| 3.2.1. What is Cacheable | 15.2.1. What is Cacheable | |||
| By default, a response is cacheable if the requirements of the | By default, a response is cacheable if the requirements of the | |||
| request method, request header fields, and the response status | request method, request header fields, and the response status | |||
| indicate that it is cacheable. Section 2.4 summarizes these defaults | indicate that it is cacheable. Section 5 summarizes these defaults | |||
| for cacheability. The following Cache-Control response directives | for cacheability. The following Cache-Control response directives | |||
| allow an origin server to override the default cacheability of a | allow an origin server to override the default cacheability of a | |||
| response: | response: | |||
| public | public | |||
| Indicates that the response MAY be cached by any cache, even if it | Indicates that the response MAY be cached by any cache, even if it | |||
| would normally be non-cacheable or cacheable only within a non- | would normally be non-cacheable or cacheable only within a non- | |||
| shared cache. (See also Authorization, Section 3.1 of [Part7], | shared cache. (See also Authorization, Section 3.1 of [Part7], | |||
| for additional details.) | for additional details.) | |||
| skipping to change at page 30, line 18 | skipping to change at page 31, line 12 | |||
| subject to any other restrictions on caching. However, the | subject to any other restrictions on caching. However, the | |||
| specified field-name(s) MUST NOT be sent in the response to a | specified field-name(s) MUST NOT be sent in the response to a | |||
| subsequent request without successful revalidation with the origin | subsequent request without successful revalidation with the origin | |||
| server. This allows an origin server to prevent the re-use of | server. This allows an origin server to prevent the re-use of | |||
| certain header fields in a response, while still allowing caching | certain header fields in a response, while still allowing caching | |||
| of the rest of the response. | of the rest of the response. | |||
| Note: Most HTTP/1.0 caches will not recognize or obey this | Note: Most HTTP/1.0 caches will not recognize or obey this | |||
| directive. | directive. | |||
| 3.2.2. What May be Stored by Caches | 15.2.2. What May be Stored by Caches | |||
| no-store | no-store | |||
| The purpose of the no-store directive is to prevent the | The purpose of the no-store directive is to prevent the | |||
| inadvertent release or retention of sensitive information (for | inadvertent release or retention of sensitive information (for | |||
| example, on backup tapes). The no-store directive applies to the | example, on backup tapes). The no-store directive applies to the | |||
| entire message, and MAY be sent either in a response or in a | entire message, and MAY be sent either in a response or in a | |||
| request. If sent in a request, a cache MUST NOT store any part of | request. If sent in a request, a cache MUST NOT store any part of | |||
| either this request or any response to it. If sent in a response, | either this request or any response to it. If sent in a response, | |||
| a cache MUST NOT store any part of either this response or the | a cache MUST NOT store any part of either this response or the | |||
| skipping to change at page 31, line 5 | skipping to change at page 31, line 45 | |||
| The purpose of this directive is to meet the stated requirements | The purpose of this directive is to meet the stated requirements | |||
| of certain users and service authors who are concerned about | of certain users and service authors who are concerned about | |||
| accidental releases of information via unanticipated accesses to | accidental releases of information via unanticipated accesses to | |||
| cache data structures. While the use of this directive might | cache data structures. While the use of this directive might | |||
| improve privacy in some cases, we caution that it is NOT in any | improve privacy in some cases, we caution that it is NOT in any | |||
| way a reliable or sufficient mechanism for ensuring privacy. In | way a reliable or sufficient mechanism for ensuring privacy. In | |||
| particular, malicious or compromised caches might not recognize or | particular, malicious or compromised caches might not recognize or | |||
| obey this directive, and communications networks might be | obey this directive, and communications networks might be | |||
| vulnerable to eavesdropping. | vulnerable to eavesdropping. | |||
| 3.2.3. Modifications of the Basic Expiration Mechanism | 15.2.3. Modifications of the Basic Expiration Mechanism | |||
| The expiration time of an entity MAY be specified by the origin | The expiration time of an entity MAY be specified by the origin | |||
| server using the Expires header (see Section 3.3). Alternatively, it | server using the Expires header (see Section 15.3). Alternatively, | |||
| MAY be specified using the max-age directive in a response. When the | it MAY be specified using the max-age directive in a response. When | |||
| max-age cache-control directive is present in a cached response, the | the max-age cache-control directive is present in a cached response, | |||
| response is stale if its current age is greater than the age value | the response is stale if its current age is greater than the age | |||
| given (in seconds) at the time of a new request for that resource. | value given (in seconds) at the time of a new request for that | |||
| The max-age directive on a response implies that the response is | resource. The max-age directive on a response implies that the | |||
| cacheable (i.e., "public") unless some other, more restrictive cache | response is cacheable (i.e., "public") unless some other, more | |||
| directive is also present. | restrictive cache directive is also present. | |||
| If a response includes both an Expires header and a max-age | If a response includes both an Expires header and a max-age | |||
| directive, the max-age directive overrides the Expires header, even | directive, the max-age directive overrides the Expires header, even | |||
| if the Expires header is more restrictive. This rule allows an | if the Expires header is more restrictive. This rule allows an | |||
| origin server to provide, for a given response, a longer expiration | origin server to provide, for a given response, a longer expiration | |||
| time to an HTTP/1.1 (or later) cache than to an HTTP/1.0 cache. This | time to an HTTP/1.1 (or later) cache than to an HTTP/1.0 cache. This | |||
| might be useful if certain HTTP/1.0 caches improperly calculate ages | might be useful if certain HTTP/1.0 caches improperly calculate ages | |||
| or expiration times, perhaps due to desynchronized clocks. | or expiration times, perhaps due to desynchronized clocks. | |||
| Many HTTP/1.0 cache implementations will treat an Expires value that | Many HTTP/1.0 cache implementations will treat an Expires value that | |||
| skipping to change at page 31, line 47 | skipping to change at page 32, line 39 | |||
| Date value. This will prevent older caches from improperly | Date value. This will prevent older caches from improperly | |||
| caching the response. | caching the response. | |||
| s-maxage | s-maxage | |||
| If a response includes an s-maxage directive, then for a shared | If a response includes an s-maxage directive, then for a shared | |||
| cache (but not for a private cache), the maximum age specified by | cache (but not for a private cache), the maximum age specified by | |||
| this directive overrides the maximum age specified by either the | this directive overrides the maximum age specified by either the | |||
| max-age directive or the Expires header. The s-maxage directive | max-age directive or the Expires header. The s-maxage directive | |||
| also implies the semantics of the proxy-revalidate directive (see | also implies the semantics of the proxy-revalidate directive (see | |||
| Section 3.2.4), i.e., that the shared cache must not use the entry | Section 15.2.4), i.e., that the shared cache must not use the | |||
| after it becomes stale to respond to a subsequent request without | entry after it becomes stale to respond to a subsequent request | |||
| first revalidating it with the origin server. The s-maxage | without first revalidating it with the origin server. The | |||
| directive is always ignored by a private cache. | s-maxage directive is always ignored by a private cache. | |||
| Note that most older caches, not compliant with this specification, | Note that most older caches, not compliant with this specification, | |||
| do not implement any cache-control directives. An origin server | do not implement any cache-control directives. An origin server | |||
| wishing to use a cache-control directive that restricts, but does not | wishing to use a cache-control directive that restricts, but does not | |||
| prevent, caching by an HTTP/1.1-compliant cache MAY exploit the | prevent, caching by an HTTP/1.1-compliant cache MAY exploit the | |||
| requirement that the max-age directive overrides the Expires header, | requirement that the max-age directive overrides the Expires header, | |||
| and the fact that pre-HTTP/1.1-compliant caches do not observe the | and the fact that pre-HTTP/1.1-compliant caches do not observe the | |||
| max-age directive. | max-age directive. | |||
| Other directives allow a user agent to modify the basic expiration | Other directives allow a user agent to modify the basic expiration | |||
| skipping to change at page 33, line 5 | skipping to change at page 33, line 47 | |||
| A cache MAY be configured to return stale responses without | A cache MAY be configured to return stale responses without | |||
| validation, but only if this does not conflict with any "MUST"-level | validation, but only if this does not conflict with any "MUST"-level | |||
| requirements concerning cache validation (e.g., a "must-revalidate" | requirements concerning cache validation (e.g., a "must-revalidate" | |||
| cache-control directive). | cache-control directive). | |||
| If both the new request and the cached entry include "max-age" | If both the new request and the cached entry include "max-age" | |||
| directives, then the lesser of the two values is used for determining | directives, then the lesser of the two values is used for determining | |||
| the freshness of the cached entry for that request. | the freshness of the cached entry for that request. | |||
| 3.2.4. Cache Revalidation and Reload Controls | 15.2.4. Cache Revalidation and Reload Controls | |||
| Sometimes a user agent might want or need to insist that a cache | Sometimes a user agent might want or need to insist that a cache | |||
| revalidate its cache entry with the origin server (and not just with | revalidate its cache entry with the origin server (and not just with | |||
| the next cache along the path to the origin server), or to reload its | the next cache along the path to the origin server), or to reload its | |||
| cache entry from the origin server. End-to-end revalidation might be | cache entry from the origin server. End-to-end revalidation might be | |||
| necessary if either the cache or the origin server has overestimated | necessary if either the cache or the origin server has overestimated | |||
| the expiration time of the cached response. End-to-end reload may be | the expiration time of the cached response. End-to-end reload may be | |||
| necessary if the cache entry has become corrupted for some reason. | necessary if the cache entry has become corrupted for some reason. | |||
| End-to-end revalidation may be requested either when the client does | End-to-end revalidation may be requested either when the client does | |||
| skipping to change at page 35, line 38 | skipping to change at page 36, line 31 | |||
| revalidate directive, except that it does not apply to non-shared | revalidate directive, except that it does not apply to non-shared | |||
| user agent caches. It can be used on a response to an | user agent caches. It can be used on a response to an | |||
| authenticated request to permit the user's cache to store and | authenticated request to permit the user's cache to store and | |||
| later return the response without needing to revalidate it (since | later return the response without needing to revalidate it (since | |||
| it has already been authenticated once by that user), while still | it has already been authenticated once by that user), while still | |||
| requiring proxies that service many users to revalidate each time | requiring proxies that service many users to revalidate each time | |||
| (in order to make sure that each user has been authenticated). | (in order to make sure that each user has been authenticated). | |||
| Note that such authenticated responses also need the public cache | Note that such authenticated responses also need the public cache | |||
| control directive in order to allow them to be cached at all. | control directive in order to allow them to be cached at all. | |||
| 3.2.5. No-Transform Directive | 15.2.5. No-Transform Directive | |||
| no-transform | no-transform | |||
| Implementors of intermediate caches (proxies) have found it useful | Implementors of intermediate caches (proxies) have found it useful | |||
| to convert the media type of certain entity bodies. A non- | to convert the media type of certain entity bodies. A non- | |||
| transparent proxy might, for example, convert between image | transparent proxy might, for example, convert between image | |||
| formats in order to save cache space or to reduce the amount of | formats in order to save cache space or to reduce the amount of | |||
| traffic on a slow link. | traffic on a slow link. | |||
| Serious operational problems occur, however, when these | Serious operational problems occur, however, when these | |||
| transformations are applied to entity bodies intended for certain | transformations are applied to entity bodies intended for certain | |||
| kinds of applications. For example, applications for medical | kinds of applications. For example, applications for medical | |||
| imaging, scientific data analysis and those using end-to-end | imaging, scientific data analysis and those using end-to-end | |||
| authentication, all depend on receiving an entity body that is bit | authentication, all depend on receiving an entity body that is bit | |||
| for bit identical to the original entity-body. | for bit identical to the original entity-body. | |||
| Therefore, if a message includes the no-transform directive, an | Therefore, if a message includes the no-transform directive, an | |||
| intermediate cache or proxy MUST NOT change those headers that are | intermediate cache or proxy MUST NOT change those headers that are | |||
| listed in Section 2.5.2 as being subject to the no-transform | listed in Section 6.2 as being subject to the no-transform | |||
| directive. This implies that the cache or proxy MUST NOT change | directive. This implies that the cache or proxy MUST NOT change | |||
| any aspect of the entity-body that is specified by these headers, | any aspect of the entity-body that is specified by these headers, | |||
| including the value of the entity-body itself. | including the value of the entity-body itself. | |||
| 3.2.6. Cache Control Extensions | 15.2.6. Cache Control Extensions | |||
| The Cache-Control header field can be extended through the use of one | The Cache-Control header field can be extended through the use of one | |||
| or more cache-extension tokens, each with an optional assigned value. | or more cache-extension tokens, each with an optional assigned value. | |||
| Informational extensions (those which do not require a change in | Informational extensions (those which do not require a change in | |||
| cache behavior) MAY be added without changing the semantics of other | cache behavior) MAY be added without changing the semantics of other | |||
| directives. Behavioral extensions are designed to work by acting as | directives. Behavioral extensions are designed to work by acting as | |||
| modifiers to the existing base of cache directives. Both the new | modifiers to the existing base of cache directives. Both the new | |||
| directive and the standard directive are supplied, such that | directive and the standard directive are supplied, such that | |||
| applications which do not understand the new directive will default | applications which do not understand the new directive will default | |||
| to the behavior specified by the standard directive, and those that | to the behavior specified by the standard directive, and those that | |||
| skipping to change at page 37, line 8 | skipping to change at page 37, line 48 | |||
| does not understand the community cache-extension, since it will also | does not understand the community cache-extension, since it will also | |||
| see and understand the private directive and thus default to the safe | see and understand the private directive and thus default to the safe | |||
| behavior. | behavior. | |||
| Unrecognized cache-directives MUST be ignored; it is assumed that any | Unrecognized cache-directives MUST be ignored; it is assumed that any | |||
| cache-directive likely to be unrecognized by an HTTP/1.1 cache will | cache-directive likely to be unrecognized by an HTTP/1.1 cache will | |||
| be combined with standard directives (or the response's default | be combined with standard directives (or the response's default | |||
| cacheability) such that the cache behavior will remain minimally | cacheability) such that the cache behavior will remain minimally | |||
| correct even if the cache does not understand the extension(s). | correct even if the cache does not understand the extension(s). | |||
| 3.3. Expires | 15.3. Expires | |||
| The Expires entity-header field gives the date/time after which the | The Expires entity-header field gives the date/time after which the | |||
| response is considered stale. A stale cache entry may not normally | response is considered stale. A stale cache entry may not normally | |||
| be returned by a cache (either a proxy cache or a user agent cache) | be returned by a cache (either a proxy cache or a user agent cache) | |||
| unless it is first validated with the origin server (or with an | unless it is first validated with the origin server (or with an | |||
| intermediate cache that has a fresh copy of the entity). See | intermediate cache that has a fresh copy of the entity). See | |||
| Section 2.2 for further discussion of the expiration model. | Section 3 for further discussion of the expiration model. | |||
| The presence of an Expires field does not imply that the original | The presence of an Expires field does not imply that the original | |||
| resource will change or cease to exist at, before, or after that | resource will change or cease to exist at, before, or after that | |||
| time. | time. | |||
| The format is an absolute date and time as defined by HTTP-date in | The format is an absolute date and time as defined by HTTP-date in | |||
| Section 3.3.1 of [Part1]; it MUST be in RFC 1123 date format: | Section 3.3.1 of [Part1]; it MUST be sent in rfc1123-date format. | |||
| Expires = "Expires" ":" HTTP-date | Expires = "Expires" ":" HTTP-date | |||
| An example of its use is | An example of its use is | |||
| Expires: Thu, 01 Dec 1994 16:00:00 GMT | Expires: Thu, 01 Dec 1994 16:00:00 GMT | |||
| Note: if a response includes a Cache-Control field with the max- | Note: if a response includes a Cache-Control field with the max- | |||
| age directive (see Section 3.2.3), that directive overrides the | age directive (see Section 15.2.3), that directive overrides the | |||
| Expires field. | Expires field. | |||
| HTTP/1.1 clients and caches MUST treat other invalid date formats, | HTTP/1.1 clients and caches MUST treat other invalid date formats, | |||
| especially including the value "0", as in the past (i.e., "already | especially including the value "0", as in the past (i.e., "already | |||
| expired"). | expired"). | |||
| To mark a response as "already expired," an origin server sends an | To mark a response as "already expired," an origin server sends an | |||
| Expires date that is equal to the Date header value. (See the rules | Expires date that is equal to the Date header value. (See the rules | |||
| for expiration calculations in Section 2.2.4.) | for expiration calculations in Section 3.4.) | |||
| To mark a response as "never expires," an origin server sends an | To mark a response as "never expires," an origin server sends an | |||
| Expires date approximately one year from the time the response is | Expires date approximately one year from the time the response is | |||
| sent. HTTP/1.1 servers SHOULD NOT send Expires dates more than one | sent. HTTP/1.1 servers SHOULD NOT send Expires dates more than one | |||
| year in the future. | year in the future. | |||
| The presence of an Expires header field with a date value of some | The presence of an Expires header field with a date value of some | |||
| time in the future on a response that otherwise would by default be | time in the future on a response that otherwise would by default be | |||
| non-cacheable indicates that the response is cacheable, unless | non-cacheable indicates that the response is cacheable, unless | |||
| indicated otherwise by a Cache-Control header field (Section 3.2). | indicated otherwise by a Cache-Control header field (Section 15.2). | |||
| 3.4. Pragma | 15.4. Pragma | |||
| The Pragma general-header field is used to include implementation- | The Pragma general-header field is used to include implementation- | |||
| specific directives that might apply to any recipient along the | specific directives that might apply to any recipient along the | |||
| request/response chain. All pragma directives specify optional | request/response chain. All pragma directives specify optional | |||
| behavior from the viewpoint of the protocol; however, some systems | behavior from the viewpoint of the protocol; however, some systems | |||
| MAY require that behavior be consistent with the directives. | MAY require that behavior be consistent with the directives. | |||
| Pragma = "Pragma" ":" 1#pragma-directive | Pragma = "Pragma" ":" 1#pragma-directive | |||
| pragma-directive = "no-cache" | extension-pragma | pragma-directive = "no-cache" | extension-pragma | |||
| extension-pragma = token [ "=" ( token | quoted-string ) ] | extension-pragma = token [ "=" ( token | quoted-string ) ] | |||
| When the no-cache directive is present in a request message, an | When the no-cache directive is present in a request message, an | |||
| application SHOULD forward the request toward the origin server even | application SHOULD forward the request toward the origin server even | |||
| if it has a cached copy of what is being requested. This pragma | if it has a cached copy of what is being requested. This pragma | |||
| directive has the same semantics as the no-cache cache-directive (see | directive has the same semantics as the no-cache cache-directive (see | |||
| Section 3.2) and is defined here for backward compatibility with | Section 15.2) and is defined here for backward compatibility with | |||
| HTTP/1.0. Clients SHOULD include both header fields when a no-cache | HTTP/1.0. Clients SHOULD include both header fields when a no-cache | |||
| request is sent to a server not known to be HTTP/1.1 compliant. | request is sent to a server not known to be HTTP/1.1 compliant. | |||
| Pragma directives MUST be passed through by a proxy or gateway | Pragma directives MUST be passed through by a proxy or gateway | |||
| application, regardless of their significance to that application, | application, regardless of their significance to that application, | |||
| since the directives might be applicable to all recipients along the | since the directives might be applicable to all recipients along the | |||
| request/response chain. It is not possible to specify a pragma for a | request/response chain. It is not possible to specify a pragma for a | |||
| specific recipient; however, any pragma directive not relevant to a | specific recipient; however, any pragma directive not relevant to a | |||
| recipient SHOULD be ignored by that recipient. | recipient SHOULD be ignored by that recipient. | |||
| HTTP/1.1 caches SHOULD treat "Pragma: no-cache" as if the client had | HTTP/1.1 caches SHOULD treat "Pragma: no-cache" as if the client had | |||
| sent "Cache-Control: no-cache". No new Pragma directives will be | sent "Cache-Control: no-cache". No new Pragma directives will be | |||
| defined in HTTP. | defined in HTTP. | |||
| Note: because the meaning of "Pragma: no-cache as a response | Note: because the meaning of "Pragma: no-cache" as a response- | |||
| header field is not actually specified, it does not provide a | header field is not actually specified, it does not provide a | |||
| reliable replacement for "Cache-Control: no-cache" in a response | reliable replacement for "Cache-Control: no-cache" in a response. | |||
| 3.5. Vary | 15.5. Vary | |||
| The Vary field value indicates the set of request-header fields that | The Vary field value indicates the set of request-header fields that | |||
| fully determines, while the response is fresh, whether a cache is | fully determines, while the response is fresh, whether a cache is | |||
| permitted to use the response to reply to a subsequent request | permitted to use the response to reply to a subsequent request | |||
| without revalidation. For uncacheable or stale responses, the Vary | without revalidation. For uncacheable or stale responses, the Vary | |||
| field value advises the user agent about the criteria that were used | field value advises the user agent about the criteria that were used | |||
| to select the representation. A Vary field value of "*" implies that | to select the representation. A Vary field value of "*" implies that | |||
| a cache cannot determine from the request headers of a subsequent | a cache cannot determine from the request headers of a subsequent | |||
| request whether this response is the appropriate representation. See | request whether this response is the appropriate representation. See | |||
| Section 2.6 for use of the Vary header field by caches. | Section 7 for use of the Vary header field by caches. | |||
| Vary = "Vary" ":" ( "*" | 1#field-name ) | Vary = "Vary" ":" ( "*" | 1#field-name ) | |||
| An HTTP/1.1 server SHOULD include a Vary header field with any | An HTTP/1.1 server SHOULD include a Vary header field with any | |||
| cacheable response that is subject to server-driven negotiation. | cacheable response that is subject to server-driven negotiation. | |||
| Doing so allows a cache to properly interpret future requests on that | Doing so allows a cache to properly interpret future requests on that | |||
| resource and informs the user agent about the presence of negotiation | resource and informs the user agent about the presence of negotiation | |||
| on that resource. A server MAY include a Vary header field with a | on that resource. A server MAY include a Vary header field with a | |||
| non-cacheable response that is subject to server-driven negotiation, | non-cacheable response that is subject to server-driven negotiation, | |||
| since this might provide the user agent with useful information about | since this might provide the user agent with useful information about | |||
| the dimensions over which the response varies at the time of the | the dimensions over which the response varies at the time of the | |||
| response. | response. | |||
| skipping to change at page 39, line 32 | skipping to change at page 40, line 25 | |||
| The field-names given are not limited to the set of standard request- | The field-names given are not limited to the set of standard request- | |||
| header fields defined by this specification. Field names are case- | header fields defined by this specification. Field names are case- | |||
| insensitive. | insensitive. | |||
| A Vary field value of "*" signals that unspecified parameters not | A Vary field value of "*" signals that unspecified parameters not | |||
| limited to the request-headers (e.g., the network address of the | limited to the request-headers (e.g., the network address of the | |||
| client), play a role in the selection of the response representation. | client), play a role in the selection of the response representation. | |||
| The "*" value MUST NOT be generated by a proxy server; it may only be | The "*" value MUST NOT be generated by a proxy server; it may only be | |||
| generated by an origin server. | generated by an origin server. | |||
| 3.6. Warning | 15.6. Warning | |||
| The Warning general-header field is used to carry additional | The Warning general-header field is used to carry additional | |||
| information about the status or transformation of a message which | information about the status or transformation of a message which | |||
| might not be reflected in the message. This information is typically | might not be reflected in the message. This information is typically | |||
| used to warn about a possible lack of semantic transparency from | used to warn about a possible lack of semantic transparency from | |||
| caching operations or transformations applied to the entity body of | caching operations or transformations applied to the entity body of | |||
| the message. | the message. | |||
| Warning headers are sent with responses using: | Warning headers are sent with responses using: | |||
| Warning = "Warning" ":" 1#warning-value | Warning = "Warning" ":" 1#warning-value | |||
| warning-value = warn-code SP warn-agent SP warn-text | warning-value = warn-code SP warn-agent SP warn-text | |||
| [SP warn-date] | [SP warn-date] | |||
| warn-code = 3DIGIT | warn-code = 3DIGIT | |||
| warn-agent = ( host [ ":" port ] ) | pseudonym | warn-agent = ( host [ ":" port ] ) | pseudonym | |||
| ; the name or pseudonym of the server adding | ; the name or pseudonym of the server adding | |||
| ; the Warning header, for use in debugging | ; the Warning header, for use in debugging | |||
| warn-text = quoted-string | warn-text = quoted-string | |||
| warn-date = <"> HTTP-date <"> | warn-date = DQUOTE HTTP-date DQUOTE | |||
| A response MAY carry more than one Warning header. | A response MAY carry more than one Warning header. | |||
| The warn-text SHOULD be in a natural language and character set that | The warn-text SHOULD be in a natural language and character set that | |||
| is most likely to be intelligible to the human user receiving the | is most likely to be intelligible to the human user receiving the | |||
| response. This decision MAY be based on any available knowledge, | response. This decision MAY be based on any available knowledge, | |||
| such as the location of the cache or user, the Accept-Language field | such as the location of the cache or user, the Accept-Language field | |||
| in a request, the Content-Language field in a response, etc. The | in a request, the Content-Language field in a response, etc. The | |||
| default language is English and the default character set is ISO- | default language is English and the default character set is ISO- | |||
| 8859-1. | 8859-1 ([ISO-8859-1]). | |||
| If a character set other than ISO-8859-1 is used, it MUST be encoded | If a character set other than ISO-8859-1 is used, it MUST be encoded | |||
| in the warn-text using the method described in RFC 2047 [RFC2047]. | in the warn-text using the method described in [RFC2047]. | |||
| Warning headers can in general be applied to any message, however | Warning headers can in general be applied to any message, however | |||
| some specific warn-codes are specific to caches and can only be | some specific warn-codes are specific to caches and can only be | |||
| applied to response messages. New Warning headers SHOULD be added | applied to response messages. New Warning headers SHOULD be added | |||
| after any existing Warning headers. A cache MUST NOT delete any | after any existing Warning headers. A cache MUST NOT delete any | |||
| Warning header that it received with a message. However, if a cache | Warning header that it received with a message. However, if a cache | |||
| successfully validates a cache entry, it SHOULD remove any Warning | successfully validates a cache entry, it SHOULD remove any Warning | |||
| headers previously attached to that entry except as specified for | headers previously attached to that entry except as specified for | |||
| specific Warning codes. It MUST then add any Warning headers | specific Warning codes. It MUST then add any Warning headers | |||
| received in the validating response. In other words, Warning headers | received in the validating response. In other words, Warning headers | |||
| skipping to change at page 41, line 10 | skipping to change at page 41, line 42 | |||
| those appearing later in the response. | those appearing later in the response. | |||
| o Warnings in the user's preferred character set take priority over | o Warnings in the user's preferred character set take priority over | |||
| warnings in other character sets but with identical warn-codes and | warnings in other character sets but with identical warn-codes and | |||
| warn-agents. | warn-agents. | |||
| Systems that generate multiple Warning headers SHOULD order them with | Systems that generate multiple Warning headers SHOULD order them with | |||
| this user agent behavior in mind. | this user agent behavior in mind. | |||
| Requirements for the behavior of caches with respect to Warnings are | Requirements for the behavior of caches with respect to Warnings are | |||
| stated in Section 2.1.2. | stated in Section 2.2. | |||
| This is a list of the currently-defined warn-codes, each with a | This is a list of the currently-defined warn-codes, each with a | |||
| recommended warn-text in English, and a description of its meaning. | recommended warn-text in English, and a description of its meaning. | |||
| 110 Response is stale | 110 Response is stale | |||
| MUST be included whenever the returned response is stale. | MUST be included whenever the returned response is stale. | |||
| 111 Revalidation failed | 111 Revalidation failed | |||
| MUST be included if a cache returns a stale response because an | MUST be included if a cache returns a stale response because an | |||
| attempt to revalidate the response failed, due to an inability to | attempt to revalidate the response failed, due to an inability to | |||
| reach the server. | reach the server. | |||
| 112 Disconnected operation | 112 Disconnected operation | |||
| SHOULD be included if the cache is intentionally disconnected from | SHOULD be included if the cache is intentionally disconnected from | |||
| the rest of the network for a period of time. | the rest of the network for a period of time. | |||
| 113 Heuristic expiration | 113 Heuristic expiration | |||
| skipping to change at page 42, line 23 | skipping to change at page 43, line 5 | |||
| each warning-value a warn-date that matches the date in the response. | each warning-value a warn-date that matches the date in the response. | |||
| If an implementation receives a message with a warning-value that | If an implementation receives a message with a warning-value that | |||
| includes a warn-date, and that warn-date is different from the Date | includes a warn-date, and that warn-date is different from the Date | |||
| value in the response, then that warning-value MUST be deleted from | value in the response, then that warning-value MUST be deleted from | |||
| the message before storing, forwarding, or using it. (This prevents | the message before storing, forwarding, or using it. (This prevents | |||
| bad consequences of naive caching of Warning header fields.) If all | bad consequences of naive caching of Warning header fields.) If all | |||
| of the warning-values are deleted for this reason, the Warning header | of the warning-values are deleted for this reason, the Warning header | |||
| MUST be deleted as well. | MUST be deleted as well. | |||
| 4. IANA Considerations | 16. IANA Considerations | |||
| TBD. | TBD. | |||
| 5. Security Considerations | 17. Security Considerations | |||
| Caching proxies provide additional potential vulnerabilities, since | Caching proxies provide additional potential vulnerabilities, since | |||
| the contents of the cache represent an attractive target for | the contents of the cache represent an attractive target for | |||
| malicious exploitation. Because cache contents persist after an HTTP | malicious exploitation. Because cache contents persist after an HTTP | |||
| request is complete, an attack on the cache can reveal information | request is complete, an attack on the cache can reveal information | |||
| long after a user believes that the information has been removed from | long after a user believes that the information has been removed from | |||
| the network. Therefore, cache contents should be protected as | the network. Therefore, cache contents should be protected as | |||
| sensitive information. | sensitive information. | |||
| 6. Acknowledgments | 18. Acknowledgments | |||
| Much of the content and presentation of the caching design is due to | Much of the content and presentation of the caching design is due to | |||
| suggestions and comments from individuals including: Shel Kaphan, | suggestions and comments from individuals including: Shel Kaphan, | |||
| Paul Leach, Koen Holtman, David Morris, and Larry Masinter. | Paul Leach, Koen Holtman, David Morris, and Larry Masinter. | |||
| Based on an XML translation of RFC 2616 by Julian Reschke. | 19. References | |||
| 7. References | 19.1. Normative References | |||
| [ISO-8859-1] | ||||
| International Organization for Standardization, | ||||
| "Information technology -- 8-bit single-byte coded graphic | ||||
| character sets -- Part 1: Latin alphabet No. 1", ISO/ | ||||
| IEC 8859-1:1998, 1998. | ||||
| [Part1] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., | [Part1] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., | |||
| Masinter, L., Leach, P., and T. Berners-Lee, "HTTP/1.1, | Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed., | |||
| part 1: URIs, Connections, and Message Parsing", | and J. Reschke, Ed., "HTTP/1.1, part 1: URIs, Connections, | |||
| draft-ietf-httpbis-p1-messaging-00 (work in progress), | and Message Parsing", draft-ietf-httpbis-p1-messaging-01 | |||
| December 2007. | (work in progress), January 2008. | |||
| [Part2] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., | [Part2] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., | |||
| Masinter, L., Leach, P., and T. Berners-Lee, "HTTP/1.1, | Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed., | |||
| part 2: Message Semantics", | and J. Reschke, Ed., "HTTP/1.1, part 2: Message | |||
| draft-ietf-httpbis-p2-semantics-00 (work in progress), | Semantics", draft-ietf-httpbis-p2-semantics-01 (work in | |||
| December 2007. | progress), January 2008. | |||
| [Part3] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., | [Part3] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., | |||
| Masinter, L., Leach, P., and T. Berners-Lee, "HTTP/1.1, | Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed., | |||
| part 3: Message Payload and Content Negotiation", | and J. Reschke, Ed., "HTTP/1.1, part 3: Message Payload | |||
| draft-ietf-httpbis-p3-payload-00 (work in progress), | and Content Negotiation", draft-ietf-httpbis-p3-payload-01 | |||
| December 2007. | (work in progress), January 2008. | |||
| [Part4] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., | [Part4] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., | |||
| Masinter, L., Leach, P., and T. Berners-Lee, "HTTP/1.1, | Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed., | |||
| part 4: Conditional Requests", | and J. Reschke, Ed., "HTTP/1.1, part 4: Conditional | |||
| draft-ietf-httpbis-p4-conditional-00 (work in progress), | Requests", draft-ietf-httpbis-p4-conditional-01 (work in | |||
| December 2007. | progress), January 2008. | |||
| [Part5] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., | [Part5] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., | |||
| Masinter, L., Leach, P., and T. Berners-Lee, "HTTP/1.1, | Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed., | |||
| part 5: Range Requests and Partial Responses", | and J. Reschke, Ed., "HTTP/1.1, part 5: Range Requests and | |||
| draft-ietf-httpbis-p5-range-00 (work in progress), | Partial Responses", draft-ietf-httpbis-p5-range-01 (work | |||
| December 2007. | in progress), January 2008. | |||
| [Part7] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., | [Part7] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., | |||
| Masinter, L., Leach, P., and T. Berners-Lee, "HTTP/1.1, | Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed., | |||
| part 7: Authentication", draft-ietf-httpbis-p7-auth-00 | and J. Reschke, Ed., "HTTP/1.1, part 7: Authentication", | |||
| (work in progress), December 2007. | draft-ietf-httpbis-p7-auth-01 (work in progress), | |||
| January 2008. | ||||
| [RFC1305] Mills, D., "Network Time Protocol (Version 3) | ||||
| Specification, Implementation", RFC 1305, March 1992. | ||||
| [RFC2047] Moore, K., "MIME (Multipurpose Internet Mail Extensions) | [RFC2047] Moore, K., "MIME (Multipurpose Internet Mail Extensions) | |||
| Part Three: Message Header Extensions for Non-ASCII Text", | Part Three: Message Header Extensions for Non-ASCII Text", | |||
| RFC 2047, November 1996. | RFC 2047, November 1996. | |||
| [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | ||||
| Requirement Levels", BCP 14, RFC 2119, March 1997. | ||||
| 19.2. Informative References | ||||
| [RFC1305] Mills, D., "Network Time Protocol (Version 3) | ||||
| Specification, Implementation", RFC 1305, March 1992. | ||||
| [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., | [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., | |||
| Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext | Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext | |||
| Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. | Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. | |||
| Appendix A. Changes from RFC 2068 | Appendix A. Compatibility with Previous Versions | |||
| A.1. Changes from RFC 2068 | ||||
| A case was missed in the Cache-Control model of HTTP/1.1; s-maxage | A case was missed in the Cache-Control model of HTTP/1.1; s-maxage | |||
| was introduced to add this missing case. (Sections 2.4, 3.2, 3.2.3) | was introduced to add this missing case. (Sections 5, 15.2, 15.2.3) | |||
| Transfer-coding and message lengths all interact in ways that | ||||
| required fixing exactly when chunked encoding is used (to allow for | ||||
| transfer encoding that may not be self delimiting); it was important | ||||
| to straighten out exactly how message lengths are computed. | ||||
| (Section 6.2, see also [Part1], [Part3] and [Part5]) | ||||
| Proxies should be able to add Content-Length when appropriate. | ||||
| (Section 6.2) | ||||
| Range request responses would become very verbose if all meta-data | ||||
| were always returned; by allowing the server to only send needed | ||||
| headers in a 206 response, this problem can be avoided. | ||||
| (Section 6.3) | ||||
| The Cache-Control: max-age directive was not properly defined for | The Cache-Control: max-age directive was not properly defined for | |||
| responses. (Section 3.2.3) | responses. (Section 15.2.3) | |||
| Warnings could be cached incorrectly, or not updated appropriately. | Warnings could be cached incorrectly, or not updated appropriately. | |||
| (Section 2.1.2, 2.2.4, 2.5.2, 2.5.3, 3.2.3, and 3.6) Warning also | (Section 2.2, 3.4, 6.2, 6.3, 15.2.3, and 15.6) Warning also needed to | |||
| needed to be a general header, as PUT or other methods may have need | be a general header, as PUT or other methods may have need for it in | |||
| for it in requests. | requests. | |||
| A.2. Changes from RFC 2616 | ||||
| Clarify denial of service attack avoidance requirement. (Section 11) | ||||
| Appendix B. Change Log (to be removed by RFC Editor before publication) | ||||
| B.1. Since RFC2616 | ||||
| Extracted relevant partitions from [RFC2616]. | ||||
| B.2. Since draft-ietf-httpbis-p6-cache-00 | ||||
| Closed issues: | ||||
| o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/9>: "Trailer" | ||||
| (<http://purl.org/NET/http-errata#trailer-hop>) | ||||
| o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/12>: | ||||
| "Invalidation after Update or Delete" | ||||
| (<http://purl.org/NET/http-errata#invalidupd>) | ||||
| o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/35>: "Normative | ||||
| and Informative references" | ||||
| o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/48>: "Date | ||||
| reference typo" | ||||
| o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/49>: | ||||
| "Connection header text" | ||||
| o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/65>: | ||||
| "Informative references" | ||||
| o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/66>: | ||||
| "ISO-8859-1 Reference" | ||||
| o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/86>: "Normative | ||||
| up-to-date references" | ||||
| o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/87>: "typo in | ||||
| 13.2.2" | ||||
| Other changes: | ||||
| o Use names of RFC4234 core rules DQUOTE and HTAB (work in progress | ||||
| on <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/36>) | ||||
| Index | Index | |||
| A | A | |||
| age 5 | age 7 | |||
| Age header 27 | Age header 27 | |||
| C | C | |||
| cache 5 | cache 5 | |||
| Cache Directives | Cache Directives | |||
| max-age 32 | ||||
| max-age 33 | max-age 33 | |||
| max-stale 32 | max-age 34 | |||
| min-fresh 32 | max-stale 33 | |||
| must-revalidate 34 | min-fresh 33 | |||
| no-cache 29 | must-revalidate 35 | |||
| no-store 30 | no-cache 30 | |||
| no-transform 35 | no-store 31 | |||
| only-if-cached 34 | no-transform 36 | |||
| private 29 | only-if-cached 35 | |||
| proxy-revalidate 35 | private 30 | |||
| public 29 | proxy-revalidate 36 | |||
| s-maxage 31 | public 30 | |||
| Cache-Control header 27 | s-maxage 32 | |||
| cacheable 5 | Cache-Control header 28 | |||
| cacheable 6 | ||||
| E | E | |||
| Expires header 37 | Expires header 37 | |||
| explicit expiration time 5 | explicit expiration time 6 | |||
| F | F | |||
| first-hand 5 | first-hand 6 | |||
| fresh 6 | fresh 7 | |||
| freshness lifetime 6 | freshness lifetime 7 | |||
| G | G | |||
| Grammar | Grammar | |||
| Age 27 | Age 27 | |||
| age-value 27 | age-value 27 | |||
| Cache-Control 28 | Cache-Control 29 | |||
| cache-directive 28 | cache-directive 29 | |||
| cache-extension 28 | cache-extension 29 | |||
| cache-request-directive 28 | cache-request-directive 29 | |||
| cache-response-directive 28 | cache-response-directive 29 | |||
| delta-seconds 6 | delta-seconds 27 | |||
| Expires 37 | Expires 38 | |||
| extension-pragma 38 | extension-pragma 39 | |||
| Pragma 38 | Pragma 39 | |||
| pragma-directive 38 | pragma-directive 39 | |||
| Vary 38 | Vary 39 | |||
| warn-agent 40 | warn-agent 40 | |||
| warn-code 40 | warn-code 40 | |||
| warn-date 40 | warn-date 40 | |||
| warn-text 40 | warn-text 40 | |||
| Warning 40 | Warning 40 | |||
| warning-value 40 | warning-value 40 | |||
| H | H | |||
| Headers | Headers | |||
| Age 27 | Age 27 | |||
| Cache-Control 27 | Cache-Control 28 | |||
| Expires 37 | Expires 37 | |||
| Pragma 38 | Pragma 38 | |||
| Vary 38 | Vary 39 | |||
| Warning 39 | Warning 40 | |||
| heuristic expiration time 5 | heuristic expiration time 7 | |||
| M | M | |||
| max-age | max-age | |||
| Cache Directive 32 | ||||
| Cache Directive 33 | Cache Directive 33 | |||
| Cache Directive 34 | ||||
| max-stale | max-stale | |||
| Cache Directive 32 | Cache Directive 33 | |||
| min-fresh | min-fresh | |||
| Cache Directive 32 | Cache Directive 33 | |||
| must-revalidate | must-revalidate | |||
| Cache Directive 34 | Cache Directive 35 | |||
| N | N | |||
| no-cache | no-cache | |||
| Cache Directive 29 | ||||
| no-store | ||||
| Cache Directive 30 | Cache Directive 30 | |||
| no-store | ||||
| Cache Directive 31 | ||||
| no-transform | no-transform | |||
| Cache Directive 35 | Cache Directive 36 | |||
| O | O | |||
| only-if-cached | only-if-cached | |||
| Cache Directive 34 | Cache Directive 35 | |||
| P | P | |||
| Pragma header 38 | Pragma header 38 | |||
| private | private | |||
| Cache Directive 29 | Cache Directive 30 | |||
| proxy-revalidate | proxy-revalidate | |||
| Cache Directive 35 | Cache Directive 36 | |||
| public | public | |||
| Cache Directive 29 | Cache Directive 30 | |||
| S | S | |||
| s-maxage | s-maxage | |||
| Cache Directive 31 | Cache Directive 32 | |||
| semantically transparent 6 | semantically transparent 5 | |||
| stale 6 | stale 7 | |||
| V | V | |||
| validator 6 | validator 7 | |||
| Vary header 38 | Vary header 39 | |||
| W | W | |||
| Warning header 39 | Warning header 40 | |||
| Authors' Addresses | Authors' Addresses | |||
| Roy T. Fielding (editor) | Roy T. Fielding (editor) | |||
| Day Software | Day Software | |||
| 23 Corporate Plaza DR, Suite 280 | 23 Corporate Plaza DR, Suite 280 | |||
| Newport Beach, CA 92660 | Newport Beach, CA 92660 | |||
| USA | USA | |||
| Phone: +1-949-706-5300 | Phone: +1-949-706-5300 | |||
| skipping to change at page 49, line 5 | skipping to change at page 50, line 31 | |||
| World Wide Web Consortium | World Wide Web Consortium | |||
| MIT Computer Science and Artificial Intelligence Laboratory | MIT Computer Science and Artificial Intelligence Laboratory | |||
| The Stata Center, Building 32 | The Stata Center, Building 32 | |||
| 32 Vassar Street | 32 Vassar Street | |||
| Cambridge, MA 02139 | Cambridge, MA 02139 | |||
| USA | USA | |||
| Email: timbl@w3.org | Email: timbl@w3.org | |||
| URI: http://www.w3.org/People/Berners-Lee/ | URI: http://www.w3.org/People/Berners-Lee/ | |||
| Yves Lafon (editor) | ||||
| World Wide Web Consortium | ||||
| W3C / ERCIM | ||||
| 2004, rte des Lucioles | ||||
| Sophia-Antipolis, AM 06902 | ||||
| France | ||||
| Email: ylafon@w3.org | ||||
| URI: http://www.raubacapeu.net/people/yves/ | ||||
| Julian F. Reschke (editor) | ||||
| greenbytes GmbH | ||||
| Hafenweg 16 | ||||
| Muenster, NW 48155 | ||||
| Germany | ||||
| Phone: +49 251 2807760 | ||||
| Fax: +49 251 2807761 | ||||
| Email: julian.reschke@greenbytes.de | ||||
| URI: http://greenbytes.de/tech/webdav/ | ||||
| Full Copyright Statement | Full Copyright Statement | |||
| Copyright (C) The IETF Trust (2007). | Copyright (C) The IETF Trust (2008). | |||
| This document is subject to the rights, licenses and restrictions | This document is subject to the rights, licenses and restrictions | |||
| contained in BCP 78, and except as set forth therein, the authors | contained in BCP 78, and except as set forth therein, the authors | |||
| retain all their rights. | retain all their rights. | |||
| This document and the information contained herein are provided on an | This document and the information contained herein are provided on an | |||
| "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS | "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS | |||
| OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND | OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND | |||
| THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS | THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS | |||
| OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF | OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF | |||
| End of changes. 164 change blocks. | ||||
| 407 lines changed or deleted | 508 lines changed or added | |||
This html diff was produced by rfcdiff 1.34. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||