rfc2616.txt   draft-lafon-rfc2616bis-00.txt 
Network Working Group R. Fielding Network Working Group Y. Lafon
Request for Comments: 2616 UC Irvine Internet-Draft W3C
Obsoletes: 2068 J. Gettys Obsoletes: 2616 (if approved) J. Reschke
Category: Standards Track Compaq/W3C Intended status: Standards Track greenbytes
J. Mogul Expires: April 16, 2007 October 13, 2006
Compaq
H. Frystyk
W3C/MIT
L. Masinter
Xerox
P. Leach
Microsoft
T. Berners-Lee
W3C/MIT
June 1999
Hypertext Transfer Protocol -- HTTP/1.1 Hypertext Transfer Protocol -- HTTP/1.1
draft-lafon-rfc2616bis-00
Status of this Memo Status of this Memo
This document specifies an Internet standards track protocol for the By submitting this Internet-Draft, each author represents that any
Internet community, and requests discussion and suggestions for applicable patent or other IPR claims of which he or she is aware
improvements. Please refer to the current edition of the "Internet have been or will be disclosed, and any of which he or she becomes
Official Protocol Standards" (STD 1) for the standardization state aware will be disclosed, in accordance with Section 6 of BCP 79.
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet-
Drafts.
Copyright (C) The Internet Society (1999). All Rights Reserved. Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html.
This Internet-Draft will expire on April 16, 2007.
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. It is a generic, stateless, protocol which can be used for systems. It is a generic, stateless, protocol which can be used for
many tasks beyond its use for hypertext, such as name servers and many tasks beyond its use for hypertext, such as name servers and
distributed object management systems, through extension of its distributed object management systems, through extension of its
request methods, error codes and headers [47]. A feature of HTTP is request methods, error codes and headers [47]. A feature of HTTP is
the typing and negotiation of data representation, allowing systems the typing and negotiation of data representation, allowing systems
to be built independently of the data being transferred. to be built independently of the data being transferred.
HTTP has been in use by the World-Wide Web global information HTTP has been in use by the World-Wide Web global information
initiative since 1990. This specification defines the protocol initiative since 1990. This specification defines the protocol
referred to as "HTTP/1.1", and is an update to RFC 2068 [33]. referred to as "HTTP/1.1", and is an update to RFC2616.
Editorial Note (To be removed by RFC Editor before publication)
Distribution of this document is unlimited. Please send comments to
the Hypertext Transfer Protocol (HTTP) mailing list at
ietf-http-wg@w3.org [51], which may be joined by sending a message
with subject "subscribe" to ietf-http-wg-request@w3.org [52].
Discussions of the HTTP working group are archived at
<http://lists.w3.org/Archives/Public/ietf-http-wg/>. XML versions,
latest edits and the issues list for this document are available from
<http://www.w3.org/Protocols/HTTP/1.1/>.
The purpose of this document is to revise RFC2616 ([50]), doing only
minimal corrections. For now, it is not planned to advance the
standards level of HTTP, thus - if published - the specification will
still be a "Proposed Standard" (see [46]).
The current plan is to incorporate known errata, and to update the
specification text according to the current IETF publication
guidelines. In particular:
o Incorporate the corrections collected in the RFC2616 errata
document (<http://skrb.org/ietf/http_errata.html>) and potentially
newly discovered and agreed-upon errata.
o Update references, and re-classify them into "Normative" and
"Informative", based on the prior work done by Jim Gettys in
<http://tools.ietf.org/html/draft-gettys-http-v11-spec-rev-00>.
This document is based on a variant of the original RFC2616
specification formatted using Marshall T. Rose's "xml2rfc" tool (see
<http://xml.resource.org>) and therefore deviates from the original
text in word wrapping, page breaks, list formatting, reference
formatting, whitespace usage and appendix numbering. Otherwise, it
is supposed to contain an accurate copy of the original specification
text. See <http://www.w3.org/Protocols/HTTP/1.1/
rfc2616bis-00-from-rfc2616.diff.html> for a comparison between both
documents, as generated by "rfcdiff"
(<http://tools.ietf.org/tools/rfcdiff/>).
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 8 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 10
1.1. Purpose . . . . . . . . . . . . . . . . . . . . . . . . 8 1.1. Purpose . . . . . . . . . . . . . . . . . . . . . . . . 10
1.2. Requirements . . . . . . . . . . . . . . . . . . . . . . 8 1.2. Requirements . . . . . . . . . . . . . . . . . . . . . . 10
1.3. Terminology . . . . . . . . . . . . . . . . . . . . . . 9 1.3. Terminology . . . . . . . . . . . . . . . . . . . . . . 11
1.4. Overall Operation . . . . . . . . . . . . . . . . . . . 13 1.4. Overall Operation . . . . . . . . . . . . . . . . . . . 15
2. Notational Conventions and Generic Grammar . . . . . . . . . 16 2. Notational Conventions and Generic Grammar . . . . . . . . . 18
2.1. Augmented BNF . . . . . . . . . . . . . . . . . . . . . 16 2.1. Augmented BNF . . . . . . . . . . . . . . . . . . . . . 18
2.2. Basic Rules . . . . . . . . . . . . . . . . . . . . . . 18 2.2. Basic Rules . . . . . . . . . . . . . . . . . . . . . . 20
3. Protocol Parameters . . . . . . . . . . . . . . . . . . . . . 20 3. Protocol Parameters . . . . . . . . . . . . . . . . . . . . . 22
3.1. HTTP Version . . . . . . . . . . . . . . . . . . . . . . 20 3.1. HTTP Version . . . . . . . . . . . . . . . . . . . . . . 22
3.2. Uniform Resource Identifiers . . . . . . . . . . . . . . 21 3.2. Uniform Resource Identifiers . . . . . . . . . . . . . . 23
3.2.1. General Syntax . . . . . . . . . . . . . . . . . . . 21 3.2.1. General Syntax . . . . . . . . . . . . . . . . . . . 23
3.2.2. http URL . . . . . . . . . . . . . . . . . . . . . . 21 3.2.2. http URL . . . . . . . . . . . . . . . . . . . . . . 23
3.2.3. URI Comparison . . . . . . . . . . . . . . . . . . . 22 3.2.3. URI Comparison . . . . . . . . . . . . . . . . . . . 24
3.3. Date/Time Formats . . . . . . . . . . . . . . . . . . . 22 3.3. Date/Time Formats . . . . . . . . . . . . . . . . . . . 24
3.3.1. Full Date . . . . . . . . . . . . . . . . . . . . . 22 3.3.1. Full Date . . . . . . . . . . . . . . . . . . . . . 24
3.3.2. Delta Seconds . . . . . . . . . . . . . . . . . . . 24 3.3.2. Delta Seconds . . . . . . . . . . . . . . . . . . . 26
3.4. Character Sets . . . . . . . . . . . . . . . . . . . . . 24 3.4. Character Sets . . . . . . . . . . . . . . . . . . . . . 26
3.4.1. Missing Charset . . . . . . . . . . . . . . . . . . 25 3.4.1. Missing Charset . . . . . . . . . . . . . . . . . . 27
3.5. Content Codings . . . . . . . . . . . . . . . . . . . . 25 3.5. Content Codings . . . . . . . . . . . . . . . . . . . . 27
3.6. Transfer Codings . . . . . . . . . . . . . . . . . . . . 26 3.6. Transfer Codings . . . . . . . . . . . . . . . . . . . . 28
3.6.1. Chunked Transfer Coding . . . . . . . . . . . . . . 27 3.6.1. Chunked Transfer Coding . . . . . . . . . . . . . . 29
3.7. Media Types . . . . . . . . . . . . . . . . . . . . . . 29 3.7. Media Types . . . . . . . . . . . . . . . . . . . . . . 31
3.7.1. Canonicalization and Text Defaults . . . . . . . . . 29 3.7.1. Canonicalization and Text Defaults . . . . . . . . . 31
3.7.2. Multipart Types . . . . . . . . . . . . . . . . . . 30 3.7.2. Multipart Types . . . . . . . . . . . . . . . . . . 32
3.8. Product Tokens . . . . . . . . . . . . . . . . . . . . . 31 3.8. Product Tokens . . . . . . . . . . . . . . . . . . . . . 33
3.9. Quality Values . . . . . . . . . . . . . . . . . . . . . 31 3.9. Quality Values . . . . . . . . . . . . . . . . . . . . . 33
3.10. Language Tags . . . . . . . . . . . . . . . . . . . . . 32 3.10. Language Tags . . . . . . . . . . . . . . . . . . . . . 34
3.11. Entity Tags . . . . . . . . . . . . . . . . . . . . . . 32 3.11. Entity Tags . . . . . . . . . . . . . . . . . . . . . . 34
3.12. Range Units . . . . . . . . . . . . . . . . . . . . . . 33 3.12. Range Units . . . . . . . . . . . . . . . . . . . . . . 35
4. HTTP Message . . . . . . . . . . . . . . . . . . . . . . . . 36
4.1. Message Types . . . . . . . . . . . . . . . . . . . . . 36
4.2. Message Headers . . . . . . . . . . . . . . . . . . . . 36
4.3. Message Body . . . . . . . . . . . . . . . . . . . . . . 37
4.4. Message Length . . . . . . . . . . . . . . . . . . . . . 38
4.5. General Header Fields . . . . . . . . . . . . . . . . . 39
5. Request . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.1. Request-Line . . . . . . . . . . . . . . . . . . . . . . 41
5.1.1. Method . . . . . . . . . . . . . . . . . . . . . . . 41
5.1.2. Request-URI . . . . . . . . . . . . . . . . . . . . 42
5.2. The Resource Identified by a Request . . . . . . . . . . 43
5.3. Request Header Fields . . . . . . . . . . . . . . . . . 44
6. Response . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.1. Status-Line . . . . . . . . . . . . . . . . . . . . . . 45
6.1.1. Status Code and Reason Phrase . . . . . . . . . . . 45
6.2. Response Header Fields . . . . . . . . . . . . . . . . . 48
4. HTTP Message . . . . . . . . . . . . . . . . . . . . . . . . 34 7. Entity . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.1. Message Types . . . . . . . . . . . . . . . . . . . . . 34 7.1. Entity Header Fields . . . . . . . . . . . . . . . . . . 49
4.2. Message Headers . . . . . . . . . . . . . . . . . . . . 34 7.2. Entity Body . . . . . . . . . . . . . . . . . . . . . . 49
4.3. Message Body . . . . . . . . . . . . . . . . . . . . . . 35 7.2.1. Type . . . . . . . . . . . . . . . . . . . . . . . . 50
4.4. Message Length . . . . . . . . . . . . . . . . . . . . . 36 7.2.2. Entity Length . . . . . . . . . . . . . . . . . . . 50
4.5. General Header Fields . . . . . . . . . . . . . . . . . 37 8. Connections . . . . . . . . . . . . . . . . . . . . . . . . . 51
5. Request . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 8.1. Persistent Connections . . . . . . . . . . . . . . . . . 51
5.1. Request-Line . . . . . . . . . . . . . . . . . . . . . . 39 8.1.1. Purpose . . . . . . . . . . . . . . . . . . . . . . 51
5.1.1. Method . . . . . . . . . . . . . . . . . . . . . . . 39 8.1.2. Overall Operation . . . . . . . . . . . . . . . . . 51
5.1.2. Request-URI . . . . . . . . . . . . . . . . . . . . 40 8.1.3. Proxy Servers . . . . . . . . . . . . . . . . . . . 53
5.2. The Resource Identified by a Request . . . . . . . . . . 41 8.1.4. Practical Considerations . . . . . . . . . . . . . . 53
5.3. Request Header Fields . . . . . . . . . . . . . . . . . 42 8.2. Message Transmission Requirements . . . . . . . . . . . 54
6. Response . . . . . . . . . . . . . . . . . . . . . . . . . . 43 8.2.1. Persistent Connections and Flow Control . . . . . . 54
6.1. Status-Line . . . . . . . . . . . . . . . . . . . . . . 43 8.2.2. Monitoring Connections for Error Status Messages . . 54
6.1.1. Status Code and Reason Phrase . . . . . . . . . . . 43 8.2.3. Use of the 100 (Continue) Status . . . . . . . . . . 55
6.2. Response Header Fields . . . . . . . . . . . . . . . . . 46
7. Entity . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
7.1. Entity Header Fields . . . . . . . . . . . . . . . . . . 47
7.2. Entity Body . . . . . . . . . . . . . . . . . . . . . . 47
7.2.1. Type . . . . . . . . . . . . . . . . . . . . . . . . 48
7.2.2. Entity Length . . . . . . . . . . . . . . . . . . . 48
8. Connections . . . . . . . . . . . . . . . . . . . . . . . . . 49
8.1. Persistent Connections . . . . . . . . . . . . . . . . . 49
8.1.1. Purpose . . . . . . . . . . . . . . . . . . . . . . 49
8.1.2. Overall Operation . . . . . . . . . . . . . . . . . 49
8.1.3. Proxy Servers . . . . . . . . . . . . . . . . . . . 51
8.1.4. Practical Considerations . . . . . . . . . . . . . . 51
8.2. Message Transmission Requirements . . . . . . . . . . . 52
8.2.1. Persistent Connections and Flow Control . . . . . . 52
8.2.2. Monitoring Connections for Error Status Messages . . 52
8.2.3. Use of the 100 (Continue) Status . . . . . . . . . . 53
8.2.4. Client Behavior if Server Prematurely Closes 8.2.4. Client Behavior if Server Prematurely Closes
Connection . . . . . . . . . . . . . . . . . . . . . 55 Connection . . . . . . . . . . . . . . . . . . . . . 57
9. Method Definitions . . . . . . . . . . . . . . . . . . . . . 56 9. Method Definitions . . . . . . . . . . . . . . . . . . . . . 58
9.1. Safe and Idempotent Methods . . . . . . . . . . . . . . 56 9.1. Safe and Idempotent Methods . . . . . . . . . . . . . . 58
9.1.1. Safe Methods . . . . . . . . . . . . . . . . . . . . 56 9.1.1. Safe Methods . . . . . . . . . . . . . . . . . . . . 58
9.1.2. Idempotent Methods . . . . . . . . . . . . . . . . . 56 9.1.2. Idempotent Methods . . . . . . . . . . . . . . . . . 58
9.2. OPTIONS . . . . . . . . . . . . . . . . . . . . . . . . 57 9.2. OPTIONS . . . . . . . . . . . . . . . . . . . . . . . . 59
9.3. GET . . . . . . . . . . . . . . . . . . . . . . . . . . 58 9.3. GET . . . . . . . . . . . . . . . . . . . . . . . . . . 60
9.4. HEAD . . . . . . . . . . . . . . . . . . . . . . . . . . 58 9.4. HEAD . . . . . . . . . . . . . . . . . . . . . . . . . . 60
9.5. POST . . . . . . . . . . . . . . . . . . . . . . . . . . 59 9.5. POST . . . . . . . . . . . . . . . . . . . . . . . . . . 61
9.6. PUT . . . . . . . . . . . . . . . . . . . . . . . . . . 60 9.6. PUT . . . . . . . . . . . . . . . . . . . . . . . . . . 62
9.7. DELETE . . . . . . . . . . . . . . . . . . . . . . . . . 61 9.7. DELETE . . . . . . . . . . . . . . . . . . . . . . . . . 63
9.8. TRACE . . . . . . . . . . . . . . . . . . . . . . . . . 61 9.8. TRACE . . . . . . . . . . . . . . . . . . . . . . . . . 63
9.9. CONNECT . . . . . . . . . . . . . . . . . . . . . . . . 62 9.9. CONNECT . . . . . . . . . . . . . . . . . . . . . . . . 64
10. Status Code Definitions . . . . . . . . . . . . . . . . . . . 63 10. Status Code Definitions . . . . . . . . . . . . . . . . . . . 65
10.1. Informational 1xx . . . . . . . . . . . . . . . . . . . 63 10.1. Informational 1xx . . . . . . . . . . . . . . . . . . . 65
10.1.1. 100 Continue . . . . . . . . . . . . . . . . . . . . 63 10.1.1. 100 Continue . . . . . . . . . . . . . . . . . . . . 65
10.1.2. 101 Switching Protocols . . . . . . . . . . . . . . 63 10.1.2. 101 Switching Protocols . . . . . . . . . . . . . . 65
10.2. Successful 2xx . . . . . . . . . . . . . . . . . . . . . 64 10.2. Successful 2xx . . . . . . . . . . . . . . . . . . . . . 66
10.2.1. 200 OK . . . . . . . . . . . . . . . . . . . . . . . 64 10.2.1. 200 OK . . . . . . . . . . . . . . . . . . . . . . . 66
10.2.2. 201 Created . . . . . . . . . . . . . . . . . . . . 64 10.2.2. 201 Created . . . . . . . . . . . . . . . . . . . . 66
10.2.3. 202 Accepted . . . . . . . . . . . . . . . . . . . . 64 10.2.3. 202 Accepted . . . . . . . . . . . . . . . . . . . . 66
10.2.4. 203 Non-Authoritative Information . . . . . . . . . 65 10.2.4. 203 Non-Authoritative Information . . . . . . . . . 67
10.2.5. 204 No Content . . . . . . . . . . . . . . . . . . . 65 10.2.5. 204 No Content . . . . . . . . . . . . . . . . . . . 67
10.2.6. 205 Reset Content . . . . . . . . . . . . . . . . . 65 10.2.6. 205 Reset Content . . . . . . . . . . . . . . . . . 67
10.2.7. 206 Partial Content . . . . . . . . . . . . . . . . 66 10.2.7. 206 Partial Content . . . . . . . . . . . . . . . . 68
10.3. Redirection 3xx . . . . . . . . . . . . . . . . . . . . 66 10.3. Redirection 3xx . . . . . . . . . . . . . . . . . . . . 68
10.3.1. 300 Multiple Choices . . . . . . . . . . . . . . . . 67 10.3.1. 300 Multiple Choices . . . . . . . . . . . . . . . . 69
10.3.2. 301 Moved Permanently . . . . . . . . . . . . . . . 67 10.3.2. 301 Moved Permanently . . . . . . . . . . . . . . . 69
10.3.3. 302 Found . . . . . . . . . . . . . . . . . . . . . 68 10.3.3. 302 Found . . . . . . . . . . . . . . . . . . . . . 70
10.3.4. 303 See Other . . . . . . . . . . . . . . . . . . . 68 10.3.4. 303 See Other . . . . . . . . . . . . . . . . . . . 70
10.3.5. 304 Not Modified . . . . . . . . . . . . . . . . . . 69 10.3.5. 304 Not Modified . . . . . . . . . . . . . . . . . . 71
10.3.6. 305 Use Proxy . . . . . . . . . . . . . . . . . . . 69 10.3.6. 305 Use Proxy . . . . . . . . . . . . . . . . . . . 71
10.3.7. 306 (Unused) . . . . . . . . . . . . . . . . . . . . 70 10.3.7. 306 (Unused) . . . . . . . . . . . . . . . . . . . . 72
10.3.8. 307 Temporary Redirect . . . . . . . . . . . . . . . 70 10.3.8. 307 Temporary Redirect . . . . . . . . . . . . . . . 72
10.4. Client Error 4xx . . . . . . . . . . . . . . . . . . . . 70 10.4. Client Error 4xx . . . . . . . . . . . . . . . . . . . . 72
10.4.1. 400 Bad Request . . . . . . . . . . . . . . . . . . 71 10.4.1. 400 Bad Request . . . . . . . . . . . . . . . . . . 73
10.4.2. 401 Unauthorized . . . . . . . . . . . . . . . . . . 71 10.4.2. 401 Unauthorized . . . . . . . . . . . . . . . . . . 73
10.4.3. 402 Payment Required . . . . . . . . . . . . . . . . 71 10.4.3. 402 Payment Required . . . . . . . . . . . . . . . . 73
10.4.4. 403 Forbidden . . . . . . . . . . . . . . . . . . . 71 10.4.4. 403 Forbidden . . . . . . . . . . . . . . . . . . . 73
10.4.5. 404 Not Found . . . . . . . . . . . . . . . . . . . 71 10.4.5. 404 Not Found . . . . . . . . . . . . . . . . . . . 73
10.4.6. 405 Method Not Allowed . . . . . . . . . . . . . . . 72 10.4.6. 405 Method Not Allowed . . . . . . . . . . . . . . . 74
10.4.7. 406 Not Acceptable . . . . . . . . . . . . . . . . . 72 10.4.7. 406 Not Acceptable . . . . . . . . . . . . . . . . . 74
10.4.8. 407 Proxy Authentication Required . . . . . . . . . 72 10.4.8. 407 Proxy Authentication Required . . . . . . . . . 74
10.4.9. 408 Request Timeout . . . . . . . . . . . . . . . . 73 10.4.9. 408 Request Timeout . . . . . . . . . . . . . . . . 75
10.4.10. 409 Conflict . . . . . . . . . . . . . . . . . . . . 73 10.4.10. 409 Conflict . . . . . . . . . . . . . . . . . . . . 75
10.4.11. 410 Gone . . . . . . . . . . . . . . . . . . . . . . 73 10.4.11. 410 Gone . . . . . . . . . . . . . . . . . . . . . . 75
10.4.12. 411 Length Required . . . . . . . . . . . . . . . . 74 10.4.12. 411 Length Required . . . . . . . . . . . . . . . . 76
10.4.13. 412 Precondition Failed . . . . . . . . . . . . . . 74 10.4.13. 412 Precondition Failed . . . . . . . . . . . . . . 76
10.4.14. 413 Request Entity Too Large . . . . . . . . . . . . 74 10.4.14. 413 Request Entity Too Large . . . . . . . . . . . . 76
10.4.15. 414 Request-URI Too Long . . . . . . . . . . . . . . 74 10.4.15. 414 Request-URI Too Long . . . . . . . . . . . . . . 76
10.4.16. 415 Unsupported Media Type . . . . . . . . . . . . . 74 10.4.16. 415 Unsupported Media Type . . . . . . . . . . . . . 76
10.4.17. 416 Requested Range Not Satisfiable . . . . . . . . 74 10.4.17. 416 Requested Range Not Satisfiable . . . . . . . . 76
10.4.18. 417 Expectation Failed . . . . . . . . . . . . . . . 75 10.4.18. 417 Expectation Failed . . . . . . . . . . . . . . . 77
10.5. Server Error 5xx . . . . . . . . . . . . . . . . . . . . 75 10.5. Server Error 5xx . . . . . . . . . . . . . . . . . . . . 77
10.5.1. 500 Internal Server Error . . . . . . . . . . . . . 75 10.5.1. 500 Internal Server Error . . . . . . . . . . . . . 77
10.5.2. 501 Not Implemented . . . . . . . . . . . . . . . . 75 10.5.2. 501 Not Implemented . . . . . . . . . . . . . . . . 77
10.5.3. 502 Bad Gateway . . . . . . . . . . . . . . . . . . 75 10.5.3. 502 Bad Gateway . . . . . . . . . . . . . . . . . . 77
10.5.4. 503 Service Unavailable . . . . . . . . . . . . . . 76 10.5.4. 503 Service Unavailable . . . . . . . . . . . . . . 78
10.5.5. 504 Gateway Timeout . . . . . . . . . . . . . . . . 76 10.5.5. 504 Gateway Timeout . . . . . . . . . . . . . . . . 78
10.5.6. 505 HTTP Version Not Supported . . . . . . . . . . . 76 10.5.6. 505 HTTP Version Not Supported . . . . . . . . . . . 78
11. Access Authentication . . . . . . . . . . . . . . . . . . . . 77 11. Access Authentication . . . . . . . . . . . . . . . . . . . . 79
12. Content Negotiation . . . . . . . . . . . . . . . . . . . . . 78 12. Content Negotiation . . . . . . . . . . . . . . . . . . . . . 80
12.1. Server-driven Negotiation . . . . . . . . . . . . . . . 78 12.1. Server-driven Negotiation . . . . . . . . . . . . . . . 80
12.2. Agent-driven Negotiation . . . . . . . . . . . . . . . . 79 12.2. Agent-driven Negotiation . . . . . . . . . . . . . . . . 81
12.3. Transparent Negotiation . . . . . . . . . . . . . . . . 80 12.3. Transparent Negotiation . . . . . . . . . . . . . . . . 82
13. Caching in HTTP . . . . . . . . . . . . . . . . . . . . . . . 81 13. Caching in HTTP . . . . . . . . . . . . . . . . . . . . . . . 83
13.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 13.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
13.1.1. Cache Correctness . . . . . . . . . . . . . . . . . 82 13.1.1. Cache Correctness . . . . . . . . . . . . . . . . . 84
13.1.2. Warnings . . . . . . . . . . . . . . . . . . . . . . 83 13.1.2. Warnings . . . . . . . . . . . . . . . . . . . . . . 85
13.1.3. Cache-control Mechanisms . . . . . . . . . . . . . . 84 13.1.3. Cache-control Mechanisms . . . . . . . . . . . . . . 86
13.1.4. Explicit User Agent Warnings . . . . . . . . . . . . 84 13.1.4. Explicit User Agent Warnings . . . . . . . . . . . . 86
13.1.5. Exceptions to the Rules and Warnings . . . . . . . . 85 13.1.5. Exceptions to the Rules and Warnings . . . . . . . . 87
13.1.6. Client-controlled Behavior . . . . . . . . . . . . . 85 13.1.6. Client-controlled Behavior . . . . . . . . . . . . . 87
13.2. Expiration Model . . . . . . . . . . . . . . . . . . . . 86 13.2. Expiration Model . . . . . . . . . . . . . . . . . . . . 88
13.2.1. Server-Specified Expiration . . . . . . . . . . . . 86 13.2.1. Server-Specified Expiration . . . . . . . . . . . . 88
13.2.2. Heuristic Expiration . . . . . . . . . . . . . . . . 86 13.2.2. Heuristic Expiration . . . . . . . . . . . . . . . . 88
13.2.3. Age Calculations . . . . . . . . . . . . . . . . . . 87 13.2.3. Age Calculations . . . . . . . . . . . . . . . . . . 89
13.2.4. Expiration Calculations . . . . . . . . . . . . . . 89 13.2.4. Expiration Calculations . . . . . . . . . . . . . . 91
13.2.5. Disambiguating Expiration Values . . . . . . . . . . 90 13.2.5. Disambiguating Expiration Values . . . . . . . . . . 92
13.2.6. Disambiguating Multiple Responses . . . . . . . . . 91 13.2.6. Disambiguating Multiple Responses . . . . . . . . . 93
13.3. Validation Model . . . . . . . . . . . . . . . . . . . . 91
13.3.1. Last-Modified Dates . . . . . . . . . . . . . . . . 92 13.3. Validation Model . . . . . . . . . . . . . . . . . . . . 93
13.3.2. Entity Tag Cache Validators . . . . . . . . . . . . 92 13.3.1. Last-Modified Dates . . . . . . . . . . . . . . . . 94
13.3.3. Weak and Strong Validators . . . . . . . . . . . . . 93 13.3.2. Entity Tag Cache Validators . . . . . . . . . . . . 94
13.3.3. Weak and Strong Validators . . . . . . . . . . . . . 95
13.3.4. Rules for When to Use Entity Tags and 13.3.4. Rules for When to Use Entity Tags and
Last-Modified Dates . . . . . . . . . . . . . . . . 95 Last-Modified Dates . . . . . . . . . . . . . . . . 97
13.3.5. Non-validating Conditionals . . . . . . . . . . . . 97 13.3.5. Non-validating Conditionals . . . . . . . . . . . . 99
13.4. Response Cacheability . . . . . . . . . . . . . . . . . 97 13.4. Response Cacheability . . . . . . . . . . . . . . . . . 99
13.5. Constructing Responses From Caches . . . . . . . . . . . 98 13.5. Constructing Responses From Caches . . . . . . . . . . . 100
13.5.1. End-to-end and Hop-by-hop Headers . . . . . . . . . 98 13.5.1. End-to-end and Hop-by-hop Headers . . . . . . . . . 100
13.5.2. Non-modifiable Headers . . . . . . . . . . . . . . . 99 13.5.2. Non-modifiable Headers . . . . . . . . . . . . . . . 101
13.5.3. Combining Headers . . . . . . . . . . . . . . . . . 100 13.5.3. Combining Headers . . . . . . . . . . . . . . . . . 102
13.5.4. Combining Byte Ranges . . . . . . . . . . . . . . . 101 13.5.4. Combining Byte Ranges . . . . . . . . . . . . . . . 103
13.6. Caching Negotiated Responses . . . . . . . . . . . . . . 102 13.6. Caching Negotiated Responses . . . . . . . . . . . . . . 104
13.7. Shared and Non-Shared Caches . . . . . . . . . . . . . . 103 13.7. Shared and Non-Shared Caches . . . . . . . . . . . . . . 105
13.8. Errors or Incomplete Response Cache Behavior . . . . . . 103 13.8. Errors or Incomplete Response Cache Behavior . . . . . . 105
13.9. Side Effects of GET and HEAD . . . . . . . . . . . . . . 104 13.9. Side Effects of GET and HEAD . . . . . . . . . . . . . . 106
13.10. Invalidation After Updates or Deletions . . . . . . . . 104 13.10. Invalidation After Updates or Deletions . . . . . . . . 106
13.11. Write-Through Mandatory . . . . . . . . . . . . . . . . 105 13.11. Write-Through Mandatory . . . . . . . . . . . . . . . . 107
13.12. Cache Replacement . . . . . . . . . . . . . . . . . . . 105 13.12. Cache Replacement . . . . . . . . . . . . . . . . . . . 107
13.13. History Lists . . . . . . . . . . . . . . . . . . . . . 106 13.13. History Lists . . . . . . . . . . . . . . . . . . . . . 108
14. Header Field Definitions . . . . . . . . . . . . . . . . . . 107 14. Header Field Definitions . . . . . . . . . . . . . . . . . . 109
14.1. Accept . . . . . . . . . . . . . . . . . . . . . . . . . 107 14.1. Accept . . . . . . . . . . . . . . . . . . . . . . . . . 109
14.2. Accept-Charset . . . . . . . . . . . . . . . . . . . . . 109 14.2. Accept-Charset . . . . . . . . . . . . . . . . . . . . . 111
14.3. Accept-Encoding . . . . . . . . . . . . . . . . . . . . 109 14.3. Accept-Encoding . . . . . . . . . . . . . . . . . . . . 111
14.4. Accept-Language . . . . . . . . . . . . . . . . . . . . 111 14.4. Accept-Language . . . . . . . . . . . . . . . . . . . . 113
14.5. Accept-Ranges . . . . . . . . . . . . . . . . . . . . . 112 14.5. Accept-Ranges . . . . . . . . . . . . . . . . . . . . . 114
14.6. Age . . . . . . . . . . . . . . . . . . . . . . . . . . 112 14.6. Age . . . . . . . . . . . . . . . . . . . . . . . . . . 114
14.7. Allow . . . . . . . . . . . . . . . . . . . . . . . . . 113 14.7. Allow . . . . . . . . . . . . . . . . . . . . . . . . . 115
14.8. Authorization . . . . . . . . . . . . . . . . . . . . . 113 14.8. Authorization . . . . . . . . . . . . . . . . . . . . . 116
14.9. Cache-Control . . . . . . . . . . . . . . . . . . . . . 114 14.9. Cache-Control . . . . . . . . . . . . . . . . . . . . . 116
14.9.1. What is Cacheable . . . . . . . . . . . . . . . . . 116 14.9.1. What is Cacheable . . . . . . . . . . . . . . . . . 118
14.9.2. What May be Stored by Caches . . . . . . . . . . . . 117 14.9.2. What May be Stored by Caches . . . . . . . . . . . . 119
14.9.3. Modifications of the Basic Expiration Mechanism . . 118 14.9.3. Modifications of the Basic Expiration Mechanism . . 120
14.9.4. Cache Revalidation and Reload Controls . . . . . . . 120 14.9.4. Cache Revalidation and Reload Controls . . . . . . . 122
14.9.5. No-Transform Directive . . . . . . . . . . . . . . . 122 14.9.5. No-Transform Directive . . . . . . . . . . . . . . . 125
14.9.6. Cache Control Extensions . . . . . . . . . . . . . . 123 14.9.6. Cache Control Extensions . . . . . . . . . . . . . . 125
14.10. Connection . . . . . . . . . . . . . . . . . . . . . . . 124 14.10. Connection . . . . . . . . . . . . . . . . . . . . . . . 126
14.11. Content-Encoding . . . . . . . . . . . . . . . . . . . . 125 14.11. Content-Encoding . . . . . . . . . . . . . . . . . . . . 127
14.12. Content-Language . . . . . . . . . . . . . . . . . . . . 125 14.12. Content-Language . . . . . . . . . . . . . . . . . . . . 128
14.13. Content-Length . . . . . . . . . . . . . . . . . . . . . 126 14.13. Content-Length . . . . . . . . . . . . . . . . . . . . . 128
14.14. Content-Location . . . . . . . . . . . . . . . . . . . . 127 14.14. Content-Location . . . . . . . . . . . . . . . . . . . . 129
14.15. Content-MD5 . . . . . . . . . . . . . . . . . . . . . . 128 14.15. Content-MD5 . . . . . . . . . . . . . . . . . . . . . . 130
14.16. Content-Range . . . . . . . . . . . . . . . . . . . . . 129 14.16. Content-Range . . . . . . . . . . . . . . . . . . . . . 131
14.17. Content-Type . . . . . . . . . . . . . . . . . . . . . . 131 14.17. Content-Type . . . . . . . . . . . . . . . . . . . . . . 133
14.18. Date . . . . . . . . . . . . . . . . . . . . . . . . . . 131 14.18. Date . . . . . . . . . . . . . . . . . . . . . . . . . . 133
14.18.1. Clockless Origin Server Operation . . . . . . . . . 132 14.18.1. Clockless Origin Server Operation . . . . . . . . . 134
14.19. ETag . . . . . . . . . . . . . . . . . . . . . . . . . . 133 14.19. ETag . . . . . . . . . . . . . . . . . . . . . . . . . . 135
14.20. Expect . . . . . . . . . . . . . . . . . . . . . . . . . 133 14.20. Expect . . . . . . . . . . . . . . . . . . . . . . . . . 135
14.21. Expires . . . . . . . . . . . . . . . . . . . . . . . . 134 14.21. Expires . . . . . . . . . . . . . . . . . . . . . . . . 136
14.22. From . . . . . . . . . . . . . . . . . . . . . . . . . . 135 14.22. From . . . . . . . . . . . . . . . . . . . . . . . . . . 137
14.23. Host . . . . . . . . . . . . . . . . . . . . . . . . . . 135 14.23. Host . . . . . . . . . . . . . . . . . . . . . . . . . . 137
14.24. If-Match . . . . . . . . . . . . . . . . . . . . . . . . 136 14.24. If-Match . . . . . . . . . . . . . . . . . . . . . . . . 138
14.25. If-Modified-Since . . . . . . . . . . . . . . . . . . . 137 14.25. If-Modified-Since . . . . . . . . . . . . . . . . . . . 139
14.26. If-None-Match . . . . . . . . . . . . . . . . . . . . . 139 14.26. If-None-Match . . . . . . . . . . . . . . . . . . . . . 141
14.27. If-Range . . . . . . . . . . . . . . . . . . . . . . . . 140 14.27. If-Range . . . . . . . . . . . . . . . . . . . . . . . . 142
14.28. If-Unmodified-Since . . . . . . . . . . . . . . . . . . 141 14.28. If-Unmodified-Since . . . . . . . . . . . . . . . . . . 143
14.29. Last-Modified . . . . . . . . . . . . . . . . . . . . . 141 14.29. Last-Modified . . . . . . . . . . . . . . . . . . . . . 143
14.30. Location . . . . . . . . . . . . . . . . . . . . . . . . 142 14.30. Location . . . . . . . . . . . . . . . . . . . . . . . . 144
14.31. Max-Forwards . . . . . . . . . . . . . . . . . . . . . . 142 14.31. Max-Forwards . . . . . . . . . . . . . . . . . . . . . . 144
14.32. Pragma . . . . . . . . . . . . . . . . . . . . . . . . . 143 14.32. Pragma . . . . . . . . . . . . . . . . . . . . . . . . . 145
14.33. Proxy-Authenticate . . . . . . . . . . . . . . . . . . . 144 14.33. Proxy-Authenticate . . . . . . . . . . . . . . . . . . . 146
14.34. Proxy-Authorization . . . . . . . . . . . . . . . . . . 144 14.34. Proxy-Authorization . . . . . . . . . . . . . . . . . . 146
14.35. Range . . . . . . . . . . . . . . . . . . . . . . . . . 144 14.35. Range . . . . . . . . . . . . . . . . . . . . . . . . . 147
14.35.1. Byte Ranges . . . . . . . . . . . . . . . . . . . . 144 14.35.1. Byte Ranges . . . . . . . . . . . . . . . . . . . . 147
14.35.2. Range Retrieval Requests . . . . . . . . . . . . . . 146 14.35.2. Range Retrieval Requests . . . . . . . . . . . . . . 148
14.36. Referer . . . . . . . . . . . . . . . . . . . . . . . . 147 14.36. Referer . . . . . . . . . . . . . . . . . . . . . . . . 149
14.37. Retry-After . . . . . . . . . . . . . . . . . . . . . . 147 14.37. Retry-After . . . . . . . . . . . . . . . . . . . . . . 150
14.38. Server . . . . . . . . . . . . . . . . . . . . . . . . . 148 14.38. Server . . . . . . . . . . . . . . . . . . . . . . . . . 150
14.39. TE . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 14.39. TE . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
14.40. Trailer . . . . . . . . . . . . . . . . . . . . . . . . 149 14.40. Trailer . . . . . . . . . . . . . . . . . . . . . . . . 152
14.41. Transfer-Encoding . . . . . . . . . . . . . . . . . . . 150 14.41. Transfer-Encoding . . . . . . . . . . . . . . . . . . . 152
14.42. Upgrade . . . . . . . . . . . . . . . . . . . . . . . . 150 14.42. Upgrade . . . . . . . . . . . . . . . . . . . . . . . . 153
14.43. User-Agent . . . . . . . . . . . . . . . . . . . . . . . 152 14.43. User-Agent . . . . . . . . . . . . . . . . . . . . . . . 154
14.44. Vary . . . . . . . . . . . . . . . . . . . . . . . . . . 152 14.44. Vary . . . . . . . . . . . . . . . . . . . . . . . . . . 154
14.45. Via . . . . . . . . . . . . . . . . . . . . . . . . . . 153 14.45. Via . . . . . . . . . . . . . . . . . . . . . . . . . . 155
14.46. Warning . . . . . . . . . . . . . . . . . . . . . . . . 154 14.46. Warning . . . . . . . . . . . . . . . . . . . . . . . . 157
14.47. WWW-Authenticate . . . . . . . . . . . . . . . . . . . . 157 14.47. WWW-Authenticate . . . . . . . . . . . . . . . . . . . . 159
15. Security Considerations . . . . . . . . . . . . . . . . . . . 158 15. Security Considerations . . . . . . . . . . . . . . . . . . . 160
15.1. Personal Information . . . . . . . . . . . . . . . . . . 158 15.1. Personal Information . . . . . . . . . . . . . . . . . . 160
15.1.1. Abuse of Server Log Information . . . . . . . . . . 158 15.1.1. Abuse of Server Log Information . . . . . . . . . . 160
15.1.2. Transfer of Sensitive Information . . . . . . . . . 158 15.1.2. Transfer of Sensitive Information . . . . . . . . . 160
15.1.3. Encoding Sensitive Information in URI's . . . . . . 159 15.1.3. Encoding Sensitive Information in URI's . . . . . . 161
15.1.4. Privacy Issues Connected to Accept Headers . . . . . 160 15.1.4. Privacy Issues Connected to Accept Headers . . . . . 162
15.2. Attacks Based On File and Path Names . . . . . . . . . . 160 15.2. Attacks Based On File and Path Names . . . . . . . . . . 162
15.3. DNS Spoofing . . . . . . . . . . . . . . . . . . . . . . 161 15.3. DNS Spoofing . . . . . . . . . . . . . . . . . . . . . . 163
15.4. Location Headers and Spoofing . . . . . . . . . . . . . 161 15.4. Location Headers and Spoofing . . . . . . . . . . . . . 163
15.5. Content-Disposition Issues . . . . . . . . . . . . . . . 162 15.5. Content-Disposition Issues . . . . . . . . . . . . . . . 164
15.6. Authentication Credentials and Idle Clients . . . . . . 162 15.6. Authentication Credentials and Idle Clients . . . . . . 164
15.7. Proxies and Caching . . . . . . . . . . . . . . . . . . 162 15.7. Proxies and Caching . . . . . . . . . . . . . . . . . . 164
15.7.1. Denial of Service Attacks on Proxies . . . . . . . . 163 15.7.1. Denial of Service Attacks on Proxies . . . . . . . . 165
16. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 164 16. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 166
17. References . . . . . . . . . . . . . . . . . . . . . . . . . 166 16.1. (RFC2616) . . . . . . . . . . . . . . . . . . . . . . . 166
Appendix A. Appendices . . . . . . . . . . . . . . . . . . . . . 170 16.2. (This Document) . . . . . . . . . . . . . . . . . . . . 168
A.1. Internet Media Type message/http and application/http . 170 17. References . . . . . . . . . . . . . . . . . . . . . . . . . 169
A.2. Internet Media Type multipart/byteranges . . . . . . . . 171 17.1. References . . . . . . . . . . . . . . . . . . . . . . . 169
A.3. Tolerant Applications . . . . . . . . . . . . . . . . . 172 17.2. Normative References . . . . . . . . . . . . . . . . . . 172
A.4. Differences Between HTTP Entities and RFC 2045 Appendix A. Internet Media Type message/http and
Entities . . . . . . . . . . . . . . . . . . . . . . . . 173 application/http . . . . . . . . . . . . . . . . . . 174
A.4.1. MIME-Version . . . . . . . . . . . . . . . . . . . . 174 Appendix B. Internet Media Type multipart/byteranges . . . . . . 176
A.4.2. Conversion to Canonical Form . . . . . . . . . . . . 174 Appendix C. Tolerant Applications . . . . . . . . . . . . . . . 178
A.4.3. Conversion of Date Formats . . . . . . . . . . . . . 174 Appendix D. Differences Between HTTP Entities and RFC 2045
A.4.4. Introduction of Content-Encoding . . . . . . . . . . 175 Entities . . . . . . . . . . . . . . . . . . . . . . 179
A.4.5. No Content-Transfer-Encoding . . . . . . . . . . . . 175 D.1. MIME-Version . . . . . . . . . . . . . . . . . . . . . . 179
A.4.6. Introduction of Transfer-Encoding . . . . . . . . . 175 D.2. Conversion to Canonical Form . . . . . . . . . . . . . . 179
A.4.7. MHTML and Line Length Limitations . . . . . . . . . 176 D.3. Conversion of Date Formats . . . . . . . . . . . . . . . 180
A.5. Additional Features . . . . . . . . . . . . . . . . . . 176 D.4. Introduction of Content-Encoding . . . . . . . . . . . . 180
A.5.1. Content-Disposition . . . . . . . . . . . . . . . . 176 D.5. No Content-Transfer-Encoding . . . . . . . . . . . . . . 180
A.6. Compatibility with Previous Versions . . . . . . . . . . 177 D.6. Introduction of Transfer-Encoding . . . . . . . . . . . 181
A.6.1. Changes from HTTP/1.0 . . . . . . . . . . . . . . . 178 D.7. MHTML and Line Length Limitations . . . . . . . . . . . 181
A.6.2. Compatibility with HTTP/1.0 Persistent Connections . 179 Appendix E. Additional Features . . . . . . . . . . . . . . . . 182
A.6.3. Changes from RFC 2068 . . . . . . . . . . . . . . . 179 E.1. Content-Disposition . . . . . . . . . . . . . . . . . . 182
Appendix B. Index . . . . . . . . . . . . . . . . . . . . . . . 183 Appendix F. Compatibility with Previous Versions . . . . . . . . 183
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 F.1. Changes from HTTP/1.0 . . . . . . . . . . . . . . . . . 183
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 196 F.1.1. Changes to Simplify Multi-homed Web Servers and
Intellectual Property and Copyright Statements . . . . . . . . . 198 Conserve IP Addresses . . . . . . . . . . . . . . . 183
F.2. Compatibility with HTTP/1.0 Persistent Connections . . . 184
F.3. Changes from RFC 2068 . . . . . . . . . . . . . . . . . 185
Appendix G. Change Log (to be removed by RFC Editor before
publication) . . . . . . . . . . . . . . . . . . . . 188
G.1. Since RFC2616 . . . . . . . . . . . . . . . . . . . . . 188
Appendix H. Open issues (to be removed by RFC Editor prior to
publication) . . . . . . . . . . . . . . . . . . . . 189
H.1. rfc2616bis . . . . . . . . . . . . . . . . . . . . . . . 189
H.2. edit . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 201
Intellectual Property and Copyright Statements . . . . . . . . . 202
1. Introduction 1. Introduction
1.1. Purpose 1.1. Purpose
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. The first version of HTTP, information initiative since 1990. The first version of HTTP,
referred to as HTTP/0.9, was a simple protocol for raw data transfer referred to as HTTP/0.9, was a simple protocol for raw data transfer
skipping to change at page 13, line 27 skipping to change at page 15, line 27
1.4. Overall Operation 1.4. Overall Operation
The HTTP protocol is a request/response protocol. A client sends a The HTTP protocol is a request/response protocol. A client sends a
request to the server in the form of a request method, URI, and request to the server in the form of a request method, URI, and
protocol version, followed by a MIME-like message containing request protocol version, followed by a MIME-like message containing request
modifiers, client information, and possible body content over a modifiers, client information, and possible body content over a
connection with a server. The server responds with a status line, connection with a server. The server responds with a status line,
including the message's protocol version and a success or error code, including the message's protocol version and a success or error code,
followed by a MIME-like message containing server information, entity followed by a MIME-like message containing server information, entity
metainformation, and possible entity-body content. The relationship metainformation, and possible entity-body content. The relationship
between HTTP and MIME is described in Appendix A.4. between HTTP and MIME is described in Appendix D.
Most HTTP communication is initiated by a user agent and consists of Most HTTP communication is initiated by a user agent and consists of
a request to be applied to a resource on some origin server. In the a request to be applied to a resource on some origin server. In the
simplest case, this may be accomplished via a single connection (v) simplest case, this may be accomplished via a single connection (v)
between the user agent (UA) and the origin server (O). between the user agent (UA) and the origin server (O).
request chain ------------------------> request chain ------------------------>
UA -------------------v------------------- O UA -------------------v------------------- O
<----------------------- response chain <----------------------- response chain
A more complicated situation occurs when one or more intermediaries A more complicated situation occurs when one or more intermediaries
are present in the request/response chain. There are three common are present in the request/response chain. There are three common
forms of intermediary: proxy, gateway, and tunnel. A proxy is a forms of intermediary: proxy, gateway, and tunnel. A proxy is a
forwarding agent, receiving requests for a URI in its absolute form, forwarding agent, receiving requests for a URI in its absolute form,
rewriting all or part of the message, and forwarding the reformatted rewriting all or part of the message, and forwarding the reformatted
request toward the server identified by the URI. A gateway is a request toward the server identified by the URI. A gateway is a
receiving agent, acting as a layer above some other server(s) and, if receiving agent, acting as a layer above some other server(s) and, if
necessary, translating the requests to the underlying server's necessary, translating the requests to the underlying server's
protocol. A tunnel acts as a relay point between two connections protocol. A tunnel acts as a relay point between two connections
without changing the messages; tunnels are used when the without changing the messages; tunnels are used when the
communication needs to pass through an intermediary (such as a communication needs to pass through an intermediary (such as a
firewall) even when the intermediary cannot understand the contents firewall) even when the intermediary cannot understand the contents
of the messages. of the messages.
request chain --------------------------------------> request chain -------------------------------------->
UA -----v----- A -----v----- B -----v----- C -----v----- O UA -----v----- A -----v----- B -----v----- C -----v----- O
<------------------------------------- response chain <------------------------------------- response chain
The figure above shows three intermediaries (A, B, and C) between the The figure above shows three intermediaries (A, B, and C) between the
user agent and origin server. A request or response message that user agent and origin server. A request or response message that
travels the whole chain will pass through four separate connections. travels the whole chain will pass through four separate connections.
This distinction is important because some HTTP communication options This distinction is important because some HTTP communication options
may apply only to the connection with the nearest, non-tunnel may apply only to the connection with the nearest, non-tunnel
neighbor, only to the end-points of the chain, or to all connections neighbor, only to the end-points of the chain, or to all connections
along the chain. Although the diagram is linear, each participant along the chain. Although the diagram is linear, each participant
may be engaged in multiple, simultaneous communications. For may be engaged in multiple, simultaneous communications. For
example, B may be receiving requests from many clients other than A, example, B may be receiving requests from many clients other than A,
skipping to change at page 18, line 13 skipping to change at page 20, line 13
separators) MUST exist between any two tokens (for the definition separators) MUST exist between any two tokens (for the definition
of "token" below), since they would otherwise be interpreted as a of "token" below), since they would otherwise be interpreted as a
single token. single token.
2.2. Basic Rules 2.2. Basic Rules
The following rules are used throughout this specification to The following rules are used throughout this specification to
describe basic parsing constructs. The US-ASCII coded character set describe basic parsing constructs. The US-ASCII coded character set
is defined by ANSI X3.4-1986 [21]. is defined by ANSI X3.4-1986 [21].
OCTET = <any 8-bit sequence of data> OCTET = <any 8-bit sequence of data>
CHAR = <any US-ASCII character (octets 0 - 127)> CHAR = <any US-ASCII character (octets 0 - 127)>
UPALPHA = <any US-ASCII uppercase letter "A".."Z"> UPALPHA = <any US-ASCII uppercase letter "A".."Z">
LOALPHA = <any US-ASCII lowercase letter "a".."z"> LOALPHA = <any US-ASCII lowercase letter "a".."z">
ALPHA = UPALPHA | LOALPHA ALPHA = UPALPHA | LOALPHA
DIGIT = <any US-ASCII digit "0".."9"> DIGIT = <any US-ASCII digit "0".."9">
CTL = <any US-ASCII control character CTL = <any US-ASCII control character
(octets 0 - 31) and DEL (127)> (octets 0 - 31) and DEL (127)>
CR = <US-ASCII CR, carriage return (13)> CR = <US-ASCII CR, carriage return (13)>
LF = <US-ASCII LF, linefeed (10)> LF = <US-ASCII LF, linefeed (10)>
SP = <US-ASCII SP, space (32)> SP = <US-ASCII SP, space (32)>
HT = <US-ASCII HT, horizontal-tab (9)> HT = <US-ASCII HT, horizontal-tab (9)>
<"> = <US-ASCII double-quote mark (34)> <"> = <US-ASCII double-quote mark (34)>
HTTP/1.1 defines the sequence CR LF as the end-of-line marker for all HTTP/1.1 defines the sequence CR LF as the end-of-line marker for all
protocol elements except the entity-body (see Appendix A.3 for protocol elements except the entity-body (see Appendix C for tolerant
tolerant applications). The end-of-line marker within an entity-body applications). The end-of-line marker within an entity-body is
is defined by its associated media type, as described in Section 3.7. defined by its associated media type, as described in Section 3.7.
CRLF = CR LF CRLF = CR LF
HTTP/1.1 header field values can be folded onto multiple lines if the HTTP/1.1 header field values can be folded onto multiple lines if the
continuation line begins with a space or horizontal tab. All linear continuation line begins with a space or horizontal tab. All linear
white space, including folding, has the same semantics as SP. A white space, including folding, has the same semantics as SP. A
recipient MAY replace any linear white space with a single SP before recipient MAY replace any linear white space with a single SP before
interpreting the field value or forwarding the message downstream. interpreting the field value or forwarding the message downstream.
LWS = [CRLF] 1*( SP | HT ) LWS = [CRLF] 1*( SP | HT )
The TEXT rule is only used for descriptive field contents and values The TEXT rule is only used for descriptive field contents and values
that are not intended to be interpreted by the message parser. Words that are not intended to be interpreted by the message parser. Words
of *TEXT MAY contain characters from character sets other than ISO- of *TEXT MAY contain characters from character sets other than ISO-
8859-1 [22] only when encoded according to the rules of RFC 2047 8859-1 [22] only when encoded according to the rules of RFC 2047
[14]. [14].
TEXT = <any OCTET except CTLs, TEXT = <any OCTET except CTLs,
but including LWS> but including LWS>
A CRLF is allowed in the definition of TEXT only as part of a header A CRLF is allowed in the definition of TEXT only as part of a header
field continuation. It is expected that the folding LWS will be field continuation. It is expected that the folding LWS will be
replaced with a single SP before interpretation of the TEXT value. replaced with a single SP before interpretation of the TEXT value.
Hexadecimal numeric characters are used in several protocol elements. Hexadecimal numeric characters are used in several protocol elements.
HEX = "A" | "B" | "C" | "D" | "E" | "F" HEX = "A" | "B" | "C" | "D" | "E" | "F"
| "a" | "b" | "c" | "d" | "e" | "f" | DIGIT | "a" | "b" | "c" | "d" | "e" | "f" | DIGIT
Many HTTP/1.1 header field values consist of words separated by LWS Many HTTP/1.1 header field values consist of words separated by LWS
or special characters. These special characters MUST be in a quoted or special characters. These special characters MUST be in a quoted
string to be used within a parameter value (as defined in string to be used within a parameter value (as defined in
Section 3.6). Section 3.6).
token = 1*<any CHAR except CTLs or separators> token = 1*<any CHAR except CTLs or separators>
separators = "(" | ")" | "<" | ">" | "@" separators = "(" | ")" | "<" | ">" | "@"
| "," | ";" | ":" | "\" | <"> | "," | ";" | ":" | "\" | <">
| "/" | "[" | "]" | "?" | "=" | "/" | "[" | "]" | "?" | "="
| "{" | "}" | SP | HT | "{" | "}" | SP | HT
Comments can be included in some HTTP header fields by surrounding Comments can be included in some HTTP header fields by surrounding
the comment text with parentheses. Comments are only allowed in the comment text with parentheses. Comments are only allowed in
fields containing "comment" as part of their field value definition. fields containing "comment" as part of their field value definition.
In all other fields, parentheses are considered part of the field In all other fields, parentheses are considered part of the field
value. value.
comment = "(" *( ctext | quoted-pair | comment ) ")" comment = "(" *( ctext | quoted-pair | comment ) ")"
ctext = <any TEXT excluding "(" and ")"> ctext = <any TEXT excluding "(" and ")">
A string of text is parsed as a single word if it is quoted using A string of text is parsed as a single word if it is quoted using
double-quote marks. double-quote marks.
quoted-string = ( <"> *(qdtext | quoted-pair ) <"> ) quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
qdtext = <any TEXT except <">> qdtext = <any TEXT except <">>
The backslash character ("\") MAY be used as a single-character The backslash character ("\") MAY be used as a single-character
quoting mechanism only within quoted-string and comment constructs. quoting mechanism only within quoted-string and comment constructs.
quoted-pair = "\" CHAR quoted-pair = "\" CHAR
3. Protocol Parameters 3. Protocol Parameters
3.1. HTTP Version 3.1. HTTP Version
HTTP uses a "<major>.<minor>" numbering scheme to indicate versions HTTP uses a "<major>.<minor>" numbering scheme to indicate versions
of the protocol. The protocol versioning policy is intended to allow of the protocol. The protocol versioning policy is intended to allow
the sender to indicate the format of a message and its capacity for the sender to indicate the format of a message and its capacity for
understanding further HTTP communication, rather than the features understanding further HTTP communication, rather than the features
obtained via that communication. No change is made to the version obtained via that communication. No change is made to the version
skipping to change at page 22, line 5 skipping to change at page 24, line 5
Note: Servers ought to be cautious about depending on URI lengths Note: Servers ought to be cautious about depending on URI lengths
above 255 bytes, because some older client or proxy above 255 bytes, because some older client or proxy
implementations might not properly support these lengths. implementations might not properly support these lengths.
3.2.2. http URL 3.2.2. http URL
The "http" scheme is used to locate network resources via the HTTP The "http" scheme is used to locate network resources via the HTTP
protocol. This section defines the scheme-specific syntax and protocol. This section defines the scheme-specific syntax and
semantics for http URLs. semantics for http URLs.
http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]] http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]
If the port is empty or not given, port 80 is assumed. The semantics If the port is empty or not given, port 80 is assumed. The semantics
are that the identified resource is located at the server listening are that the identified resource is located at the server listening
for TCP connections on that port of that host, and the Request-URI for TCP connections on that port of that host, and the Request-URI
for the resource is abs_path (Section 5.1.2). The use of IP for the resource is abs_path (section 5.1.2). The use of IP
addresses in URLs SHOULD be avoided whenever possible (see RFC 1900 addresses in URLs SHOULD be avoided whenever possible (see RFC 1900
[24]). If the abs_path is not present in the URL, it MUST be given [24]). If the abs_path is not present in the URL, it MUST be given
as "/" when used as a Request-URI for a resource (Section 5.1.2). If as "/" when used as a Request-URI for a resource (section 5.1.2). If
a proxy receives a host name which is not a fully qualified domain a proxy receives a host name which is not a fully qualified domain
name, it MAY add its domain to the host name it received. If a proxy name, it MAY add its domain to the host name it received. If a proxy
receives a fully qualified domain name, the proxy MUST NOT change the receives a fully qualified domain name, the proxy MUST NOT change the
host name. host name.
3.2.3. URI Comparison 3.2.3. URI Comparison
When comparing two URIs to decide if they match or not, a client When comparing two URIs to decide if they match or not, a client
SHOULD use a case-sensitive octet-by-octet comparison of the entire SHOULD use a case-sensitive octet-by-octet comparison of the entire
URIs, with these exceptions: URIs, with these exceptions:
skipping to change at page 22, line 39 skipping to change at page 24, line 39
o Comparisons of scheme names MUST be case-insensitive; o Comparisons of scheme names MUST be case-insensitive;
o An empty abs_path is equivalent to an abs_path of "/". o An empty abs_path is equivalent to an abs_path of "/".
Characters other than those in the "reserved" and "unsafe" sets (see Characters other than those in the "reserved" and "unsafe" sets (see
RFC 2396 [42]) are equivalent to their ""%" HEX HEX" encoding. RFC 2396 [42]) are equivalent to their ""%" HEX HEX" encoding.
For example, the following three URIs are equivalent: For example, the following three URIs are equivalent:
http://abc.com:80/~smith/home.html http://abc.com:80/~smith/home.html
http://ABC.com/%7Esmith/home.html http://ABC.com/%7Esmith/home.html
http://ABC.com:/%7esmith/home.html http://ABC.com:/%7esmith/home.html
3.3. Date/Time Formats 3.3. Date/Time Formats
3.3.1. Full Date 3.3.1. Full Date
HTTP applications have historically allowed three different formats HTTP applications have historically allowed three different formats
for the representation of date/time stamps: for the representation of date/time stamps:
Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123
Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036 Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
The first format is preferred as an Internet standard and represents The first format is preferred as an Internet standard and represents
a fixed-length subset of that defined by RFC 1123 [8] (an update to a fixed-length subset of that defined by RFC 1123 [8] (an update to
RFC 822 [9]). The second format is in common use, but is based on RFC 822 [9]). The second format is in common use, but is based on
the obsolete RFC 850 [12] date format and lacks a four-digit year. the obsolete RFC 850 [12] date format and lacks a four-digit year.
HTTP/1.1 clients and servers that parse the date value MUST accept HTTP/1.1 clients and servers that parse the date value MUST accept
all three formats (for compatibility with HTTP/1.0), though they MUST all three formats (for compatibility with HTTP/1.0), though they MUST
only generate the RFC 1123 format for representing HTTP-date values only generate the RFC 1123 format for representing HTTP-date values
in header fields. See Appendix A.3 for further information. in header fields. See Appendix C for further information.
Note: Recipients of date values are encouraged to be robust in Note: Recipients of date values are encouraged to be robust in
accepting date values that may have been sent by non-HTTP accepting date values that may have been sent by non-HTTP
applications, as is sometimes the case when retrieving or posting applications, as is sometimes the case when retrieving or posting
messages via proxies/gateways to SMTP or NNTP. messages via proxies/gateways to SMTP or NNTP.
All HTTP date/time stamps MUST be represented in Greenwich Mean Time All HTTP date/time stamps MUST be represented in Greenwich Mean Time
(GMT), without exception. For the purposes of HTTP, GMT is exactly (GMT), without exception. For the purposes of HTTP, GMT is exactly
equal to UTC (Coordinated Universal Time). This is indicated in the equal to UTC (Coordinated Universal Time). This is indicated in the
first two formats by the inclusion of "GMT" as the three-letter first two formats by the inclusion of "GMT" as the three-letter
abbreviation for time zone, and MUST be assumed when reading the abbreviation for time zone, and MUST be assumed when reading the
asctime format. HTTP-date is case sensitive and MUST NOT include asctime format. HTTP-date is case sensitive and MUST NOT include
additional LWS beyond that specifically included as SP in the additional LWS beyond that specifically included as SP in the
grammar. grammar.
HTTP-date = rfc1123-date | rfc850-date | asctime-date HTTP-date = rfc1123-date | rfc850-date | asctime-date
rfc1123-date = wkday "," SP date1 SP time SP "GMT" rfc1123-date = wkday "," SP date1 SP time SP "GMT"
rfc850-date = weekday "," SP date2 SP time SP "GMT" rfc850-date = weekday "," SP date2 SP time SP "GMT"
asctime-date = wkday SP date3 SP time SP 4DIGIT asctime-date = wkday SP date3 SP time SP 4DIGIT
date1 = 2DIGIT SP month SP 4DIGIT date1 = 2DIGIT SP month SP 4DIGIT
; day month year (e.g., 02 Jun 1982) ; day month year (e.g., 02 Jun 1982)
date2 = 2DIGIT "-" month "-" 2DIGIT date2 = 2DIGIT "-" month "-" 2DIGIT
; day-month-year (e.g., 02-Jun-82) ; day-month-year (e.g., 02-Jun-82)
date3 = month SP ( 2DIGIT | ( SP 1DIGIT )) date3 = month SP ( 2DIGIT | ( SP 1DIGIT ))
; month day (e.g., Jun 2) ; month day (e.g., Jun 2)
time = 2DIGIT ":" 2DIGIT ":" 2DIGIT time = 2DIGIT ":" 2DIGIT ":" 2DIGIT
; 00:00:00 - 23:59:59 ; 00:00:00 - 23:59:59
wkday = "Mon" | "Tue" | "Wed" wkday = "Mon" | "Tue" | "Wed"
| "Thu" | "Fri" | "Sat" | "Sun" | "Thu" | "Fri" | "Sat" | "Sun"
weekday = "Monday" | "Tuesday" | "Wednesday" weekday = "Monday" | "Tuesday" | "Wednesday"
| "Thursday" | "Friday" | "Saturday" | "Sunday" | "Thursday" | "Friday" | "Saturday" | "Sunday"
month = "Jan" | "Feb" | "Mar" | "Apr" month = "Jan" | "Feb" | "Mar" | "Apr"
| "May" | "Jun" | "Jul" | "Aug" | "May" | "Jun" | "Jul" | "Aug"
| "Sep" | "Oct" | "Nov" | "Dec" | "Sep" | "Oct" | "Nov" | "Dec"
Note: HTTP requirements for the date/time stamp format apply only to Note: HTTP requirements for the date/time stamp format apply only to
their usage within the protocol stream. Clients and servers are not their usage within the protocol stream. Clients and servers are not
required to use these formats for user presentation, request logging, required to use these formats for user presentation, request logging,
etc. etc.
3.3.2. Delta Seconds 3.3.2. Delta Seconds
Some HTTP header fields allow a time value to be specified as an Some HTTP header fields allow a time value to be specified as an
integer number of seconds, represented in decimal, after the time integer number of seconds, represented in decimal, after the time
that the message was received. that the message was received.
delta-seconds = 1*DIGIT delta-seconds = 1*DIGIT
3.4. Character Sets 3.4. Character Sets
HTTP uses the same definition of the term "character set" as that HTTP uses the same definition of the term "character set" as that
described for MIME: described for MIME:
The term "character set" is used in this document to refer to a The term "character set" is used in this document to refer to a
method used with one or more tables to convert a sequence of octets method used with one or more tables to convert a sequence of octets
into a sequence of characters. Note that unconditional conversion in into a sequence of characters. Note that unconditional conversion in
the other direction is not required, in that not all characters may the other direction is not required, in that not all characters may
skipping to change at page 24, line 41 skipping to change at page 26, line 41
Note: This use of the term "character set" is more commonly Note: This use of the term "character set" is more commonly
referred to as a "character encoding." However, since HTTP and referred to as a "character encoding." However, since HTTP and
MIME share the same registry, it is important that the terminology MIME share the same registry, it is important that the terminology
also be shared. also be shared.
HTTP character sets are identified by case-insensitive tokens. The HTTP character sets are identified by case-insensitive tokens. The
complete set of tokens is defined by the IANA Character Set registry complete set of tokens is defined by the IANA Character Set registry
[19]. [19].
charset = token charset = token
Although HTTP allows an arbitrary token to be used as a charset Although HTTP allows an arbitrary token to be used as a charset
value, any token that has a predefined value within the IANA value, any token that has a predefined value within the IANA
Character Set registry [19] MUST represent the character set defined Character Set registry [19] MUST represent the character set defined
by that registry. Applications SHOULD limit their use of character by that registry. Applications SHOULD limit their use of character
sets to those defined by the IANA registry. sets to those defined by the IANA registry.
Implementors should be aware of IETF character set requirements [38] Implementors should be aware of IETF character set requirements [38]
[41]. [41].
skipping to change at page 25, line 30 skipping to change at page 27, line 30
3.5. Content Codings 3.5. Content Codings
Content coding values indicate an encoding transformation that has Content coding values indicate an encoding transformation that has
been or can be applied to an entity. Content codings are primarily been or can be applied to an entity. Content codings are primarily
used to allow a document to be compressed or otherwise usefully used to allow a document to be compressed or otherwise usefully
transformed without losing the identity of its underlying media type transformed without losing the identity of its underlying media type
and without loss of information. Frequently, the entity is stored in and without loss of information. Frequently, the entity is stored in
coded form, transmitted directly, and only decoded by the recipient. coded form, transmitted directly, and only decoded by the recipient.
content-coding = token content-coding = token
All content-coding values are case-insensitive. HTTP/1.1 uses All content-coding values are case-insensitive. HTTP/1.1 uses
content-coding values in the Accept-Encoding (Section 14.3) and content-coding values in the Accept-Encoding (Section 14.3) and
Content-Encoding (Section 14.11) header fields. Although the value Content-Encoding (Section 14.11) header fields. Although the value
describes the content-coding, what is more important is that it describes the content-coding, what is more important is that it
indicates what decoding mechanism will be required to remove the indicates what decoding mechanism will be required to remove the
encoding. encoding.
The Internet Assigned Numbers Authority (IANA) acts as a registry for The Internet Assigned Numbers Authority (IANA) acts as a registry for
content-coding value tokens. Initially, the registry contains the content-coding value tokens. Initially, the registry contains the
skipping to change at page 26, line 39 skipping to change at page 28, line 39
conform to the purpose of content coding defined in this section. conform to the purpose of content coding defined in this section.
3.6. Transfer Codings 3.6. Transfer Codings
Transfer-coding values are used to indicate an encoding Transfer-coding values are used to indicate an encoding
transformation that has been, can be, or may need to be applied to an transformation that has been, can be, or may need to be applied to an
entity-body in order to ensure "safe transport" through the network. entity-body in order to ensure "safe transport" through the network.
This differs from a content coding in that the transfer-coding is a This differs from a content coding in that the transfer-coding is a
property of the message, not of the original entity. property of the message, not of the original entity.
transfer-coding = "chunked" | transfer-extension transfer-coding = "chunked" | transfer-extension
transfer-extension = token *( ";" parameter ) transfer-extension = token *( ";" parameter )
Parameters are in the form of attribute/value pairs. Parameters are in the form of attribute/value pairs.
parameter = attribute "=" value parameter = attribute "=" value
attribute = token attribute = token
value = token | quoted-string value = token | quoted-string
All transfer-coding values are case-insensitive. HTTP/1.1 uses All transfer-coding values are case-insensitive. HTTP/1.1 uses
transfer-coding values in the TE header field (Section 14.39) and in transfer-coding values in the TE header field (Section 14.39) and in
the Transfer-Encoding header field (Section 14.41). the Transfer-Encoding header field (Section 14.41).
Whenever a transfer-coding is applied to a message-body, the set of Whenever a transfer-coding is applied to a message-body, the set of
transfer-codings MUST include "chunked", unless the message is transfer-codings MUST include "chunked", unless the message is
terminated by closing the connection. When the "chunked" transfer- terminated by closing the connection. When the "chunked" transfer-
coding is used, it MUST be the last transfer-coding applied to the coding is used, it MUST be the last transfer-coding applied to the
message-body. The "chunked" transfer-coding MUST NOT be applied more message-body. The "chunked" transfer-coding MUST NOT be applied more
skipping to change at page 28, line 5 skipping to change at page 30, line 5
3.6.1. Chunked Transfer Coding 3.6.1. Chunked Transfer Coding
The chunked encoding modifies the body of a message in order to The chunked encoding modifies the body of a message in order to
transfer it as a series of chunks, each with its own size indicator, transfer it as a series of chunks, each with its own size indicator,
followed by an OPTIONAL trailer containing entity-header fields. followed by an OPTIONAL trailer containing entity-header fields.
This allows dynamically produced content to be transferred along with This allows dynamically produced content to be transferred along with
the information necessary for the recipient to verify that it has the information necessary for the recipient to verify that it has
received the full message. received the full message.
Chunked-Body = *chunk Chunked-Body = *chunk
last-chunk last-chunk
trailer trailer
CRLF CRLF
chunk = chunk-size [ chunk-extension ] CRLF chunk = chunk-size [ chunk-extension ] CRLF
chunk-data CRLF chunk-data CRLF
chunk-size = 1*HEX chunk-size = 1*HEX
last-chunk = 1*("0") [ chunk-extension ] CRLF last-chunk = 1*("0") [ chunk-extension ] CRLF
chunk-extension= *( ";" chunk-ext-name [ "=" chunk-ext-val ] ) chunk-extension= *( ";" chunk-ext-name [ "=" chunk-ext-val ] )
chunk-ext-name = token chunk-ext-name = token
chunk-ext-val = token | quoted-string chunk-ext-val = token | quoted-string
chunk-data = chunk-size(OCTET) chunk-data = chunk-size(OCTET)
trailer = *(entity-header CRLF) trailer = *(entity-header CRLF)
The chunk-size field is a string of hex digits indicating the size of The chunk-size field is a string of hex digits indicating the size of
the chunk. The chunked encoding is ended by any chunk whose size is the chunk. The chunked encoding is ended by any chunk whose size is
zero, followed by the trailer, which is terminated by an empty line. zero, followed by the trailer, which is terminated by an empty line.
The trailer allows the sender to include additional HTTP header The trailer allows the sender to include additional HTTP header
fields at the end of the message. The Trailer header field can be fields at the end of the message. The Trailer header field can be
used to indicate which header fields are included in a trailer (see used to indicate which header fields are included in a trailer (see
Section 14.40). Section 14.40).
skipping to change at page 29, line 4 skipping to change at page 31, line 4
trailer fields might be silently discarded along the path to the trailer fields might be silently discarded along the path to the
client. client.
This requirement prevents an interoperability failure when the This requirement prevents an interoperability failure when the
message is being received by an HTTP/1.1 (or later) proxy and message is being received by an HTTP/1.1 (or later) proxy and
forwarded to an HTTP/1.0 recipient. It avoids a situation where forwarded to an HTTP/1.0 recipient. It avoids a situation where
compliance with the protocol would have necessitated a possibly compliance with the protocol would have necessitated a possibly
infinite buffer on the proxy. infinite buffer on the proxy.
An example process for decoding a Chunked-Body is presented in An example process for decoding a Chunked-Body is presented in
Appendix A.4.6. Appendix D.6.
All HTTP/1.1 applications MUST be able to receive and decode the All HTTP/1.1 applications MUST be able to receive and decode the
"chunked" transfer-coding, and MUST ignore chunk-extension extensions "chunked" transfer-coding, and MUST ignore chunk-extension extensions
they do not understand. they do not understand.
3.7. Media Types 3.7. Media Types
HTTP uses Internet Media Types [17] in the Content-Type HTTP uses Internet Media Types [17] in the Content-Type
(Section 14.17) and Accept (Section 14.1) header fields in order to (Section 14.17) and Accept (Section 14.1) header fields in order to
provide open and extensible data typing and type negotiation. provide open and extensible data typing and type negotiation.
media-type = type "/" subtype *( ";" parameter ) media-type = type "/" subtype *( ";" parameter )
type = token type = token
subtype = token subtype = token
Parameters MAY follow the type/subtype in the form of attribute/value Parameters MAY follow the type/subtype in the form of attribute/value
pairs (as defined in Section 3.6). pairs (as defined in Section 3.6).
The type, subtype, and parameter attribute names are case- The type, subtype, and parameter attribute names are case-
insensitive. Parameter values might or might not be case-sensitive, insensitive. Parameter values might or might not be case-sensitive,
depending on the semantics of the parameter name. Linear white space depending on the semantics of the parameter name. Linear white space
(LWS) MUST NOT be used between the type and subtype, nor between an (LWS) MUST NOT be used between the type and subtype, nor between an
attribute and its value. The presence or absence of a parameter attribute and its value. The presence or absence of a parameter
might be significant to the processing of a media-type, depending on might be significant to the processing of a media-type, depending on
skipping to change at page 30, line 43 skipping to change at page 32, line 43
therefore use only CRLF to represent line breaks between body-parts. therefore use only CRLF to represent line breaks between body-parts.
Unlike in RFC 2046, the epilogue of any multipart message MUST be Unlike in RFC 2046, the epilogue of any multipart message MUST be
empty; HTTP applications MUST NOT transmit the epilogue (even if the empty; HTTP applications MUST NOT transmit the epilogue (even if the
original multipart contains an epilogue). These restrictions exist original multipart contains an epilogue). These restrictions exist
in order to preserve the self-delimiting nature of a multipart in order to preserve the self-delimiting nature of a multipart
message-body, wherein the "end" of the message-body is indicated by message-body, wherein the "end" of the message-body is indicated by
the ending multipart boundary. the ending multipart boundary.
In general, HTTP treats a multipart message-body no differently than In general, HTTP treats a multipart message-body no differently than
any other media type: strictly as payload. The one exception is the any other media type: strictly as payload. The one exception is the
"multipart/byteranges" type (Appendix A.2) when it appears in a 206 "multipart/byteranges" type (Appendix B) when it appears in a 206
(Partial Content) response, which will be interpreted by some HTTP (Partial Content) response, which will be interpreted by some HTTP
caching mechanisms as described in sections 13.5.4 and 14.16. In all caching mechanisms as described in sections 13.5.4 and 14.16. In all
other cases, an HTTP user agent SHOULD follow the same or similar other cases, an HTTP user agent SHOULD follow the same or similar
behavior as a MIME user agent would upon receipt of a multipart type. behavior as a MIME user agent would upon receipt of a multipart type.
The MIME header fields within each body-part of a multipart message- The MIME header fields within each body-part of a multipart message-
body do not have any significance to HTTP beyond that defined by body do not have any significance to HTTP beyond that defined by
their MIME semantics. their MIME semantics.
In general, an HTTP user agent SHOULD follow the same or similar In general, an HTTP user agent SHOULD follow the same or similar
behavior as a MIME user agent would upon receipt of a multipart type. behavior as a MIME user agent would upon receipt of a multipart type.
skipping to change at page 31, line 23 skipping to change at page 33, line 23
3.8. Product Tokens 3.8. Product Tokens
Product tokens are used to allow communicating applications to Product tokens are used to allow communicating applications to
identify themselves by software name and version. Most fields using identify themselves by software name and version. Most fields using
product tokens also allow sub-products which form a significant part product tokens also allow sub-products which form a significant part
of the application to be listed, separated by white space. By of the application to be listed, separated by white space. By
convention, the products are listed in order of their significance convention, the products are listed in order of their significance
for identifying the application. for identifying the application.
product = token ["/" product-version] product = token ["/" product-version]
product-version = token product-version = token
Examples: Examples:
User-Agent: CERN-LineMode/2.15 libwww/2.17b3 User-Agent: CERN-LineMode/2.15 libwww/2.17b3
Server: Apache/0.8.4 Server: Apache/0.8.4
Product tokens SHOULD be short and to the point. They MUST NOT be Product tokens SHOULD be short and to the point. They MUST NOT be
used for advertising or other non-essential information. Although used for advertising or other non-essential information. Although
any token character MAY appear in a product-version, this token any token character MAY appear in a product-version, this token
SHOULD only be used for a version identifier (i.e., successive SHOULD only be used for a version identifier (i.e., successive
versions of the same product SHOULD only differ in the product- versions of the same product SHOULD only differ in the product-
version portion of the product value). version portion of the product value).
3.9. Quality Values 3.9. Quality Values
HTTP content negotiation (Section 12) uses short "floating point" HTTP content negotiation (Section 12) uses short "floating point"
numbers to indicate the relative importance ("weight") of various numbers to indicate the relative importance ("weight") of various
negotiable parameters. A weight is normalized to a real number in negotiable parameters. A weight is normalized to a real number in
the range 0 through 1, where 0 is the minimum and 1 the maximum the range 0 through 1, where 0 is the minimum and 1 the maximum
value. If a parameter has a quality value of 0, then content with value. If a parameter has a quality value of 0, then content with
this parameter is `not acceptable' for the client. HTTP/1.1 this parameter is `not acceptable' for the client. HTTP/1.1
applications MUST NOT generate more than three digits after the applications MUST NOT generate more than three digits after the
decimal point. User configuration of these values SHOULD also be decimal point. User configuration of these values SHOULD also be
limited in this fashion. limited in this fashion.
qvalue = ( "0" [ "." 0*3DIGIT ] ) qvalue = ( "0" [ "." 0*3DIGIT ] )
| ( "1" [ "." 0*3("0") ] ) | ( "1" [ "." 0*3("0") ] )
"Quality values" is a misnomer, since these values merely represent "Quality values" is a misnomer, since these values merely represent
relative degradation in desired quality. relative degradation in desired quality.
3.10. Language Tags 3.10. Language Tags
A language tag identifies a natural language spoken, written, or A language tag identifies a natural language spoken, written, or
otherwise conveyed by human beings for communication of information otherwise conveyed by human beings for communication of information
to other human beings. Computer languages are explicitly excluded. to other human beings. Computer languages are explicitly excluded.
HTTP uses language tags within the Accept-Language and Content- HTTP uses language tags within the Accept-Language and Content-
Language fields. Language fields.
The syntax and registry of HTTP language tags is the same as that The syntax and registry of HTTP language tags is the same as that
defined by RFC 1766 [1]. In summary, a language tag is composed of 1 defined by RFC 1766 [1]. In summary, a language tag is composed of 1
or more parts: A primary language tag and a possibly empty series of or more parts: A primary language tag and a possibly empty series of
subtags: subtags:
language-tag = primary-tag *( "-" subtag ) language-tag = primary-tag *( "-" subtag )
primary-tag = 1*8ALPHA primary-tag = 1*8ALPHA
subtag = 1*8ALPHA subtag = 1*8ALPHA
White space is not allowed within the tag and all tags are case- White space is not allowed within the tag and all tags are case-
insensitive. The name space of language tags is administered by the insensitive. The name space of language tags is administered by the
IANA. Example tags include: IANA. Example tags include:
en, en-US, en-cockney, i-cherokee, x-pig-latin en, en-US, en-cockney, i-cherokee, x-pig-latin
where any two-letter primary-tag is an ISO-639 language abbreviation where any two-letter primary-tag is an ISO-639 language abbreviation
and any two-letter initial subtag is an ISO-3166 country code. (The and any two-letter initial subtag is an ISO-3166 country code. (The
last three tags above are not registered tags; all but the last are last three tags above are not registered tags; all but the last are
examples of tags which could be registered in future.) examples of tags which could be registered in future.)
3.11. Entity Tags 3.11. Entity Tags
Entity tags are used for comparing two or more entities from the same Entity tags are used for comparing two or more entities from the same
requested resource. HTTP/1.1 uses entity tags in the ETag requested resource. HTTP/1.1 uses entity tags in the ETag
(Section 14.19), If-Match (Section 14.24), If-None-Match (Section 14.19), If-Match (Section 14.24), If-None-Match
(Section 14.26), and If-Range (Section 14.27) header fields. The (Section 14.26), and If-Range (Section 14.27) header fields. The
definition of how they are used and compared as cache validators is definition of how they are used and compared as cache validators is
in Section 13.3.3. An entity tag consists of an opaque quoted in Section 13.3.3. An entity tag consists of an opaque quoted
string, possibly prefixed by a weakness indicator. string, possibly prefixed by a weakness indicator.
entity-tag = [ weak ] opaque-tag entity-tag = [ weak ] opaque-tag
weak = "W/" weak = "W/"
opaque-tag = quoted-string opaque-tag = quoted-string
A "strong entity tag" MAY be shared by two entities of a resource A "strong entity tag" MAY be shared by two entities of a resource
only if they are equivalent by octet equality. only if they are equivalent by octet equality.
A "weak entity tag," indicated by the "W/" prefix, MAY be shared by A "weak entity tag," indicated by the "W/" prefix, MAY be shared by
two entities of a resource only if the entities are equivalent and two entities of a resource only if the entities are equivalent and
could be substituted for each other with no significant change in could be substituted for each other with no significant change in
semantics. A weak entity tag can only be used for weak comparison. semantics. A weak entity tag can only be used for weak comparison.
An entity tag MUST be unique across all versions of all entities An entity tag MUST be unique across all versions of all entities
skipping to change at page 33, line 25 skipping to change at page 35, line 25
entities. entities.
3.12. Range Units 3.12. Range Units
HTTP/1.1 allows a client to request that only part (a range of) the HTTP/1.1 allows a client to request that only part (a range of) the
response entity be included within the response. HTTP/1.1 uses range response entity be included within the response. HTTP/1.1 uses range
units in the Range (Section 14.35) and Content-Range (Section 14.16) units in the Range (Section 14.35) and Content-Range (Section 14.16)
header fields. An entity can be broken down into subranges according header fields. An entity can be broken down into subranges according
to various structural units. to various structural units.
range-unit = bytes-unit | other-range-unit range-unit = bytes-unit | other-range-unit
bytes-unit = "bytes" bytes-unit = "bytes"
other-range-unit = token other-range-unit = token
The only range unit defined by HTTP/1.1 is "bytes". HTTP/1.1 The only range unit defined by HTTP/1.1 is "bytes". HTTP/1.1
implementations MAY ignore ranges specified using other units. implementations MAY ignore ranges specified using other units.
HTTP/1.1 has been designed to allow implementations of applications HTTP/1.1 has been designed to allow implementations of applications
that do not depend on knowledge of ranges. that do not depend on knowledge of ranges.
4. HTTP Message 4. HTTP Message
4.1. Message Types 4.1. Message Types
HTTP messages consist of requests from client to server and responses HTTP messages consist of requests from client to server and responses
from server to client. from server to client.
HTTP-message = Request | Response ; HTTP/1.1 messages HTTP-message = Request | Response ; HTTP/1.1 messages
Request (Section 5) and Response (Section 6) messages use the generic Request (Section 5) and Response (Section 6) messages use the generic
message format of RFC 822 [9] for transferring entities (the payload message format of RFC 822 [9] for transferring entities (the payload
of the message). Both types of message consist of a start-line, zero of the message). Both types of message consist of a start-line, zero
or more header fields (also known as "headers"), an empty line (i.e., or more header fields (also known as "headers"), an empty line (i.e.,
a line with nothing preceding the CRLF) indicating the end of the a line with nothing preceding the CRLF) indicating the end of the
header fields, and possibly a message-body. header fields, and possibly a message-body.
generic-message = start-line generic-message = start-line
*(message-header CRLF) *(message-header CRLF)
CRLF CRLF
[ message-body ] [ message-body ]
start-line = Request-Line | Status-Line start-line = Request-Line | Status-Line
In the interest of robustness, servers SHOULD ignore any empty In the interest of robustness, servers SHOULD ignore any empty
line(s) received where a Request-Line is expected. In other words, line(s) received where a Request-Line is expected. In other words,
if the server is reading the protocol stream at the beginning of a if the server is reading the protocol stream at the beginning of a
message and receives a CRLF first, it should ignore the CRLF. message and receives a CRLF first, it should ignore the CRLF.
Certain buggy HTTP/1.0 client implementations generate extra CRLF's Certain buggy HTTP/1.0 client implementations generate extra CRLF's
after a POST request. To restate what is explicitly forbidden by the after a POST request. To restate what is explicitly forbidden by the
BNF, an HTTP/1.1 client MUST NOT preface or follow a request with an BNF, an HTTP/1.1 client MUST NOT preface or follow a request with an
extra CRLF. extra CRLF.
skipping to change at page 35, line 5 skipping to change at page 37, line 5
that given in Section 3.1 of RFC 822 [9]. Each header field consists that given in Section 3.1 of RFC 822 [9]. Each header field consists
of a name followed by a colon (":") and the field value. Field names of a name followed by a colon (":") and the field value. Field names
are case-insensitive. The field value MAY be preceded by any amount are case-insensitive. The field value MAY be preceded by any amount
of LWS, though a single SP is preferred. Header fields can be of LWS, though a single SP is preferred. Header fields can be
extended over multiple lines by preceding each extra line with at extended over multiple lines by preceding each extra line with at
least one SP or HT. Applications ought to follow "common form", least one SP or HT. Applications ought to follow "common form",
where one is known or indicated, when generating HTTP constructs, where one is known or indicated, when generating HTTP constructs,
since there might exist some implementations that fail to accept since there might exist some implementations that fail to accept
anything beyond the common forms. anything beyond the common forms.
message-header = field-name ":" [ field-value ] message-header = field-name ":" [ field-value ]
field-name = token field-name = token
field-value = *( field-content | LWS ) field-value = *( field-content | LWS )
field-content = <the OCTETs making up the field-value field-content = <the OCTETs making up the field-value
and consisting of either *TEXT or combinations and consisting of either *TEXT or combinations
of token, separators, and quoted-string> of token, separators, and quoted-string>
The field-content does not include any leading or trailing LWS: The field-content does not include any leading or trailing LWS:
linear white space occurring before the first non-whitespace linear white space occurring before the first non-whitespace
character of the field-value or after the last non-whitespace character of the field-value or after the last non-whitespace
character of the field-value. Such leading or trailing LWS MAY be character of the field-value. Such leading or trailing LWS MAY be
removed without changing the semantics of the field value. Any LWS removed without changing the semantics of the field value. Any LWS
that occurs between field-content MAY be replaced with a single SP that occurs between field-content MAY be replaced with a single SP
before interpreting the field value or forwarding the message before interpreting the field value or forwarding the message
downstream. downstream.
skipping to change at page 35, line 45 skipping to change at page 37, line 45
change the order of these field values when a message is forwarded. change the order of these field values when a message is forwarded.
4.3. Message Body 4.3. Message Body
The message-body (if any) of an HTTP message is used to carry the The message-body (if any) of an HTTP message is used to carry the
entity-body associated with the request or response. The message- entity-body associated with the request or response. The message-
body differs from the entity-body only when a transfer-coding has body differs from the entity-body only when a transfer-coding has
been applied, as indicated by the Transfer-Encoding header field been applied, as indicated by the Transfer-Encoding header field
(Section 14.41). (Section 14.41).
message-body = entity-body message-body = entity-body
| <entity-body encoded as per Transfer-Encoding> | <entity-body encoded as per Transfer-Encoding>
Transfer-Encoding MUST be used to indicate any transfer-codings Transfer-Encoding MUST be used to indicate any transfer-codings
applied by an application to ensure safe and proper transfer of the applied by an application to ensure safe and proper transfer of the
message. Transfer-Encoding is a property of the message, not of the message. Transfer-Encoding is a property of the message, not of the
entity, and thus MAY be added or removed by any application along the entity, and thus MAY be added or removed by any application along the
request/response chain. (However, Section 3.6 places restrictions on request/response chain. (However, Section 3.6 places restrictions on
when certain transfer-codings may be used.) when certain transfer-codings may be used.)
The rules for when a message-body is allowed in a message differ for The rules for when a message-body is allowed in a message differ for
requests and responses. requests and responses.
skipping to change at page 38, line 5 skipping to change at page 40, line 5
the message-body. HTTP/1.1 user agents MUST notify the user when an the message-body. HTTP/1.1 user agents MUST notify the user when an
invalid length is received and detected. invalid length is received and detected.
4.5. General Header Fields 4.5. General Header Fields
There are a few header fields which have general applicability for There are a few header fields which have general applicability for
both request and response messages, but which do not apply to the both request and response messages, but which do not apply to the
entity being transferred. These header fields apply only to the entity being transferred. These header fields apply only to the
message being transmitted. message being transmitted.
general-header = Cache-Control ; Section 14.9 general-header = Cache-Control ; Section 14.9
| Connection ; Section 14.10 | Connection ; Section 14.10
| Date ; Section 14.18 | Date ; Section 14.18
| Pragma ; Section 14.32 | Pragma ; Section 14.32
| Trailer ; Section 14.40 | Trailer ; Section 14.40
| Transfer-Encoding ; Section 14.41 | Transfer-Encoding ; Section 14.41
| Upgrade ; Section 14.42 | Upgrade ; Section 14.42
| Via ; Section 14.45 | Via ; Section 14.45
| Warning ; Section 14.46 | Warning ; Section 14.46
General-header field names can be extended reliably only in General-header field names can be extended reliably only in
combination with a change in the protocol version. However, new or combination with a change in the protocol version. However, new or
experimental header fields may be given the semantics of general experimental header fields may be given the semantics of general
header fields if all parties in the communication recognize them to header fields if all parties in the communication recognize them to
be general-header fields. Unrecognized header fields are treated as be general-header fields. Unrecognized header fields are treated as
entity-header fields. entity-header fields.
5. Request 5. Request
A request message from a client to a server includes, within the A request message from a client to a server includes, within the
first line of that message, the method to be applied to the resource, first line of that message, the method to be applied to the resource,
the identifier of the resource, and the protocol version in use. the identifier of the resource, and the protocol version in use.
Request = Request-Line ; Section 5.1 Request = Request-Line ; Section 5.1
*(( general-header ; Section 4.5 *(( general-header ; Section 4.5
| request-header ; Section 5.3 | request-header ; Section 5.3
| entity-header ) CRLF) ; Section 7.1 | entity-header ) CRLF) ; Section 7.1
CRLF CRLF
[ message-body ] ; Section 4.3 [ message-body ] ; Section 4.3
5.1. Request-Line 5.1. Request-Line
The Request-Line begins with a method token, followed by the Request- The Request-Line begins with a method token, followed by the Request-
URI and the protocol version, and ending with CRLF. The elements are URI and the protocol version, and ending with CRLF. The elements are
separated by SP characters. No CR or LF is allowed except in the separated by SP characters. No CR or LF is allowed except in the
final CRLF sequence. final CRLF sequence.
Request-Line = Method SP Request-URI SP HTTP-Version CRLF Request-Line = Method SP Request-URI SP HTTP-Version CRLF
5.1.1. Method 5.1.1. Method
The Method token indicates the method to be performed on the resource The Method token indicates the method to be performed on the resource
identified by the Request-URI. The method is case-sensitive. identified by the Request-URI. The method is case-sensitive.
Method = "OPTIONS" ; Section 9.2 Method = "OPTIONS" ; Section 9.2
| "GET" ; Section 9.3 | "GET" ; Section 9.3
| "HEAD" ; Section 9.4 | "HEAD" ; Section 9.4
| "POST" ; Section 9.5 | "POST" ; Section 9.5
| "PUT" ; Section 9.6 | "PUT" ; Section 9.6
| "DELETE" ; Section 9.7 | "DELETE" ; Section 9.7
| "TRACE" ; Section 9.8 | "TRACE" ; Section 9.8
| "CONNECT" ; Section 9.9 | "CONNECT" ; Section 9.9
| extension-method | extension-method
extension-method = token extension-method = token
The list of methods allowed by a resource can be specified in an The list of methods allowed by a resource can be specified in an
Allow header field (Section 14.7). The return code of the response Allow header field (Section 14.7). The return code of the response
always notifies the client whether a method is currently allowed on a always notifies the client whether a method is currently allowed on a
resource, since the set of allowed methods can change dynamically. resource, since the set of allowed methods can change dynamically.
An origin server SHOULD return the status code 405 (Method Not An origin server SHOULD return the status code 405 (Method Not
Allowed) if the method is known by the origin server but not allowed Allowed) if the method is known by the origin server but not allowed
for the requested resource, and 501 (Not Implemented) if the method for the requested resource, and 501 (Not Implemented) if the method
is unrecognized or not implemented by the origin server. The methods is unrecognized or not implemented by the origin server. The methods
GET and HEAD MUST be supported by all general-purpose servers. All GET and HEAD MUST be supported by all general-purpose servers. All
other methods are OPTIONAL; however, if the above methods are other methods are OPTIONAL; however, if the above methods are
implemented, they MUST be implemented with the same semantics as implemented, they MUST be implemented with the same semantics as
those specified in Section 9. those specified in Section 9.
5.1.2. Request-URI 5.1.2. Request-URI
The Request-URI is a Uniform Resource Identifier (Section 3.2) and The Request-URI is a Uniform Resource Identifier (Section 3.2) and
identifies the resource upon which to apply the request. identifies the resource upon which to apply the request.
Request-URI = "*" | absoluteURI | abs_path | authority Request-URI = "*" | absoluteURI | abs_path | authority
The four options for Request-URI are dependent on the nature of the The four options for Request-URI are dependent on the nature of the
request. The asterisk "*" means that the request does not apply to a request. The asterisk "*" means that the request does not apply to a
particular resource, but to the server itself, and is only allowed particular resource, but to the server itself, and is only allowed
when the method used does not necessarily apply to a resource. One when the method used does not necessarily apply to a resource. One
example would be example would be
OPTIONS * HTTP/1.1 OPTIONS * HTTP/1.1
The absoluteURI form is REQUIRED when the request is being made to a The absoluteURI form is REQUIRED when the request is being made to a
proxy. The proxy is requested to forward the request or service it proxy. The proxy is requested to forward the request or service it
from a valid cache, and return the response. Note that the proxy MAY from a valid cache, and return the response. Note that the proxy MAY
forward the request on to another proxy or directly to the server forward the request on to another proxy or directly to the server
specified by the absoluteURI. In order to avoid request loops, a specified by the absoluteURI. In order to avoid request loops, a
proxy MUST be able to recognize all of its server names, including proxy MUST be able to recognize all of its server names, including
any aliases, local variations, and the numeric IP address. An any aliases, local variations, and the numeric IP address. An
example Request-Line would be: example Request-Line would be:
GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.1 GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.1
To allow for transition to absoluteURIs in all requests in future To allow for transition to absoluteURIs in all requests in future
versions of HTTP, all HTTP/1.1 servers MUST accept the absoluteURI versions of HTTP, all HTTP/1.1 servers MUST accept the absoluteURI
form in requests, even though HTTP/1.1 clients will only generate form in requests, even though HTTP/1.1 clients will only generate
them in requests to proxies. them in requests to proxies.
The authority form is only used by the CONNECT method (Section 9.9). The authority form is only used by the CONNECT method (Section 9.9).
The most common form of Request-URI is that used to identify a The most common form of Request-URI is that used to identify a
resource on an origin server or gateway. In this case the absolute resource on an origin server or gateway. In this case the absolute
path of the URI MUST be transmitted (see Section 3.2.1, abs_path) as path of the URI MUST be transmitted (see Section 3.2.1, abs_path) as
the Request-URI, and the network location of the URI (authority) MUST the Request-URI, and the network location of the URI (authority) MUST
be transmitted in a Host header field. For example, a client wishing be transmitted in a Host header field. For example, a client wishing
to retrieve the resource above directly from the origin server would to retrieve the resource above directly from the origin server would
create a TCP connection to port 80 of the host "www.w3.org" and send create a TCP connection to port 80 of the host "www.w3.org" and send
the lines: the lines:
GET /pub/WWW/TheProject.html HTTP/1.1 GET /pub/WWW/TheProject.html HTTP/1.1
Host: www.w3.org Host: www.w3.org
followed by the remainder of the Request. Note that the absolute followed by the remainder of the Request. Note that the absolute
path cannot be empty; if none is present in the original URI, it MUST path cannot be empty; if none is present in the original URI, it MUST
be given as "/" (the server root). be given as "/" (the server root).
The Request-URI is transmitted in the format specified in The Request-URI is transmitted in the format specified in section
Section 3.2.1. If the Request-URI is encoded using the "% HEX HEX" 3.2.1. If the Request-URI is encoded using the "% HEX HEX" encoding
encoding [42], the origin server MUST decode the Request-URI in order [42], the origin server MUST decode the Request-URI in order to
to properly interpret the request. Servers SHOULD respond to invalid properly interpret the request. Servers SHOULD respond to invalid
Request-URIs with an appropriate status code. Request-URIs with an appropriate status code.
A transparent proxy MUST NOT rewrite the "abs_path" part of the A transparent proxy MUST NOT rewrite the "abs_path" part of the
received Request-URI when forwarding it to the next inbound server, received Request-URI when forwarding it to the next inbound server,
except as noted above to replace a null abs_path with "/". except as noted above to replace a null abs_path with "/".
Note: The "no rewrite" rule prevents the proxy from changing the Note: The "no rewrite" rule prevents the proxy from changing the
meaning of the request when the origin server is improperly using meaning of the request when the origin server is improperly using
a non-reserved URI character for a reserved purpose. Implementors a non-reserved URI character for a reserved purpose. Implementors
should be aware that some pre-HTTP/1.1 proxies have been known to should be aware that some pre-HTTP/1.1 proxies have been known to
rewrite the Request-URI. rewrite the Request-URI.
5.2. The Resource Identified by a Request 5.2. The Resource Identified by a Request
The exact resource identified by an Internet request is determined by The exact resource identified by an Internet request is determined by
examining both the Request-URI and the Host header field. examining both the Request-URI and the Host header field.
An origin server that does not allow resources to differ by the An origin server that does not allow resources to differ by the
requested host MAY ignore the Host header field value when requested host MAY ignore the Host header field value when
determining the resource identified by an HTTP/1.1 request. (But see determining the resource identified by an HTTP/1.1 request. (But see
Appendix A.6.1.1 for other requirements on Host support in HTTP/1.1.) Appendix F.1.1 for other requirements on Host support in HTTP/1.1.)
An origin server that does differentiate resources based on the host An origin server that does differentiate resources based on the host
requested (sometimes referred to as virtual hosts or vanity host requested (sometimes referred to as virtual hosts or vanity host
names) MUST use the following rules for determining the requested names) MUST use the following rules for determining the requested
resource on an HTTP/1.1 request: resource on an HTTP/1.1 request:
1. If Request-URI is an absoluteURI, the host is part of the 1. If Request-URI is an absoluteURI, the host is part of the
Request-URI. Any Host header field value in the request MUST be Request-URI. Any Host header field value in the request MUST be
ignored. ignored.
skipping to change at page 42, line 16 skipping to change at page 44, line 16
exact resource is being requested. exact resource is being requested.
5.3. Request Header Fields 5.3. Request Header Fields
The request-header fields allow the client to pass additional The request-header fields allow the client to pass additional
information about the request, and about the client itself, to the information about the request, and about the client itself, to the
server. These fields act as request modifiers, with semantics server. These fields act as request modifiers, with semantics
equivalent to the parameters on a programming language method equivalent to the parameters on a programming language method
invocation. invocation.
request-header = Accept ; Section 14.1 request-header = Accept ; Section 14.1
| Accept-Charset ; Section 14.2 | Accept-Charset ; Section 14.2
| Accept-Encoding ; Section 14.3 | Accept-Encoding ; Section 14.3
| Accept-Language ; Section 14.4 | Accept-Language ; Section 14.4
| Authorization ; Section 14.8 | Authorization ; Section 14.8
| Expect ; Section 14.20 | Expect ; Section 14.20
| From ; Section 14.22 | From ; Section 14.22
| Host ; Section 14.23 | Host ; Section 14.23
| If-Match ; Section 14.24 | If-Match ; Section 14.24
| If-Modified-Since ; Section 14.25 | If-Modified-Since ; Section 14.25
| If-None-Match ; Section 14.26 | If-None-Match ; Section 14.26
| If-Range ; Section 14.27 | If-Range ; Section 14.27
| If-Unmodified-Since ; Section 14.28 | If-Unmodified-Since ; Section 14.28
| Max-Forwards ; Section 14.31 | Max-Forwards ; Section 14.31
| Proxy-Authorization ; Section 14.34 | Proxy-Authorization ; Section 14.34
| Range ; Section 14.35 | Range ; Section 14.35
| Referer ; Section 14.36 | Referer ; Section 14.36
| TE ; Section 14.39 | TE ; Section 14.39
| User-Agent ; Section 14.43 | User-Agent ; Section 14.43
Request-header field names can be extended reliably only in Request-header field names can be extended reliably only in
combination with a change in the protocol version. However, new or combination with a change in the protocol version. However, new or
experimental header fields MAY be given the semantics of request- experimental header fields MAY be given the semantics of request-
header fields if all parties in the communication recognize them to header fields if all parties in the communication recognize them to
be request-header fields. Unrecognized header fields are treated as be request-header fields. Unrecognized header fields are treated as
entity-header fields. entity-header fields.
6. Response 6. Response
After receiving and interpreting a request message, a server responds After receiving and interpreting a request message, a server responds
with an HTTP response message. with an HTTP response message.
Response = Status-Line ; Section 6.1 Response = Status-Line ; Section 6.1
*(( general-header ; Section 4.5 *(( general-header ; Section 4.5
| response-header ; Section 6.2 | response-header ; Section 6.2
| entity-header ) CRLF) ; Section 7.1 | entity-header ) CRLF) ; Section 7.1
CRLF CRLF
[ message-body ] ; Section 7.2 [ message-body ] ; Section 7.2
6.1. Status-Line 6.1. Status-Line
The first line of a Response message is the Status-Line, consisting The first line of a Response message is the Status-Line, consisting
of the protocol version followed by a numeric status code and its of the protocol version followed by a numeric status code and its
associated textual phrase, with each element separated by SP associated textual phrase, with each element separated by SP
characters. No CR or LF is allowed except in the final CRLF characters. No CR or LF is allowed except in the final CRLF
sequence. sequence.
Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
6.1.1. Status Code and Reason Phrase 6.1.1. Status Code and Reason Phrase
The Status-Code element is a 3-digit integer result code of the The Status-Code element is a 3-digit integer result code of the
attempt to understand and satisfy the request. These codes are fully attempt to understand and satisfy the request. These codes are fully
defined in Section 10. The Reason-Phrase is intended to give a short defined in Section 10. The Reason-Phrase is intended to give a short
textual description of the Status-Code. The Status-Code is intended textual description of the Status-Code. The Status-Code is intended
for use by automata and the Reason-Phrase is intended for the human for use by automata and the Reason-Phrase is intended for the human
user. The client is not required to examine or display the Reason- user. The client is not required to examine or display the Reason-
Phrase. Phrase.
skipping to change at page 45, line 5 skipping to change at page 47, line 5
o 5xx: Server Error - The server failed to fulfill an apparently o 5xx: Server Error - The server failed to fulfill an apparently
valid request valid request
The individual values of the numeric status codes defined for The individual values of the numeric status codes defined for
HTTP/1.1, and an example set of corresponding Reason-Phrase's, are HTTP/1.1, and an example set of corresponding Reason-Phrase's, are
presented below. The reason phrases listed here are only presented below. The reason phrases listed here are only
recommendations -- they MAY be replaced by local equivalents without recommendations -- they MAY be replaced by local equivalents without
affecting the protocol. affecting the protocol.
Status-Code = Status-Code =
"100" ; Section 10.1.1: Continue "100" ; Section 10.1.1: Continue
| "101" ; Section 10.1.2: Switching Protocols | "101" ; Section 10.1.2: Switching Protocols
| "200" ; Section 10.2.1: OK | "200" ; Section 10.2.1: OK
| "201" ; Section 10.2.2: Created | "201" ; Section 10.2.2: Created
| "202" ; Section 10.2.3: Accepted | "202" ; Section 10.2.3: Accepted
| "203" ; Section 10.2.4: Non-Authoritative Information | "203" ; Section 10.2.4: Non-Authoritative Information
| "204" ; Section 10.2.5: No Content | "204" ; Section 10.2.5: No Content
| "205" ; Section 10.2.6: Reset Content | "205" ; Section 10.2.6: Reset Content
| "206" ; Section 10.2.7: Partial Content | "206" ; Section 10.2.7 Partial Content
| "300" ; Section 10.3.1: Multiple Choices | "300" ; Section 10.3.1: Multiple Choices
| "301" ; Section 10.3.2: Moved Permanently | "301" ; Section 10.3.2: Moved Permanently
| "302" ; Section 10.3.3: Found | "302" ; Section 10.3.3: Found
| "303" ; Section 10.3.4: See Other | "303" ; Section 10.3.4: See Other
| "304" ; Section 10.3.5: Not Modified | "304" ; Section 10.3.5: Not Modified
| "305" ; Section 10.3.6: Use Proxy | "305" ; Section 10.3.6: Use Proxy
| "307" ; Section 10.3.8: Temporary Redirect | "307" ; Section 10.3.8: Temporary Redirect
| "400" ; Section 10.4.1: Bad Request | "400" ; Section 10.4.1: Bad Request
| "401" ; Section 10.4.2: Unauthorized | "401" ; Section 10.4.2: Unauthorized
| "402" ; Section 10.4.3: Payment Required | "402" ; Section 10.4.3: Payment Required
| "403" ; Section 10.4.4: Forbidden | "403" ; Section 10.4.4: Forbidden
| "404" ; Section 10.4.5: Not Found | "404" ; Section 10.4.5: Not Found
| "405" ; Section 10.4.6: Method Not Allowed | "405" ; Section 10.4.6: Method Not Allowed
| "406" ; Section 10.4.7: Not Acceptable | "406" ; Section 10.4.7: Not Acceptable
| "407" ; Section 10.4.8: Proxy Authentication Required | "407" ; Section 10.4.8: Proxy Authentication Required
| "408" ; Section 10.4.9: Request Time-out | "408" ; Section 10.4.9: Request Time-out
| "409" ; Section 10.4.10: Conflict | "409" ; Section 10.4.10: Conflict
| "410" ; Section 10.4.11: Gone | "410" ; Section 10.4.11: Gone
| "411" ; Section 10.4.12: Length Required | "411" ; Section 10.4.12: Length Required
| "412" ; Section 10.4.13: Precondition Failed | "412" ; Section 10.4.13: Precondition Failed
| "413" ; Section 10.4.14: Request Entity Too Large | "413" ; Section 10.4.14: Request Entity Too Large
| "414" ; Section 10.4.15: Request-URI Too Large | "414" ; Section 10.4.15: Request-URI Too Large
| "415" ; Section 10.4.16: Unsupported Media Type | "415" ; Section 10.4.16: Unsupported Media Type
| "416" ; Section 10.4.17: Requested range not satisfiable | "416" ; Section 10.4.17: Requested range not satisfiable
| "417" ; Section 10.4.18: Expectation Failed | "417" ; Section 10.4.18: Expectation Failed
| "500" ; Section 10.5.1: Internal Server Error | "500" ; Section 10.5.1: Internal Server Error
| "501" ; Section 10.5.2: Not Implemented | "501" ; Section 10.5.2: Not Implemented
| "502" ; Section 10.5.3: Bad Gateway | "502" ; Section 10.5.3: Bad Gateway
| "503" ; Section 10.5.4: Service Unavailable | "503" ; Section 10.5.4: Service Unavailable
| "504" ; Section 10.5.5: Gateway Time-out | "504" ; Section 10.5.5: Gateway Time-out
| "505" ; Section 10.5.6: HTTP Version not supported | "505" ; Section 10.5.6: HTTP Version not supported
| extension-code | extension-code
extension-code = 3DIGIT extension-code = 3DIGIT
Reason-Phrase = *<TEXT, excluding CR, LF> Reason-Phrase = *<TEXT, excluding CR, LF>
HTTP status codes are extensible. HTTP applications are not required HTTP status codes are extensible. HTTP applications are not required
to understand the meaning of all registered status codes, though such to understand the meaning of all registered status codes, though such
understanding is obviously desirable. However, applications MUST understanding is obviously desirable. However, applications MUST
understand the class of any status code, as indicated by the first understand the class of any status code, as indicated by the first
digit, and treat any unrecognized response as being equivalent to the digit, and treat any unrecognized response as being equivalent to the
x00 status code of that class, with the exception that an x00 status code of that class, with the exception that an
unrecognized response MUST NOT be cached. For example, if an unrecognized response MUST NOT be cached. For example, if an
unrecognized status code of 431 is received by the client, it can unrecognized status code of 431 is received by the client, it can
safely assume that there was something wrong with its request and safely assume that there was something wrong with its request and
skipping to change at page 46, line 23 skipping to change at page 48, line 23
with the response, since that entity is likely to include human- with the response, since that entity is likely to include human-
readable information which will explain the unusual status. readable information which will explain the unusual status.
6.2. Response Header Fields 6.2. Response Header Fields
The response-header fields allow the server to pass additional The response-header fields allow the server to pass additional
information about the response which cannot be placed in the Status- information about the response which cannot be placed in the Status-
Line. These header fields give information about the server and Line. These header fields give information about the server and
about further access to the resource identified by the Request-URI. about further access to the resource identified by the Request-URI.
response-header = Accept-Ranges ; Section 14.5 response-header = Accept-Ranges ; Section 14.5
| Age ; Section 14.6 | Age ; Section 14.6
| ETag ; Section 14.19 | ETag ; Section 14.19
| Location ; Section 14.30 | Location ; Section 14.30
| Proxy-Authenticate ; Section 14.33 | Proxy-Authenticate ; Section 14.33
| Retry-After ; Section 14.37 | Retry-After ; Section 14.37
| Server ; Section 14.38 | Server ; Section 14.38
| Vary ; Section 14.44 | Vary ; Section 14.44
| WWW-Authenticate ; Section 14.47 | WWW-Authenticate ; Section 14.47
Response-header field names can be extended reliably only in Response-header field names can be extended reliably only in
combination with a change in the protocol version. However, new or combination with a change in the protocol version. However, new or
experimental header fields MAY be given the semantics of response- experimental header fields MAY be given the semantics of response-
header fields if all parties in the communication recognize them to header fields if all parties in the communication recognize them to
be response-header fields. Unrecognized header fields are treated as be response-header fields. Unrecognized header fields are treated as
entity-header fields. entity-header fields.
7. Entity 7. Entity
skipping to change at page 47, line 22 skipping to change at page 49, line 22
In this section, both sender and recipient refer to either the client In this section, both sender and recipient refer to either the client
or the server, depending on who sends and who receives the entity. or the server, depending on who sends and who receives the entity.
7.1. Entity Header Fields 7.1. Entity Header Fields
Entity-header fields define metainformation about the entity-body or, Entity-header fields define metainformation about the entity-body or,
if no body is present, about the resource identified by the request. if no body is present, about the resource identified by the request.
Some of this metainformation is OPTIONAL; some might be REQUIRED by Some of this metainformation is OPTIONAL; some might be REQUIRED by
portions of this specification. portions of this specification.
entity-header = Allow ; Section 14.7 entity-header = Allow ; Section 14.7
| Content-Encoding ; Section 14.11 | Content-Encoding ; Section 14.11
| Content-Language ; Section 14.12 | Content-Language ; Section 14.12
| Content-Length ; Section 14.13 | Content-Length ; Section 14.13
| Content-Location ; Section 14.14 | Content-Location ; Section 14.14
| Content-MD5 ; Section 14.15 | Content-MD5 ; Section 14.15
| Content-Range ; Section 14.16 | Content-Range ; Section 14.16
| Content-Type ; Section 14.17 | Content-Type ; Section 14.17
| Expires ; Section 14.21 | Expires ; Section 14.21
| Last-Modified ; Section 14.29 | Last-Modified ; Section 14.29
| extension-header | extension-header
extension-header = message-header extension-header = message-header
The extension-header mechanism allows additional entity-header fields The extension-header mechanism allows additional entity-header fields
to be defined without changing the protocol, but these fields cannot to be defined without changing the protocol, but these fields cannot
be assumed to be recognizable by the recipient. Unrecognized header be assumed to be recognizable by the recipient. Unrecognized header
fields SHOULD be ignored by the recipient and MUST be forwarded by fields SHOULD be ignored by the recipient and MUST be forwarded by
transparent proxies. transparent proxies.
7.2. Entity Body 7.2. Entity Body
The entity-body (if any) sent with an HTTP request or response is in The entity-body (if any) sent with an HTTP request or response is in
a format and encoding defined by the entity-header fields. a format and encoding defined by the entity-header fields.
entity-body = *OCTET entity-body = *OCTET
An entity-body is only present in a message when a message-body is An entity-body is only present in a message when a message-body is
present, as described in Section 4.3. The entity-body is obtained present, as described in Section 4.3. The entity-body is obtained
from the message-body by decoding any Transfer-Encoding that might from the message-body by decoding any Transfer-Encoding that might
have been applied to ensure safe and proper transfer of the message. have been applied to ensure safe and proper transfer of the message.
7.2.1. Type 7.2.1. Type
When an entity-body is included with a message, the data type of that When an entity-body is included with a message, the data type of that
body is determined via the header fields Content-Type and Content- body is determined via the header fields Content-Type and Content-
Encoding. These define a two-layer, ordered encoding model: Encoding. These define a two-layer, ordered encoding model:
entity-body := Content-Encoding( Content-Type( data ) ) entity-body := Content-Encoding( Content-Type( data ) )
Content-Type specifies the media type of the underlying data. Content-Type specifies the media type of the underlying data.
Content-Encoding may be used to indicate any additional content Content-Encoding may be used to indicate any additional content
codings applied to the data, usually for the purpose of data codings applied to the data, usually for the purpose of data
compression, that are a property of the requested resource. There is compression, that are a property of the requested resource. There is
no default encoding. no default encoding.
Any HTTP/1.1 message containing an entity-body SHOULD include a Any HTTP/1.1 message containing an entity-body SHOULD include a
Content-Type header field defining the media type of that body. If Content-Type header field defining the media type of that body. If
and only if the media type is not given by a Content-Type field, the and only if the media type is not given by a Content-Type field, the
skipping to change at page 50, line 36 skipping to change at page 52, line 36
case the client does not want to maintain a connection for more than case the client does not want to maintain a connection for more than
that request, it SHOULD send a Connection header including the that request, it SHOULD send a Connection header including the
connection-token close. connection-token close.
If either the client or the server sends the close token in the If either the client or the server sends the close token in the
Connection header, that request becomes the last one for the Connection header, that request becomes the last one for the
connection. connection.
Clients and servers SHOULD NOT assume that a persistent connection is Clients and servers SHOULD NOT assume that a persistent connection is
maintained for HTTP versions less than 1.1 unless it is explicitly maintained for HTTP versions less than 1.1 unless it is explicitly
signaled. See Appendix A.6.2 for more information on backward signaled. See Appendix F.2 for more information on backward
compatibility with HTTP/1.0 clients. compatibility with HTTP/1.0 clients.
In order to remain persistent, all messages on the connection MUST In order to remain persistent, all messages on the connection MUST
have a self-defined message length (i.e., one not defined by closure have a self-defined message length (i.e., one not defined by closure
of the connection), as described in Section 4.4. of the connection), as described in Section 4.4.
8.1.2.2. Pipelining 8.1.2.2. Pipelining
A client that supports persistent connections MAY "pipeline" its A client that supports persistent connections MAY "pipeline" its
requests (i.e., send multiple requests without waiting for each requests (i.e., send multiple requests without waiting for each
skipping to change at page 88, line 6 skipping to change at page 90, line 6
1. now minus date_value, if the local clock is reasonably well 1. now minus date_value, if the local clock is reasonably well
synchronized to the origin server's clock. If the result is synchronized to the origin server's clock. If the result is
negative, the result is replaced by zero. negative, the result is replaced by zero.
2. age_value, if all of the caches along the response path implement 2. age_value, if all of the caches along the response path implement
HTTP/1.1. HTTP/1.1.
Given that we have two independent ways to compute the age of a Given that we have two independent ways to compute the age of a
response when it is received, we can combine these as response when it is received, we can combine these as
corrected_received_age = max(now - date_value, age_value) corrected_received_age = max(now - date_value, age_value)
and as long as we have either nearly synchronized clocks or all- and as long as we have either nearly synchronized clocks or all-
HTTP/1.1 paths, one gets a reliable (conservative) result. HTTP/1.1 paths, one gets a reliable (conservative) result.
Because of network-imposed delays, some significant interval might Because of network-imposed delays, some significant interval might
pass between the time that a server generates a response and the time pass between the time that a server generates a response and the time
it is received at the next outbound cache or client. If uncorrected, it is received at the next outbound cache or client. If uncorrected,
this delay could result in improperly low ages. this delay could result in improperly low ages.
Because the request that resulted in the returned Age value must have Because the request that resulted in the returned Age value must have
been initiated prior to that Age value's generation, we can correct been initiated prior to that Age value's generation, we can correct
for delays imposed by the network by recording the time at which the for delays imposed by the network by recording the time at which the
request was initiated. Then, when an Age value is received, it MUST request was initiated. Then, when an Age value is received, it MUST
be interpreted relative to the time the request was initiated, not be interpreted relative to the time the request was initiated, not
the time that the response was received. This algorithm results in the time that the response was received. This algorithm results in
conservative behavior no matter how much delay is experienced. So, conservative behavior no matter how much delay is experienced. So,
we compute: we compute:
corrected_initial_age = corrected_received_age corrected_initial_age = corrected_received_age
+ (now - request_time) + (now - request_time)
where "request_time" is the time (according to the local clock) when where "request_time" is the time (according to the local clock) when
the request that elicited this response was sent. the request that elicited this response was sent.
Summary of age calculation algorithm, when a cache receives a Summary of age calculation algorithm, when a cache receives a
response: response:
/* /*
* age_value * age_value
* is the value of Age: header received by the cache with * is the value of Age: header received by the cache with
* this response. * this response.
* date_value * date_value
* is the value of the origin server's Date: header * is the value of the origin server's Date: header
* request_time * request_time
* is the (local) time when the cache made the request * is the (local) time when the cache made the request
* that resulted in this cached response * that resulted in this cached response
* response_time * response_time
* is the (local) time when the cache received the * is the (local) time when the cache received the
* response * response
* now * now
* is the current (local) time * is the current (local) time
*/ */
apparent_age = max(0, response_time - date_value); apparent_age = max(0, response_time - date_value);
corrected_received_age = max(apparent_age, age_value); corrected_received_age = max(apparent_age, age_value);
response_delay = response_time - request_time; response_delay = response_time - request_time;
corrected_initial_age = corrected_received_age + response_delay; corrected_initial_age = corrected_received_age + response_delay;
resident_time = now - response_time; resident_time = now - response_time;
current_age = corrected_initial_age + resident_time; current_age = corrected_initial_age + resident_time;
The current_age of a cache entry is calculated by adding the amount The current_age of a cache entry is calculated by adding the amount
of time (in seconds) since the cache entry was last validated by the of time (in seconds) since the cache entry was last validated by the
origin server to the corrected_initial_age. When a response is origin server to the corrected_initial_age. When a response is
generated from a cache entry, the cache MUST include a single Age generated from a cache entry, the cache MUST include a single Age
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
skipping to change at page 90, line 10 skipping to change at page 92, line 10
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 14.9.3). the Cache-Control header in a response (see Section 14.9.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 14.9.3) appears in the response, and the s-maxage (see Section 14.9.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)
13.2.5. Disambiguating Expiration Values 13.2.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
skipping to change at page 91, line 26 skipping to change at page 93, line 26
Neither the entity tag nor the expiration value can impose an Neither the entity tag nor the expiration value can impose an
ordering on responses, since it is possible that a later response ordering on responses, since it is possible that a later response
intentionally carries an earlier expiration time. The Date values intentionally carries an earlier expiration time. The Date values
are ordered to a granularity of one second. are ordered to a granularity of one second.
When a client tries to revalidate a cache entry, and the response it When a client tries to revalidate a cache entry, and the response it
receives contains a Date header that appears to be older than the one receives contains a Date header that appears to be older than the one
for the existing entry, then the client SHOULD repeat the request for the existing entry, then the client SHOULD repeat the request
unconditionally, and include unconditionally, and include
Cache-Control: max-age=0 Cache-Control: max-age=0
to force any intermediate caches to validate their copies directly to force any intermediate caches to validate their copies directly
with the origin server, or with the origin server, or
Cache-Control: no-cache Cache-Control: no-cache
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.
skipping to change at page 100, line 35 skipping to change at page 102, line 35
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. A transparent proxy MUST according to the rules in Section 4.4. A transparent proxy MUST
preserve the entity-length (Section 7.2.2) of the entity-body, preserve the entity-length (Section 7.2.2) of the entity-body,
although it MAY change the transfer-length (Section 4.4). although it MAY change the transfer-length (section Section 4.4).
13.5.3. Combining Headers 13.5.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
skipping to change at page 107, line 20 skipping to change at page 109, line 20
sends and who receives the entity. sends and who receives the entity.
14.1. Accept 14.1. Accept
The Accept request-header field can be used to specify certain media The Accept request-header field can be used to specify certain media
types which are acceptable for the response. Accept headers can be types which are acceptable for the response. Accept headers can be
used to indicate that the request is specifically limited to a small used to indicate that the request is specifically limited to a small
set of desired types, as in the case of a request for an in-line set of desired types, as in the case of a request for an in-line
image. image.
Accept = "Accept" ":" Accept = "Accept" ":"
#( media-range [ accept-params ] ) #( media-range [ accept-params ] )
media-range = ( "*/*" media-range = ( "*/*"
| ( type "/" "*" ) | ( type "/" "*" )
| ( type "/" subtype ) | ( type "/" subtype )
) *( ";" parameter ) ) *( ";" parameter )
accept-params = ";" "q" "=" qvalue *( accept-extension ) accept-params = ";" "q" "=" qvalue *( accept-extension )
accept-extension = ";" token [ "=" ( token | quoted-string ) ] accept-extension = ";" token [ "=" ( token | quoted-string ) ]
The asterisk "*" character is used to group media types into ranges, The asterisk "*" character is used to group media types into ranges,
with "*/*" indicating all media types and "type/*" indicating all with "*/*" indicating all media types and "type/*" indicating all
subtypes of that type. The media-range MAY include media type subtypes of that type. The media-range MAY include media type
parameters that are applicable to that range. parameters that are applicable to that range.
Each media-range MAY be followed by one or more accept-params, Each media-range MAY be followed by one or more accept-params,
beginning with the "q" parameter for indicating a relative quality beginning with the "q" parameter for indicating a relative quality
factor. The first "q" parameter (if any) separates the media-range factor. The first "q" parameter (if any) separates the media-range
parameter(s) from the accept-params. Quality factors allow the user parameter(s) from the accept-params. Quality factors allow the user
skipping to change at page 108, line 4 skipping to change at page 110, line 4
Note: Use of the "q" parameter name to separate media type Note: Use of the "q" parameter name to separate media type
parameters from Accept extension parameters is due to historical parameters from Accept extension parameters is due to historical
practice. Although this prevents any media type parameter named practice. Although this prevents any media type parameter named
"q" from being used with a media range, such an event is believed "q" from being used with a media range, such an event is believed
to be unlikely given the lack of any "q" parameters in the IANA to be unlikely given the lack of any "q" parameters in the IANA
media type registry and the rare usage of any media type media type registry and the rare usage of any media type
parameters in Accept. Future media types are discouraged from parameters in Accept. Future media types are discouraged from
registering any parameter named "q". registering any parameter named "q".
The example The example
Accept: audio/*; q=0.2, audio/basic Accept: audio/*; q=0.2, audio/basic
SHOULD be interpreted as "I prefer audio/basic, but send me any audio SHOULD be interpreted as "I prefer audio/basic, but send me any audio
type if it is the best available after an 80% mark-down in quality." type if it is the best available after an 80% mark-down in quality."
If no Accept header field is present, then it is assumed that the If no Accept header field is present, then it is assumed that the
client accepts all media types. If an Accept header field is client accepts all media types. If an Accept header field is
present, and if the server cannot send a response which is acceptable present, and if the server cannot send a response which is acceptable
according to the combined Accept field value, then the server SHOULD according to the combined Accept field value, then the server SHOULD
send a 406 (not acceptable) response. send a 406 (not acceptable) response.
A more elaborate example is A more elaborate example is
Accept: text/plain; q=0.5, text/html, Accept: text/plain; q=0.5, text/html,
text/x-dvi; q=0.8, text/x-c text/x-dvi; q=0.8, text/x-c
Verbally, this would be interpreted as "text/html and text/x-c are Verbally, this would be interpreted as "text/html and text/x-c are
the preferred media types, but if they do not exist, then send the the preferred media types, but if they do not exist, then send the
text/x-dvi entity, and if that does not exist, send the text/plain text/x-dvi entity, and if that does not exist, send the text/plain
entity." entity."
Media ranges can be overridden by more specific media ranges or Media ranges can be overridden by more specific media ranges or
specific media types. If more than one media range applies to a specific media types. If more than one media range applies to a
given type, the most specific reference has precedence. For example, given type, the most specific reference has precedence. For example,
Accept: text/*, text/html, text/html;level=1, */* Accept: text/*, text/html, text/html;level=1, */*
have the following precedence: have the following precedence:
1) text/html;level=1 1) text/html;level=1
2) text/html 2) text/html
3) text/* 3) text/*
4) */* 4) */*
The media type quality factor associated with a given type is The media type quality factor associated with a given type is
determined by finding the media range with the highest precedence determined by finding the media range with the highest precedence
which matches that type. For example, which matches that type. For example,
Accept: text/*;q=0.3, text/html;q=0.7, text/html;level=1, Accept: text/*;q=0.3, text/html;q=0.7, text/html;level=1,
text/html;level=2;q=0.4, */*;q=0.5 text/html;level=2;q=0.4, */*;q=0.5
would cause the following values to be associated: would cause the following values to be associated:
text/html;level=1 = 1 text/html;level=1 = 1
text/html = 0.7 text/html = 0.7
text/plain = 0.3 text/plain = 0.3
image/jpeg = 0.5 image/jpeg = 0.5
text/html;level=2 = 0.4 text/html;level=2 = 0.4
text/html;level=3 = 0.7 text/html;level=3 = 0.7
Note: A user agent might be provided with a default set of quality Note: A user agent might be provided with a default set of quality
values for certain media ranges. However, unless the user agent is a values for certain media ranges. However, unless the user agent is a
closed system which cannot interact with other rendering agents, this closed system which cannot interact with other rendering agents, this
default set ought to be configurable by the user. default set ought to be configurable by the user.
14.2. Accept-Charset 14.2. Accept-Charset
The Accept-Charset request-header field can be used to indicate what The Accept-Charset request-header field can be used to indicate what
character sets are acceptable for the response. This field allows character sets are acceptable for the response. This field allows
clients capable of understanding more comprehensive or special- clients capable of understanding more comprehensive or special-
purpose character sets to signal that capability to a server which is purpose character sets to signal that capability to a server which is
capable of representing documents in those character sets. capable of representing documents in those character sets.
Accept-Charset = "Accept-Charset" ":" Accept-Charset = "Accept-Charset" ":"
1#( ( charset | "*" )[ ";" "q" "=" qvalue ] ) 1#( ( charset | "*" )[ ";" "q" "=" qvalue ] )
Character set values are described in Section 3.4. Each charset MAY Character set values are described in Section 3.4. Each charset MAY
be given an associated quality value which represents the user's be given an associated quality value which represents the user's
preference for that charset. The default value is q=1. An example preference for that charset. The default value is q=1. An example
is is
Accept-Charset: iso-8859-5, unicode-1-1;q=0.8 Accept-Charset: iso-8859-5, unicode-1-1;q=0.8
The special value "*", if present in the Accept-Charset field, The special value "*", if present in the Accept-Charset field,
matches every character set (including ISO-8859-1) which is not matches every character set (including ISO-8859-1) which is not
mentioned elsewhere in the Accept-Charset field. If no "*" is mentioned elsewhere in the Accept-Charset field. If no "*" is
present in an Accept-Charset field, then all character sets not present in an Accept-Charset field, then all character sets not
explicitly mentioned get a quality value of 0, except for ISO-8859-1, explicitly mentioned get a quality value of 0, except for ISO-8859-1,
which gets a quality value of 1 if not explicitly mentioned. which gets a quality value of 1 if not explicitly mentioned.
If no Accept-Charset header is present, the default is that any If no Accept-Charset header is present, the default is that any
character set is acceptable. If an Accept-Charset header is present, character set is acceptable. If an Accept-Charset header is present,
skipping to change at page 109, line 49 skipping to change at page 111, line 49
according to the Accept-Charset header, then the server SHOULD send according to the Accept-Charset header, then the server SHOULD send
an error response with the 406 (not acceptable) status code, though an error response with the 406 (not acceptable) status code, though
the sending of an unacceptable response is also allowed. the sending of an unacceptable response is also allowed.
14.3. Accept-Encoding 14.3. Accept-Encoding
The Accept-Encoding request-header field is similar to Accept, but The Accept-Encoding request-header field is similar to Accept, but
restricts the content-codings (Section 3.5) that are acceptable in restricts the content-codings (Section 3.5) that are acceptable in
the response. the response.
Accept-Encoding = "Accept-Encoding" ":" Accept-Encoding = "Accept-Encoding" ":"
1#( codings [ ";" "q" "=" qvalue ] ) 1#( codings [ ";" "q" "=" qvalue ] )
codings = ( content-coding | "*" ) codings = ( content-coding | "*" )
Examples of its use are: Examples of its use are:
Accept-Encoding: compress, gzip Accept-Encoding: compress, gzip
Accept-Encoding: Accept-Encoding:
Accept-Encoding: * Accept-Encoding: *
Accept-Encoding: compress;q=0.5, gzip;q=1.0 Accept-Encoding: compress;q=0.5, gzip;q=1.0
Accept-Encoding: gzip;q=1.0, identity; q=0.5, *;q=0 Accept-Encoding: gzip;q=1.0, identity; q=0.5, *;q=0
A server tests whether a content-coding is acceptable, according to A server tests whether a content-coding is acceptable, according to
an Accept-Encoding field, using these rules: an Accept-Encoding field, using these rules:
1. If the content-coding is one of the content-codings listed in the 1. If the content-coding is one of the content-codings listed in the
Accept-Encoding field, then it is acceptable, unless it is Accept-Encoding field, then it is acceptable, unless it is
accompanied by a qvalue of 0. (As defined in Section 3.9, a accompanied by a qvalue of 0. (As defined in Section 3.9, a
qvalue of 0 means "not acceptable.") qvalue of 0 means "not acceptable.")
2. The special "*" symbol in an Accept-Encoding field matches any 2. The special "*" symbol in an Accept-Encoding field matches any
skipping to change at page 111, line 14 skipping to change at page 113, line 14
agent or client. agent or client.
Note: Most HTTP/1.0 applications do not recognize or obey qvalues Note: Most HTTP/1.0 applications do not recognize or obey qvalues
associated with content-codings. This means that qvalues will not associated with content-codings. This means that qvalues will not
work and are not permitted with x-gzip or x-compress. work and are not permitted with x-gzip or x-compress.
14.4. Accept-Language 14.4. Accept-Language
The Accept-Language request-header field is similar to Accept, but The Accept-Language request-header field is similar to Accept, but
restricts the set of natural languages that are preferred as a restricts the set of natural languages that are preferred as a
response to the request. Language tags are defined in Section 3.10. response to the request. Language tags are defined in section
Section 3.10.
Accept-Language = "Accept-Language" ":" Accept-Language = "Accept-Language" ":"
1#( language-range [ ";" "q" "=" qvalue ] ) 1#( language-range [ ";" "q" "=" qvalue ] )
language-range = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) | "*" ) language-range = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) | "*" )
Each language-range MAY be given an associated quality value which Each language-range MAY be given an associated quality value which
represents an estimate of the user's preference for the languages represents an estimate of the user's preference for the languages
specified by that range. The quality value defaults to "q=1". For specified by that range. The quality value defaults to "q=1". For
example, example,
Accept-Language: da, en-gb;q=0.8, en;q=0.7 Accept-Language: da, en-gb;q=0.8, en;q=0.7
would mean: "I prefer Danish, but will accept British English and would mean: "I prefer Danish, but will accept British English and
other types of English." A language-range matches a language-tag if other types of English." A language-range matches a language-tag if
it exactly equals the tag, or if it exactly equals a prefix of the it exactly equals the tag, or if it exactly equals a prefix of the
tag such that the first tag character following the prefix is "-". tag such that the first tag character following the prefix is "-".
The special range "*", if present in the Accept-Language field, The special range "*", if present in the Accept-Language field,
matches every tag not matched by any other range present in the matches every tag not matched by any other range present in the
Accept-Language field. Accept-Language field.
Note: This use of a prefix matching rule does not imply that Note: This use of a prefix matching rule does not imply that
skipping to change at page 112, line 28 skipping to change at page 114, line 30
might assume that on selecting "en-gb", they will be served any might assume that on selecting "en-gb", they will be served any
kind of English document if British English is not available. A kind of English document if British English is not available. A
user agent might suggest in such a case to add "en" to get the user agent might suggest in such a case to add "en" to get the
best matching behavior. best matching behavior.
14.5. Accept-Ranges 14.5. Accept-Ranges
The Accept-Ranges response-header field allows the server to indicate The Accept-Ranges response-header field allows the server to indicate
its acceptance of range requests for a resource: its acceptance of range requests for a resource:
Accept-Ranges = "Accept-Ranges" ":" acceptable-ranges Accept-Ranges = "Accept-Ranges" ":" acceptable-ranges
acceptable-ranges = 1#range-unit | "none" acceptable-ranges = 1#range-unit | "none"
Origin servers that accept byte-range requests MAY send Origin servers that accept byte-range requests MAY send
Accept-Ranges: bytes Accept-Ranges: bytes
but are not required to do so. Clients MAY generate byte-range but are not required to do so. Clients MAY generate byte-range
requests without having received this header for the resource requests without having received this header for the resource
involved. Range units are defined in Section 3.12. involved. Range units are defined in Section 3.12.
Servers that do not accept any kind of range request for a resource Servers that do not accept any kind of range request for a resource
MAY send MAY send
Accept-Ranges: none Accept-Ranges: none
to advise the client not to attempt a range request. to advise the client not to attempt a range request.
14.6. Age 14.6. 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 13.2.3. specified in Section 13.2.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.
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.
14.7. Allow 14.7. Allow
The Allow entity-header field lists the set of methods supported by The Allow entity-header field lists the set of methods supported by
the resource identified by the Request-URI. The purpose of this the resource identified by the Request-URI. The purpose of this
field is strictly to inform the recipient of valid methods associated field is strictly to inform the recipient of valid methods associated
with the resource. An Allow header field MUST be present in a 405 with the resource. An Allow header field MUST be present in a 405
(Method Not Allowed) response. (Method Not Allowed) response.
Allow = "Allow" ":" #Method Allow = "Allow" ":" #Method
Example of use: Example of use:
Allow: GET, HEAD, PUT Allow: GET, HEAD, PUT
This field cannot prevent a client from trying other methods. This field cannot prevent a client from trying other methods.
However, the indications given by the Allow header field value SHOULD However, the indications given by the Allow header field value SHOULD
be followed. The actual set of allowed methods is defined by the be followed. The actual set of allowed methods is defined by the
origin server at the time of each request. origin server at the time of each request.
The Allow header field MAY be provided with a PUT request to The Allow header field MAY be provided with a PUT request to
recommend the methods to be supported by the new or modified recommend the methods to be supported by the new or modified
resource. The server is not required to support these methods and resource. The server is not required to support these methods and
SHOULD include an Allow header in the response giving the actual SHOULD include an Allow header in the response giving the actual
skipping to change at page 114, line 9 skipping to change at page 116, line 14
14.8. Authorization 14.8. Authorization
A user agent that wishes to authenticate itself with a server-- A user agent that wishes to authenticate itself with a server--
usually, but not necessarily, after receiving a 401 response--does so usually, but not necessarily, after receiving a 401 response--does so
by including an Authorization request-header field with the request. by including an Authorization request-header field with the request.
The Authorization field value consists of credentials containing the The Authorization field value consists of credentials containing the
authentication information of the user agent for the realm of the authentication information of the user agent for the realm of the
resource being requested. resource being requested.
Authorization = "Authorization" ":" credentials Authorization = "Authorization" ":" credentials
HTTP access authentication is described in "HTTP Authentication: HTTP access authentication is described in "HTTP Authentication:
Basic and Digest Access Authentication" [43]. If a request is Basic and Digest Access Authentication" [43]. If a request is
authenticated and a realm specified, the same credentials SHOULD be authenticated and a realm specified, the same credentials SHOULD be
valid for all other requests within this realm (assuming that the valid for all other requests within this realm (assuming that the
authentication scheme itself does not require otherwise, such as authentication scheme itself does not require otherwise, such as
credentials that vary according to a challenge value or using credentials that vary according to a challenge value or using
synchronized clocks). synchronized clocks).
When a shared cache (see Section 13.7) receives a request containing When a shared cache (see Section 13.7) receives a request containing
skipping to change at page 123, line 48 skipping to change at page 126, line 9
understand. understand.
For example, consider a hypothetical new response directive called For example, consider a hypothetical new response directive called
community which acts as a modifier to the private directive. We community which acts as a modifier to the private directive. We
define this new directive to mean that, in addition to any non-shared define this new directive to mean that, in addition to any non-shared
cache, any cache which is shared only by members of the community cache, any cache which is shared only by members of the community
named within its value may cache the response. An origin server named within its value may cache the response. An origin server
wishing to allow the UCI community to use an otherwise private wishing to allow the UCI community to use an otherwise private
response in their shared cache(s) could do so by including response in their shared cache(s) could do so by including
Cache-Control: private, community="UCI" Cache-Control: private, community="UCI"
A cache seeing this header field will act correctly even if the cache A cache seeing this header field will act correctly even if the cache
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).
14.10. Connection 14.10. Connection
The Connection general-header field allows the sender to specify The Connection general-header field allows the sender to specify
options that are desired for that particular connection and MUST NOT options that are desired for that particular connection and MUST NOT
be communicated by proxies over further connections. be communicated by proxies over further connections.
The Connection header has the following grammar: The Connection header has the following grammar:
Connection = "Connection" ":" 1#(connection-token) Connection = "Connection" ":" 1#(connection-token)
connection-token = token connection-token = token
HTTP/1.1 proxies MUST parse the Connection header field before a HTTP/1.1 proxies MUST parse the Connection header field before a
message is forwarded and, for each connection-token in this field, message is forwarded and, for each connection-token in this field,
remove any header field(s) from the message with the same name as the remove any header field(s) from the message with the same name as the
connection-token. Connection options are signaled by the presence of connection-token. Connection options are signaled by the presence of
a connection-token in the Connection header field, not by any a connection-token in the Connection header field, not by any
corresponding additional header field(s), since the additional header corresponding additional header field(s), since the additional header
field may not be sent if there are no parameters associated with that field may not be sent if there are no parameters associated with that
connection option. connection option.
Message headers listed in the Connection header MUST NOT include end- Message headers listed in the Connection header MUST NOT include end-
to-end headers, such as Cache-Control. to-end headers, such as Cache-Control.
HTTP/1.1 defines the "close" connection option for the sender to HTTP/1.1 defines the "close" connection option for the sender to
signal that the connection will be closed after completion of the signal that the connection will be closed after completion of the
response. For example, response. For example,
Connection: close Connection: close
in either the request or the response header fields indicates that in either the request or the response header fields indicates that
the connection SHOULD NOT be considered `persistent' (Section 8.1) the connection SHOULD NOT be considered `persistent' (Section 8.1)
after the current request/response is complete. after the current request/response is complete.
HTTP/1.1 applications that do not support persistent connections MUST HTTP/1.1 applications that do not support persistent connections MUST
include the "close" connection option in every message. include the "close" connection option in every message.
A system receiving an HTTP/1.0 (or lower-version) message that A system receiving an HTTP/1.0 (or lower-version) message that
includes a Connection header MUST, for each connection-token in this includes a Connection header MUST, for each connection-token in this
field, remove and ignore any header field(s) from the message with field, remove and ignore any header field(s) from the message with
the same name as the connection-token. This protects against the same name as the connection-token. This protects against
mistaken forwarding of such header fields by pre-HTTP/1.1 proxies. mistaken forwarding of such header fields by pre-HTTP/1.1 proxies.
See Appendix A.6.2. See Appendix F.2.
14.11. Content-Encoding 14.11. Content-Encoding
The Content-Encoding entity-header field is used as a modifier to the The Content-Encoding entity-header field is used as a modifier to the
media-type. When present, its value indicates what additional media-type. When present, its value indicates what additional
content codings have been applied to the entity-body, and thus what content codings have been applied to the entity-body, and thus what
decoding mechanisms must be applied in order to obtain the media-type decoding mechanisms must be applied in order to obtain the media-type
referenced by the Content-Type header field. Content-Encoding is referenced by the Content-Type header field. Content-Encoding is
primarily used to allow a document to be compressed without losing primarily used to allow a document to be compressed without losing
the identity of its underlying media type. the identity of its underlying media type.
Content-Encoding = "Content-Encoding" ":" 1#content-coding Content-Encoding = "Content-Encoding" ":" 1#content-coding
Content codings are defined in Section 3.5. An example of its use is Content codings are defined in Section 3.5. An example of its use is
Content-Encoding: gzip Content-Encoding: gzip
The content-coding is a characteristic of the entity identified by The content-coding is a characteristic of the entity identified by
the Request-URI. Typically, the entity-body is stored with this the Request-URI. Typically, the entity-body is stored with this
encoding and is only decoded before rendering or analogous usage. encoding and is only decoded before rendering or analogous usage.
However, a non-transparent proxy MAY modify the content-coding if the However, a non-transparent proxy MAY modify the content-coding if the
new coding is known to be acceptable to the recipient, unless the new coding is known to be acceptable to the recipient, unless the
"no-transform" cache-control directive is present in the message. "no-transform" cache-control directive is present in the message.
If the content-coding of an entity is not "identity", then the If the content-coding of an entity is not "identity", then the
response MUST include a Content-Encoding entity-header response MUST include a Content-Encoding entity-header
skipping to change at page 125, line 50 skipping to change at page 128, line 12
Additional information about the encoding parameters MAY be provided Additional information about the encoding parameters MAY be provided
by other entity-header fields not defined by this specification. by other entity-header fields not defined by this specification.
14.12. Content-Language 14.12. Content-Language
The Content-Language entity-header field describes the natural The Content-Language entity-header field describes the natural
language(s) of the intended audience for the enclosed entity. Note language(s) of the intended audience for the enclosed entity. Note
that this might not be equivalent to all the languages used within that this might not be equivalent to all the languages used within
the entity-body. the entity-body.
Content-Language = "Content-Language" ":" 1#language-tag Content-Language = "Content-Language" ":" 1#language-tag
Language tags are defined in Section 3.10. The primary purpose of Language tags are defined in Section 3.10. The primary purpose of
Content-Language is to allow a user to identify and differentiate Content-Language is to allow a user to identify and differentiate
entities according to the user's own preferred language. Thus, if entities according to the user's own preferred language. Thus, if
the body content is intended only for a Danish-literate audience, the the body content is intended only for a Danish-literate audience, the
appropriate field is appropriate field is
Content-Language: da Content-Language: da
If no Content-Language is specified, the default is that the content If no Content-Language is specified, the default is that the content
is intended for all language audiences. This might mean that the is intended for all language audiences. This might mean that the
sender does not consider it to be specific to any natural language, sender does not consider it to be specific to any natural language,
or that the sender does not know for which language it is intended. or that the sender does not know for which language it is intended.
Multiple languages MAY be listed for content that is intended for Multiple languages MAY be listed for content that is intended for
multiple audiences. For example, a rendition of the "Treaty of multiple audiences. For example, a rendition of the "Treaty of
Waitangi," presented simultaneously in the original Maori and English Waitangi," presented simultaneously in the original Maori and English
versions, would call for versions, would call for
Content-Language: mi, en Content-Language: mi, en
However, just because multiple languages are present within an entity However, just because multiple languages are present within an entity
does not mean that it is intended for multiple linguistic audiences. does not mean that it is intended for multiple linguistic audiences.
An example would be a beginner's language primer, such as "A First An example would be a beginner's language primer, such as "A First
Lesson in Latin," which is clearly intended to be used by an English- Lesson in Latin," which is clearly intended to be used by an English-
literate audience. In this case, the Content-Language would properly literate audience. In this case, the Content-Language would properly
only include "en". only include "en".
Content-Language MAY be applied to any media type -- it is not Content-Language MAY be applied to any media type -- it is not
limited to textual documents. limited to textual documents.
14.13. Content-Length 14.13. Content-Length
The Content-Length entity-header field indicates the size of the The Content-Length entity-header field indicates the size of the
entity-body, in decimal number of OCTETs, sent to the recipient or, entity-body, in decimal number of OCTETs, sent to the recipient or,
in the case of the HEAD method, the size of the entity-body that in the case of the HEAD method, the size of the entity-body that
would have been sent had the request been a GET. would have been sent had the request been a GET.
Content-Length = "Content-Length" ":" 1*DIGIT Content-Length = "Content-Length" ":" 1*DIGIT
An example is An example is
Content-Length: 3495 Content-Length: 3495
Applications SHOULD use this field to indicate the transfer-length of Applications SHOULD use this field to indicate the transfer-length of
the message-body, unless this is prohibited by the rules in the message-body, unless this is prohibited by the rules in
Section 4.4. Section 4.4.
Any Content-Length greater than or equal to zero is a valid value. Any Content-Length greater than or equal to zero is a valid value.
Section 4.4 describes how to determine the length of a message-body Section 4.4 describes how to determine the length of a message-body
if a Content-Length is not given. if a Content-Length is not given.
Note that the meaning of this field is significantly different from Note that the meaning of this field is significantly different from
the corresponding definition in MIME, where it is an optional field the corresponding definition in MIME, where it is an optional field
used within the "message/external-body" content-type. In HTTP, it used within the "message/external-body" content-type. In HTTP, it
SHOULD be sent whenever the message's length can be determined prior SHOULD be sent whenever the message's length can be determined prior
to being transferred, unless this is prohibited by the rules in to being transferred, unless this is prohibited by the rules in
Section 4.4. Section 4.4.
skipping to change at page 127, line 27 skipping to change at page 129, line 36
The Content-Location entity-header field MAY be used to supply the The Content-Location entity-header field MAY be used to supply the
resource location for the entity enclosed in the message when that resource location for the entity enclosed in the message when that
entity is accessible from a location separate from the requested entity is accessible from a location separate from the requested
resource's URI. A server SHOULD provide a Content-Location for the resource's URI. A server SHOULD provide a Content-Location for the
variant corresponding to the response entity; especially in the case variant corresponding to the response entity; especially in the case
where a resource has multiple entities associated with it, and those where a resource has multiple entities associated with it, and those
entities actually have separate locations by which they might be entities actually have separate locations by which they might be
individually accessed, the server SHOULD provide a Content-Location individually accessed, the server SHOULD provide a Content-Location
for the particular variant which is returned. for the particular variant which is returned.
Content-Location = "Content-Location" ":" Content-Location = "Content-Location" ":"
( absoluteURI | relativeURI ) ( absoluteURI | relativeURI )
The value of Content-Location also defines the base URI for the The value of Content-Location also defines the base URI for the
entity. entity.
The Content-Location value is not a replacement for the original The Content-Location value is not a replacement for the original
requested URI; it is only a statement of the location of the resource requested URI; it is only a statement of the location of the resource
corresponding to this particular entity at the time of the request. corresponding to this particular entity at the time of the request.
Future requests MAY specify the Content-Location URI as the request- Future requests MAY specify the Content-Location URI as the request-
URI if the desire is to identify the source of that particular URI if the desire is to identify the source of that particular
entity. entity.
skipping to change at page 128, line 13 skipping to change at page 130, line 21
undefined; servers are free to ignore it in those cases. undefined; servers are free to ignore it in those cases.
14.15. Content-MD5 14.15. Content-MD5
The Content-MD5 entity-header field, as defined in RFC 1864 [23], is The Content-MD5 entity-header field, as defined in RFC 1864 [23], is
an MD5 digest of the entity-body for the purpose of providing an end- an MD5 digest of the entity-body for the purpose of providing an end-
to-end message integrity check (MIC) of the entity-body. (Note: a to-end message integrity check (MIC) of the entity-body. (Note: a
MIC is good for detecting accidental modification of the entity-body MIC is good for detecting accidental modification of the entity-body
in transit, but is not proof against malicious attacks.) in transit, but is not proof against malicious attacks.)
Content-MD5 = "Content-MD5" ":" md5-digest Content-MD5 = "Content-MD5" ":" md5-digest
md5-digest = <base64 of 128 bit MD5 digest as per RFC 1864> md5-digest = <base64 of 128 bit MD5 digest as per RFC 1864>
The Content-MD5 header field MAY be generated by an origin server or The Content-MD5 header field MAY be generated by an origin server or
client to function as an integrity check of the entity-body. Only client to function as an integrity check of the entity-body. Only
origin servers or clients MAY generate the Content-MD5 header field; origin servers or clients MAY generate the Content-MD5 header field;
proxies and gateways MUST NOT generate it, as this would defeat its proxies and gateways MUST NOT generate it, as this would defeat its
value as an end-to-end integrity check. Any recipient of the entity- value as an end-to-end integrity check. Any recipient of the entity-
body, including gateways and proxies, MAY check that the digest value body, including gateways and proxies, MAY check that the digest value
in this header field matches that of the entity-body as received. in this header field matches that of the entity-body as received.
The MD5 digest is computed based on the content of the entity-body, The MD5 digest is computed based on the content of the entity-body,
skipping to change at page 129, line 23 skipping to change at page 131, line 32
the digest is the transmission byte order defined for the type. the digest is the transmission byte order defined for the type.
Lastly, HTTP allows transmission of text types with any of several Lastly, HTTP allows transmission of text types with any of several
line break conventions and not just the canonical form using CRLF. line break conventions and not just the canonical form using CRLF.
14.16. Content-Range 14.16. Content-Range
The Content-Range entity-header is sent with a partial entity-body to The Content-Range entity-header is sent with a partial entity-body to
specify where in the full entity-body the partial body should be specify where in the full entity-body the partial body should be
applied. Range units are defined in Section 3.12. applied. Range units are defined in Section 3.12.
Content-Range = "Content-Range" ":" content-range-spec Content-Range = "Content-Range" ":" content-range-spec
content-range-spec = byte-content-range-spec content-range-spec = byte-content-range-spec
byte-content-range-spec = bytes-unit SP byte-content-range-spec = bytes-unit SP
byte-range-resp-spec "/" byte-range-resp-spec "/"
( instance-length | "*" ) ( instance-length | "*" )
byte-range-resp-spec = (first-byte-pos "-" last-byte-pos) byte-range-resp-spec = (first-byte-pos "-" last-byte-pos)
| "*" | "*"
instance-length = 1*DIGIT instance-length = 1*DIGIT
The header SHOULD indicate the total length of the full entity-body, The header SHOULD indicate the total length of the full entity-body,
unless this length is unknown or difficult to determine. The unless this length is unknown or difficult to determine. The
asterisk "*" character means that the instance-length is unknown at asterisk "*" character means that the instance-length is unknown at
the time when the response was generated. the time when the response was generated.
Unlike byte-ranges-specifier values (see Section 14.35.1), a byte- Unlike byte-ranges-specifier values (see Section 14.35.1), a byte-
range-resp-spec MUST only specify one range, and MUST contain range-resp-spec MUST only specify one range, and MUST contain
absolute byte positions for both the first and last byte of the absolute byte positions for both the first and last byte of the
range. range.
skipping to change at page 130, line 11 skipping to change at page 132, line 21
A server sending a response with status code 416 (Requested range not A server sending a response with status code 416 (Requested range not
satisfiable) SHOULD include a Content-Range field with a byte-range- satisfiable) SHOULD include a Content-Range field with a byte-range-
resp-spec of "*". The instance-length specifies the current length resp-spec of "*". The instance-length specifies the current length
of the selected resource. A response with status code 206 (Partial of the selected resource. A response with status code 206 (Partial
Content) MUST NOT include a Content-Range field with a byte-range- Content) MUST NOT include a Content-Range field with a byte-range-
resp-spec of "*". resp-spec of "*".
Examples of byte-content-range-spec values, assuming that the entity Examples of byte-content-range-spec values, assuming that the entity
contains a total of 1234 bytes: contains a total of 1234 bytes:
o The first 500 bytes: . The first 500 bytes:
bytes 0-499/1234
bytes 0-499/1234
o The second 500 bytes:
bytes 500-999/1234
o All except for the first 500 bytes:
bytes 500-1233/1234 . The second 500 bytes:
bytes 500-999/1234
o The last 500 bytes: . All except for the first 500 bytes:
bytes 500-1233/1234
bytes 734-1233/1234 . The last 500 bytes:
bytes 734-1233/1234
When an HTTP message includes the content of a single range (for When an HTTP message includes the content of a single range (for
example, a response to a request for a single range, or to a request example, a response to a request for a single range, or to a request
for a set of ranges that overlap without any holes), this content is for a set of ranges that overlap without any holes), this content is
transmitted with a Content-Range header, and a Content-Length header transmitted with a Content-Range header, and a Content-Length header
showing the number of bytes actually transferred. For example, showing the number of bytes actually transferred. For example,
HTTP/1.1 206 Partial content HTTP/1.1 206 Partial content
Date: Wed, 15 Nov 1995 06:25:24 GMT Date: Wed, 15 Nov 1995 06:25:24 GMT
Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT
Content-Range: bytes 21010-47021/47022 Content-Range: bytes 21010-47021/47022
Content-Length: 26012 Content-Length: 26012
Content-Type: image/gif Content-Type: image/gif
When an HTTP message includes the content of multiple ranges (for When an HTTP message includes the content of multiple ranges (for
example, a response to a request for multiple non-overlapping example, a response to a request for multiple non-overlapping
ranges), these are transmitted as a multipart message. The multipart ranges), these are transmitted as a multipart message. The multipart
media type used for this purpose is "multipart/byteranges" as defined media type used for this purpose is "multipart/byteranges" as defined
in Appendix A.2. See Appendix A.6.3 for a compatibility issue. in Appendix B. See Appendix F.3 for a compatibility issue.
A response to a request for a single range MUST NOT be sent using the A response to a request for a single range MUST NOT be sent using the
multipart/byteranges media type. A response to a request for multipart/byteranges media type. A response to a request for
multiple ranges, whose result is a single range, MAY be sent as a multiple ranges, whose result is a single range, MAY be sent as a
multipart/byteranges media type with one part. A client that cannot multipart/byteranges media type with one part. A client that cannot
decode a multipart/byteranges message MUST NOT ask for multiple byte- decode a multipart/byteranges message MUST NOT ask for multiple byte-
ranges in a single request. ranges in a single request.
When a client requests multiple byte-ranges in one request, the When a client requests multiple byte-ranges in one request, the
server SHOULD return them in the order that they appeared in the server SHOULD return them in the order that they appeared in the
skipping to change at page 131, line 32 skipping to change at page 133, line 37
range not satisfiable) response instead of a 200 (OK) response for range not satisfiable) response instead of a 200 (OK) response for
an unsatisfiable Range request-header, since not all servers an unsatisfiable Range request-header, since not all servers
implement this request-header. implement this request-header.
14.17. Content-Type 14.17. Content-Type
The Content-Type entity-header field indicates the media type of the The Content-Type entity-header field indicates the media type of the
entity-body sent to the recipient or, in the case of the HEAD method, entity-body sent to the recipient or, in the case of the HEAD method,
the media type that would have been sent had the request been a GET. the media type that would have been sent had the request been a GET.
Content-Type = "Content-Type" ":" media-type Content-Type = "Content-Type" ":" media-type
Media types are defined in Section 3.7. An example of the field is Media types are defined in Section 3.7. An example of the field is
Content-Type: text/html; charset=ISO-8859-4 Content-Type: text/html; charset=ISO-8859-4
Further discussion of methods for identifying the media type of an Further discussion of methods for identifying the media type of an
entity is provided in Section 7.2.1. entity is provided in Section 7.2.1.
14.18. Date 14.18. Date
The Date general-header field represents the date and time at which The Date general-header field represents the date and time at which
the message was originated, having the same semantics as orig-date in the message was originated, having the same semantics as orig-date in
RFC 822. The field value is an HTTP-date, as described in RFC 822. The field value is an HTTP-date, as described in
Section 3.3.1; it MUST be sent in RFC 1123 [8]-date format. Section 3.3.1; it MUST be sent in RFC 1123 [8]-date format.
Date = "Date" ":" HTTP-date Date = "Date" ":" HTTP-date
An example is An example is
Date: Tue, 15 Nov 1994 08:12:31 GMT Date: Tue, 15 Nov 1994 08:12:31 GMT
Origin servers MUST include a Date header field in all responses, Origin servers MUST include a Date header field in all responses,
except in these cases: except in these cases:
1. If the response status code is 100 (Continue) or 101 (Switching 1. If the response status code is 100 (Continue) or 101 (Switching
Protocols), the response MAY include a Date header field, at the Protocols), the response MAY include a Date header field, at the
server's option. server's option.
2. If the response status code conveys a server error, e.g. 500 2. If the response status code conveys a server error, e.g. 500
(Internal Server Error) or 503 (Service Unavailable), and it is (Internal Server Error) or 503 (Service Unavailable), and it is
inconvenient or impossible to generate a valid Date. inconvenient or impossible to generate a valid Date.
3. If the server does not have a clock that can provide a reasonable 3. If the server does not have a clock that can provide a reasonable
approximation of the current time, its responses MUST NOT include approximation of the current time, its responses MUST NOT include
a Date header field. In this case, the rules in Section 14.18.1 a Date header field. In this case, the rules in Section 14.18.1
MUST be followed. MUST be followed.
A received message that does not have a Date header field MUST be A received message that does not have a Date header field MUST be
assigned one by the recipient if the message will be cached by that assigned one by the recipient if the message will be cached by that
skipping to change at page 133, line 13 skipping to change at page 135, line 19
resource). resource).
14.19. ETag 14.19. ETag
The ETag response-header field provides the current value of the The ETag response-header field provides the current value of the
entity tag for the requested variant. The headers used with entity entity tag for the requested variant. The headers used with entity
tags are described in sections 14.24, 14.26 and 14.44. The entity tags are described in sections 14.24, 14.26 and 14.44. The entity
tag MAY be used for comparison with other entities from the same tag MAY be used for comparison with other entities from the same
resource (see Section 13.3.3). resource (see Section 13.3.3).
ETag = "ETag" ":" entity-tag ETag = "ETag" ":" entity-tag
Examples: Examples:
ETag: "xyzzy" ETag: "xyzzy"
ETag: W/"xyzzy" ETag: W/"xyzzy"
ETag: "" ETag: ""
14.20. Expect 14.20. Expect
The Expect request-header field is used to indicate that particular The Expect request-header field is used to indicate that particular
server behaviors are required by the client. server behaviors are required by the client.
Expect = "Expect" ":" 1#expectation Expect = "Expect" ":" 1#expectation
expectation = "100-continue" | expectation-extension expectation = "100-continue" | expectation-extension
expectation-extension = token [ "=" ( token | quoted-string ) expectation-extension = token [ "=" ( token | quoted-string )
*expect-params ] *expect-params ]
expect-params = ";" token [ "=" ( token | quoted-string ) ] expect-params = ";" token [ "=" ( token | quoted-string ) ]
A server that does not understand or is unable to comply with any of A server that does not understand or is unable to comply with any of
the expectation values in the Expect field of a request MUST respond the expectation values in the Expect field of a request MUST respond
with appropriate error status. The server MUST respond with a 417 with appropriate error status. The server MUST respond with a 417
(Expectation Failed) status if any of the expectations cannot be met (Expectation Failed) status if any of the expectations cannot be met
or, if there are other problems with the request, some other 4xx or, if there are other problems with the request, some other 4xx
status. status.
This header field is defined with extensible syntax to allow for This header field is defined with extensible syntax to allow for
future extensions. If a server receives a request containing an future extensions. If a server receives a request containing an
skipping to change at page 134, line 27 skipping to change at page 136, line 34
intermediate cache that has a fresh copy of the entity). See intermediate cache that has a fresh copy of the entity). See
Section 13.2 for further discussion of the expiration model. Section 13.2 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; it MUST be in RFC 1123 date format: Section 3.3.1; it MUST be in RFC 1123 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 14.9.3), that directive overrides the age directive (see Section 14.9.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
skipping to change at page 134, line 44 skipping to change at page 137, line 4
age directive (see Section 14.9.3), that directive overrides the age directive (see Section 14.9.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 13.2.4.) for expiration calculations in Section 13.2.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 14.9). indicated otherwise by a Cache-Control header field (Section 14.9).
14.22. From 14.22. From
The From request-header field, if given, SHOULD contain an Internet The From request-header field, if given, SHOULD contain an Internet
e-mail address for the human user who controls the requesting user e-mail address for the human user who controls the requesting user
agent. The address SHOULD be machine-usable, as defined by "mailbox" agent. The address SHOULD be machine-usable, as defined by "mailbox"
in RFC 822 [9] as updated by RFC 1123 [8]: in RFC 822 [9] as updated by RFC 1123 [8]:
From = "From" ":" mailbox From = "From" ":" mailbox
An example is: An example is:
From: webmaster@w3.org From: webmaster@w3.org
This header field MAY be used for logging purposes and as a means for This header field MAY be used for logging purposes and as a means for
identifying the source of invalid or unwanted requests. It SHOULD identifying the source of invalid or unwanted requests. It SHOULD
NOT be used as an insecure form of access protection. The NOT be used as an insecure form of access protection. The
interpretation of this field is that the request is being performed interpretation of this field is that the request is being performed
on behalf of the person given, who accepts responsibility for the on behalf of the person given, who accepts responsibility for the
method performed. In particular, robot agents SHOULD include this method performed. In particular, robot agents SHOULD include this
header so that the person responsible for running the robot can be header so that the person responsible for running the robot can be
contacted if problems occur on the receiving end. contacted if problems occur on the receiving end.
skipping to change at page 135, line 51 skipping to change at page 138, line 10
The Host request-header field specifies the Internet host and port The Host request-header field specifies the Internet host and port
number of the resource being requested, as obtained from the original number of the resource being requested, as obtained from the original
URI given by the user or referring resource (generally an HTTP URL, URI given by the user or referring resource (generally an HTTP URL,
as described in Section 3.2.2). The Host field value MUST represent as described in Section 3.2.2). The Host field value MUST represent
the naming authority of the origin server or gateway given by the the naming authority of the origin server or gateway given by the
original URL. This allows the origin server or gateway to original URL. This allows the origin server or gateway to
differentiate between internally-ambiguous URLs, such as the root "/" differentiate between internally-ambiguous URLs, such as the root "/"
URL of a server for multiple host names on a single IP address. URL of a server for multiple host names on a single IP address.
Host = "Host" ":" host [ ":" port ] ; Section 3.2.2 Host = "Host" ":" host [ ":" port ] ; Section 3.2.2
A "host" without any trailing port information implies the default A "host" without any trailing port information implies the default
port for the service requested (e.g., "80" for an HTTP URL). For port for the service requested (e.g., "80" for an HTTP URL). For
example, a request on the origin server for example, a request on the origin server for
<http://www.w3.org/pub/WWW/> would properly include: <http://www.w3.org/pub/WWW/> would properly include:
GET /pub/WWW/ HTTP/1.1 GET /pub/WWW/ HTTP/1.1
Host: www.w3.org Host: www.w3.org
A client MUST include a Host header field in all HTTP/1.1 request A client MUST include a Host header field in all HTTP/1.1 request
messages . If the requested URI does not include an Internet host messages . If the requested URI does not include an Internet host
name for the service being requested, then the Host header field MUST name for the service being requested, then the Host header field MUST
be given with an empty value. An HTTP/1.1 proxy MUST ensure that any be given with an empty value. An HTTP/1.1 proxy MUST ensure that any
request message it forwards does contain an appropriate Host header request message it forwards does contain an appropriate Host header
field that identifies the service being requested by the proxy. All field that identifies the service being requested by the proxy. All
Internet-based HTTP/1.1 servers MUST respond with a 400 (Bad Request) Internet-based HTTP/1.1 servers MUST respond with a 400 (Bad Request)
status code to any HTTP/1.1 request message which lacks a Host header status code to any HTTP/1.1 request message which lacks a Host header
field. field.
See sections 5.2 and A.6.1.1 for other requirements relating to Host. See sections 5.2 and F.1.1 for other requirements relating to Host.
14.24. If-Match 14.24. If-Match
The If-Match request-header field is used with a method to make it The If-Match request-header field is used with a method to make it
conditional. A client that has one or more entities previously conditional. A client that has one or more entities previously
obtained from the resource can verify that one of those entities is obtained from the resource can verify that one of those entities is
current by including a list of their associated entity tags in the current by including a list of their associated entity tags in the
If-Match header field. Entity tags are defined in Section 3.11. The If-Match header field. Entity tags are defined in Section 3.11. The
purpose of this feature is to allow efficient updates of cached purpose of this feature is to allow efficient updates of cached
information with a minimum amount of transaction overhead. It is information with a minimum amount of transaction overhead. It is
also used, on updating requests, to prevent inadvertent modification also used, on updating requests, to prevent inadvertent modification
of the wrong version of a resource. As a special case, the value "*" of the wrong version of a resource. As a special case, the value "*"
matches any current entity of the resource. matches any current entity of the resource.
If-Match = "If-Match" ":" ( "*" | 1#entity-tag ) If-Match = "If-Match" ":" ( "*" | 1#entity-tag )
If any of the entity tags match the entity tag of the entity that If any of the entity tags match the entity tag of the entity that
would have been returned in the response to a similar GET request would have been returned in the response to a similar GET request
(without the If-Match header) on that resource, or if "*" is given (without the If-Match header) on that resource, or if "*" is given
and any current entity exists for that resource, then the server MAY and any current entity exists for that resource, then the server MAY
perform the requested method as if the If-Match header field did not perform the requested method as if the If-Match header field did not
exist. exist.
A server MUST use the strong comparison function (see Section 13.3.3) A server MUST use the strong comparison function (see Section 13.3.3)
to compare the entity tags in If-Match. to compare the entity tags in If-Match.
skipping to change at page 137, line 25 skipping to change at page 139, line 33
MUST NOT be performed if the representation does not exist. MUST NOT be performed if the representation does not exist.
A request intended to update a resource (e.g., a PUT) MAY include an A request intended to update a resource (e.g., a PUT) MAY include an
If-Match header field to signal that the request method MUST NOT be If-Match header field to signal that the request method MUST NOT be
applied if the entity corresponding to the If-Match value (a single applied if the entity corresponding to the If-Match value (a single
entity tag) is no longer a representation of that resource. This entity tag) is no longer a representation of that resource. This
allows the user to indicate that they do not wish the request to be allows the user to indicate that they do not wish the request to be
successful if the resource has been changed without their knowledge. successful if the resource has been changed without their knowledge.
Examples: Examples:
If-Match: "xyzzy" If-Match: "xyzzy"
If-Match: "xyzzy", "r2d2xxxx", "c3piozzzz" If-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
If-Match: * If-Match: *
The result of a request having both an If-Match header field and The result of a request having both an If-Match header field and
either an If-None-Match or an If-Modified-Since header fields is either an If-None-Match or an If-Modified-Since header fields is
undefined by this specification. undefined by this specification.
14.25. If-Modified-Since 14.25. If-Modified-Since
The If-Modified-Since request-header field is used with a method to The If-Modified-Since request-header field is used with a method to
make it conditional: if the requested variant has not been modified make it conditional: if the requested variant has not been modified
since the time specified in this field, an entity will not be since the time specified in this field, an entity will not be
returned from the server; instead, a 304 (not modified) response will returned from the server; instead, a 304 (not modified) response will
be returned without any message-body. be returned without any message-body.
If-Modified-Since = "If-Modified-Since" ":" HTTP-date If-Modified-Since = "If-Modified-Since" ":" HTTP-date
An example of the field is: An example of the field is:
If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT
A GET method with an If-Modified-Since header and no Range header A GET method with an If-Modified-Since header and no Range header
requests that the identified entity be transferred only if it has requests that the identified entity be transferred only if it has
been modified since the date given by the If-Modified-Since header. been modified since the date given by the If-Modified-Since header.
The algorithm for determining this includes the following cases: The algorithm for determining this includes the following cases:
1. If the request would normally result in anything other than a 200 1. If the request would normally result in anything other than a 200
(OK) status, or if the passed If-Modified-Since date is invalid, (OK) status, or if the passed If-Modified-Since date is invalid,
the response is exactly the same as for a normal GET. A date the response is exactly the same as for a normal GET. A date
which is later than the server's current time is invalid. which is later than the server's current time is invalid.
skipping to change at page 139, line 20 skipping to change at page 141, line 26
current by including a list of their associated entity tags in the current by including a list of their associated entity tags in the
If-None-Match header field. The purpose of this feature is to allow If-None-Match header field. The purpose of this feature is to allow
efficient updates of cached information with a minimum amount of efficient updates of cached information with a minimum amount of
transaction overhead. It is also used to prevent a method (e.g. transaction overhead. It is also used to prevent a method (e.g.
PUT) from inadvertently modifying an existing resource when the PUT) from inadvertently modifying an existing resource when the
client believes that the resource does not exist. client believes that the resource does not exist.
As a special case, the value "*" matches any current entity of the As a special case, the value "*" matches any current entity of the
resource. resource.
If-None-Match = "If-None-Match" ":" ( "*" | 1#entity-tag ) If-None-Match = "If-None-Match" ":" ( "*" | 1#entity-tag )
If any of the entity tags match the entity tag of the entity that If any of the entity tags match the entity tag of the entity that
would have been returned in the response to a similar GET request would have been returned in the response to a similar GET request
(without the If-None-Match header) on that resource, or if "*" is (without the If-None-Match header) on that resource, or if "*" is
given and any current entity exists for that resource, then the given and any current entity exists for that resource, then the
server MUST NOT perform the requested method, unless required to do server MUST NOT perform the requested method, unless required to do
so because the resource's modification date fails to match that so because the resource's modification date fails to match that
supplied in an If-Modified-Since header field in the request. supplied in an If-Modified-Since header field in the request.
Instead, if the request method was GET or HEAD, the server SHOULD Instead, if the request method was GET or HEAD, the server SHOULD
respond with a 304 (Not Modified) response, including the cache- respond with a 304 (Not Modified) response, including the cache-
skipping to change at page 140, line 11 skipping to change at page 142, line 18
The meaning of "If-None-Match: *" is that the method MUST NOT be The meaning of "If-None-Match: *" is that the method MUST NOT be
performed if the representation selected by the origin server (or by performed if the representation selected by the origin server (or by
a cache, possibly using the Vary mechanism, see Section 14.44) a cache, possibly using the Vary mechanism, see Section 14.44)
exists, and SHOULD be performed if the representation does not exist. exists, and SHOULD be performed if the representation does not exist.
This feature is intended to be useful in preventing races between PUT This feature is intended to be useful in preventing races between PUT
operations. operations.
Examples: Examples:
If-None-Match: "xyzzy" If-None-Match: "xyzzy"
If-None-Match: W/"xyzzy" If-None-Match: W/"xyzzy"
If-None-Match: "xyzzy", "r2d2xxxx", "c3piozzzz" If-None-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
If-None-Match: W/"xyzzy", W/"r2d2xxxx", W/"c3piozzzz" If-None-Match: W/"xyzzy", W/"r2d2xxxx", W/"c3piozzzz"
If-None-Match: * If-None-Match: *
The result of a request having both an If-None-Match header field and The result of a request having both an If-None-Match header field and
either an If-Match or an If-Unmodified-Since header fields is either an If-Match or an If-Unmodified-Since header fields is
undefined by this specification. undefined by this specification.
14.27. If-Range 14.27. If-Range
If a client has a partial copy of an entity in its cache, and wishes If a client has a partial copy of an entity in its cache, and wishes
to have an up-to-date copy of the entire entity in its cache, it to have an up-to-date copy of the entire entity in its cache, it
could use the Range request-header with a conditional GET (using could use the Range request-header with a conditional GET (using
either or both of If-Unmodified-Since and If-Match.) However, if the either or both of If-Unmodified-Since and If-Match.) However, if the
condition fails because the entity has been modified, the client condition fails because the entity has been modified, the client
would then have to make a second request to obtain the entire current would then have to make a second request to obtain the entire current
entity-body. entity-body.
The If-Range header allows a client to "short-circuit" the second The If-Range header allows a client to "short-circuit" the second
request. Informally, its meaning is `if the entity is unchanged, request. Informally, its meaning is `if the entity is unchanged,
send me the part(s) that I am missing; otherwise, send me the entire send me the part(s) that I am missing; otherwise, send me the entire
new entity'. new entity'.
If-Range = "If-Range" ":" ( entity-tag | HTTP-date ) If-Range = "If-Range" ":" ( entity-tag | HTTP-date )
If the client has no entity tag for an entity, but does have a Last- If the client has no entity tag for an entity, but does have a Last-
Modified date, it MAY use that date in an If-Range header. (The Modified date, it MAY use that date in an If-Range header. (The
server can distinguish between a valid HTTP-date and any form of server can distinguish between a valid HTTP-date and any form of
entity-tag by examining no more than two characters.) The If-Range entity-tag by examining no more than two characters.) The If-Range
header SHOULD only be used together with a Range header, and MUST be header SHOULD only be used together with a Range header, and MUST be
ignored if the request does not include a Range header, or if the ignored if the request does not include a Range header, or if the
server does not support the sub-range operation. server does not support the sub-range operation.
If the entity tag given in the If-Range header matches the current If the entity tag given in the If-Range header matches the current
skipping to change at page 141, line 17 skipping to change at page 143, line 23
The If-Unmodified-Since request-header field is used with a method to The If-Unmodified-Since request-header field is used with a method to
make it conditional. If the requested resource has not been modified make it conditional. If the requested resource has not been modified
since the time specified in this field, the server SHOULD perform the since the time specified in this field, the server SHOULD perform the
requested operation as if the If-Unmodified-Since header were not requested operation as if the If-Unmodified-Since header were not
present. present.
If the requested variant has been modified since the specified time, If the requested variant has been modified since the specified time,
the server MUST NOT perform the requested operation, and MUST return the server MUST NOT perform the requested operation, and MUST return
a 412 (Precondition Failed). a 412 (Precondition Failed).
If-Unmodified-Since = "If-Unmodified-Since" ":" HTTP-date If-Unmodified-Since = "If-Unmodified-Since" ":" HTTP-date
An example of the field is: An example of the field is:
If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT
If the request normally (i.e., without the If-Unmodified-Since If the request normally (i.e., without the If-Unmodified-Since
header) would result in anything other than a 2xx or 412 status, the header) would result in anything other than a 2xx or 412 status, the
If-Unmodified-Since header SHOULD be ignored. If-Unmodified-Since header SHOULD be ignored.
If the specified date is invalid, the header is ignored. If the specified date is invalid, the header is ignored.
The result of a request having both an If-Unmodified-Since header The result of a request having both an If-Unmodified-Since header
field and either an If-None-Match or an If-Modified-Since header field and either an If-None-Match or an If-Modified-Since header
fields is undefined by this specification. fields is undefined by this specification.
14.29. Last-Modified 14.29. Last-Modified
The Last-Modified entity-header field indicates the date and time at The Last-Modified entity-header field indicates the date and time at
which the origin server believes the variant was last modified. which the origin server believes the variant was last modified.
Last-Modified = "Last-Modified" ":" HTTP-date Last-Modified = "Last-Modified" ":" HTTP-date
An example of its use is An example of its use is
Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT
The exact meaning of this header field depends on the implementation The exact meaning of this header field depends on the implementation
of the origin server and the nature of the original resource. For of the origin server and the nature of the original resource. For
files, it may be just the file system last-modified time. For files, it may be just the file system last-modified time. For
entities with dynamically included parts, it may be the most recent entities with dynamically included parts, it may be the most recent
of the set of last-modify times for its component parts. For of the set of last-modify times for its component parts. For
database gateways, it may be the last-update time stamp of the database gateways, it may be the last-update time stamp of the
record. For virtual objects, it may be the last time the internal record. For virtual objects, it may be the last time the internal
state changed. state changed.
skipping to change at page 142, line 29 skipping to change at page 144, line 34
14.30. Location 14.30. Location
The Location response-header field is used to redirect the recipient The Location response-header field is used to redirect the recipient
to a location other than the Request-URI for completion of the to a location other than the Request-URI for completion of the
request or identification of a new resource. For 201 (Created) request or identification of a new resource. For 201 (Created)
responses, the Location is that of the new resource which was created responses, the Location is that of the new resource which was created
by the request. For 3xx responses, the location SHOULD indicate the by the request. For 3xx responses, the location SHOULD indicate the
server's preferred URI for automatic redirection to the resource. server's preferred URI for automatic redirection to the resource.
The field value consists of a single absolute URI. The field value consists of a single absolute URI.
Location = "Location" ":" absoluteURI Location = "Location" ":" absoluteURI
An example is: An example is:
Location: http://www.w3.org/pub/WWW/People.html Location: http://www.w3.org/pub/WWW/People.html
Note: The Content-Location header field (Section 14.14) differs Note: The Content-Location header field (Section 14.14) differs
from Location in that the Content-Location identifies the original from Location in that the Content-Location identifies the original
location of the entity enclosed in the request. It is therefore location of the entity enclosed in the request. It is therefore
possible for a response to contain header fields for both Location possible for a response to contain header fields for both Location
and Content-Location. Also see Section 13.10 for cache and Content-Location. Also see Section 13.10 for cache
requirements of some methods. requirements of some methods.
14.31. Max-Forwards 14.31. Max-Forwards
The Max-Forwards request-header field provides a mechanism with the The Max-Forwards request-header field provides a mechanism with the
TRACE (Section 9.8) and OPTIONS (Section 9.2) methods to limit the TRACE (Section 9.8) and OPTIONS (Section 9.2) methods to limit the
number of proxies or gateways that can forward the request to the number of proxies or gateways that can forward the request to the
next inbound server. This can be useful when the client is next inbound server. This can be useful when the client is
attempting to trace a request chain which appears to be failing or attempting to trace a request chain which appears to be failing or
looping in mid-chain. looping in mid-chain.
Max-Forwards = "Max-Forwards" ":" 1*DIGIT Max-Forwards = "Max-Forwards" ":" 1*DIGIT
The Max-Forwards value is a decimal integer indicating the remaining The Max-Forwards value is a decimal integer indicating the remaining
number of times this request message may be forwarded. number of times this request message may be forwarded.
Each proxy or gateway recipient of a TRACE or OPTIONS request Each proxy or gateway recipient of a TRACE or OPTIONS request
containing a Max-Forwards header field MUST check and update its containing a Max-Forwards header field MUST check and update its
value prior to forwarding the request. If the received value is zero value prior to forwarding the request. If the received value is zero
(0), the recipient MUST NOT forward the request; instead, it MUST (0), the recipient MUST NOT forward the request; instead, it MUST
respond as the final recipient. If the received Max-Forwards value respond as the final recipient. If the received Max-Forwards value
is greater than zero, then the forwarded message MUST contain an is greater than zero, then the forwarded message MUST contain an
skipping to change at page 143, line 28 skipping to change at page 145, line 33
it is not explicitly referred to as part of that method definition. it is not explicitly referred to as part of that method definition.
14.32. Pragma 14.32. 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 14.9) and is defined here for backward compatibility with Section 14.9) 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
skipping to change at page 144, line 13 skipping to change at page 146, line 20
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
14.33. Proxy-Authenticate 14.33. Proxy-Authenticate
The Proxy-Authenticate response-header field MUST be included as part The Proxy-Authenticate response-header field MUST be included as part
of a 407 (Proxy Authentication Required) response. The field value of a 407 (Proxy Authentication Required) response. The field value
consists of a challenge that indicates the authentication scheme and consists of a challenge that indicates the authentication scheme and
parameters applicable to the proxy for this Request-URI. parameters applicable to the proxy for this Request-URI.
Proxy-Authenticate = "Proxy-Authenticate" ":" 1#challenge Proxy-Authenticate = "Proxy-Authenticate" ":" 1#challenge
The HTTP access authentication process is described in "HTTP The HTTP access authentication process is described in "HTTP
Authentication: Basic and Digest Access Authentication" [43]. Unlike Authentication: Basic and Digest Access Authentication" [43]. Unlike
WWW-Authenticate, the Proxy-Authenticate header field applies only to WWW-Authenticate, the Proxy-Authenticate header field applies only to
the current connection and SHOULD NOT be passed on to downstream the current connection and SHOULD NOT be passed on to downstream
clients. However, an intermediate proxy might need to obtain its own clients. However, an intermediate proxy might need to obtain its own
credentials by requesting them from the downstream client, which in credentials by requesting them from the downstream client, which in
some circumstances will appear as if the proxy is forwarding the some circumstances will appear as if the proxy is forwarding the
Proxy-Authenticate header field. Proxy-Authenticate header field.
14.34. Proxy-Authorization 14.34. Proxy-Authorization
The Proxy-Authorization request-header field allows the client to The Proxy-Authorization request-header field allows the client to
identify itself (or its user) to a proxy which requires identify itself (or its user) to a proxy which requires
authentication. The Proxy-Authorization field value consists of authentication. The Proxy-Authorization field value consists of
credentials containing the authentication information of the user credentials containing the authentication information of the user
agent for the proxy and/or realm of the resource being requested. agent for the proxy and/or realm of the resource being requested.
Proxy-Authorization = "Proxy-Authorization" ":" credentials Proxy-Authorization = "Proxy-Authorization" ":" credentials
The HTTP access authentication process is described in "HTTP The HTTP access authentication process is described in "HTTP
Authentication: Basic and Digest Access Authentication" [43]. Unlike Authentication: Basic and Digest Access Authentication" [43]. Unlike
Authorization, the Proxy-Authorization header field applies only to Authorization, the Proxy-Authorization header field applies only to
the next outbound proxy that demanded authentication using the Proxy- the next outbound proxy that demanded authentication using the Proxy-
Authenticate field. When multiple proxies are used in a chain, the Authenticate field. When multiple proxies are used in a chain, the
Proxy-Authorization header field is consumed by the first outbound Proxy-Authorization header field is consumed by the first outbound
proxy that was expecting to receive credentials. A proxy MAY relay proxy that was expecting to receive credentials. A proxy MAY relay
the credentials from the client request to the next proxy if that is the credentials from the client request to the next proxy if that is
the mechanism by which the proxies cooperatively authenticate a given the mechanism by which the proxies cooperatively authenticate a given
skipping to change at page 145, line 12 skipping to change at page 147, line 20
of bytes, the concept of a byte range is meaningful for any HTTP of bytes, the concept of a byte range is meaningful for any HTTP
entity. (However, not all clients and servers need to support byte- entity. (However, not all clients and servers need to support byte-
range operations.) range operations.)
Byte range specifications in HTTP apply to the sequence of bytes in Byte range specifications in HTTP apply to the sequence of bytes in
the entity-body (not necessarily the same as the message-body). the entity-body (not necessarily the same as the message-body).
A byte range operation MAY specify a single range of bytes, or a set A byte range operation MAY specify a single range of bytes, or a set
of ranges within a single entity. of ranges within a single entity.
ranges-specifier = byte-ranges-specifier ranges-specifier = byte-ranges-specifier
byte-ranges-specifier = bytes-unit "=" byte-range-set byte-ranges-specifier = bytes-unit "=" byte-range-set
byte-range-set = 1#( byte-range-spec | suffix-byte-range-spec ) byte-range-set = 1#( byte-range-spec | suffix-byte-range-spec )
byte-range-spec = first-byte-pos "-" [last-byte-pos] byte-range-spec = first-byte-pos "-" [last-byte-pos]
first-byte-pos = 1*DIGIT first-byte-pos = 1*DIGIT
last-byte-pos = 1*DIGIT last-byte-pos = 1*DIGIT
The first-byte-pos value in a byte-range-spec gives the byte-offset The first-byte-pos value in a byte-range-spec gives the byte-offset
of the first byte in a range. The last-byte-pos value gives the of the first byte in a range. The last-byte-pos value gives the
byte-offset of the last byte in the range; that is, the byte byte-offset of the last byte in the range; that is, the byte
positions specified are inclusive. Byte offsets start at zero. positions specified are inclusive. Byte offsets start at zero.
If the last-byte-pos value is present, it MUST be greater than or If the last-byte-pos value is present, it MUST be greater than or
equal to the first-byte-pos in that byte-range-spec, or the byte- equal to the first-byte-pos in that byte-range-spec, or the byte-
range-spec is syntactically invalid. The recipient of a byte-range- range-spec is syntactically invalid. The recipient of a byte-range-
set that includes one or more syntactically invalid byte-range-spec set that includes one or more syntactically invalid byte-range-spec
skipping to change at page 145, line 39 skipping to change at page 147, line 47
set. set.
If the last-byte-pos value is absent, or if the value is greater than If the last-byte-pos value is absent, or if the value is greater than
or equal to the current length of the entity-body, last-byte-pos is or equal to the current length of the entity-body, last-byte-pos is
taken to be equal to one less than the current length of the entity- taken to be equal to one less than the current length of the entity-
body in bytes. body in bytes.
By its choice of last-byte-pos, a client can limit the number of By its choice of last-byte-pos, a client can limit the number of
bytes retrieved without knowing the size of the entity. bytes retrieved without knowing the size of the entity.
suffix-byte-range-spec = "-" suffix-length suffix-byte-range-spec = "-" suffix-length
suffix-length = 1*DIGIT suffix-length = 1*DIGIT
A suffix-byte-range-spec is used to specify the suffix of the entity- A suffix-byte-range-spec is used to specify the suffix of the entity-
body, of a length given by the suffix-length value. (That is, this body, of a length given by the suffix-length value. (That is, this
form specifies the last N bytes of an entity-body.) If the entity is form specifies the last N bytes of an entity-body.) If the entity is
shorter than the specified suffix-length, the entire entity-body is shorter than the specified suffix-length, the entire entity-body is
used. used.
If a syntactically valid byte-range-set includes at least one byte- If a syntactically valid byte-range-set includes at least one byte-
range-spec whose first-byte-pos is less than the current length of range-spec whose first-byte-pos is less than the current length of
the entity-body, or at least one suffix-byte-range-spec with a non- the entity-body, or at least one suffix-byte-range-spec with a non-
skipping to change at page 146, line 38 skipping to change at page 148, line 44
bytes=500-600,601-999 bytes=500-600,601-999
bytes=500-700,601-999 bytes=500-700,601-999
14.35.2. Range Retrieval Requests 14.35.2. Range Retrieval Requests
HTTP retrieval requests using conditional or unconditional GET HTTP retrieval requests using conditional or unconditional GET
methods MAY request one or more sub-ranges of the entity, instead of methods MAY request one or more sub-ranges of the entity, instead of
the entire entity, using the Range request header, which applies to the entire entity, using the Range request header, which applies to
the entity returned as the result of the request: the entity returned as the result of the request:
Range = "Range" ":" ranges-specifier Range = "Range" ":" ranges-specifier
A server MAY ignore the Range header. However, HTTP/1.1 origin A server MAY ignore the Range header. However, HTTP/1.1 origin
servers and intermediate caches ought to support byte ranges when servers and intermediate caches ought to support byte ranges when
possible, since Range supports efficient recovery from partially possible, since Range supports efficient recovery from partially
failed transfers, and supports efficient partial retrieval of large failed transfers, and supports efficient partial retrieval of large
entities. entities.
If the server supports the Range header and the specified range or If the server supports the Range header and the specified range or
ranges are appropriate for the entity: ranges are appropriate for the entity:
skipping to change at page 147, line 33 skipping to change at page 149, line 41
The Referer[sic] request-header field allows the client to specify, The Referer[sic] request-header field allows the client to specify,
for the server's benefit, the address (URI) of the resource from for the server's benefit, the address (URI) of the resource from
which the Request-URI was obtained (the "referrer", although the which the Request-URI was obtained (the "referrer", although the
header field is misspelled.) The Referer request-header allows a header field is misspelled.) The Referer request-header allows a
server to generate lists of back-links to resources for interest, server to generate lists of back-links to resources for interest,
logging, optimized caching, etc. It also allows obsolete or mistyped logging, optimized caching, etc. It also allows obsolete or mistyped
links to be traced for maintenance. The Referer field MUST NOT be links to be traced for maintenance. The Referer field MUST NOT be
sent if the Request-URI was obtained from a source that does not have sent if the Request-URI was obtained from a source that does not have
its own URI, such as input from the user keyboard. its own URI, such as input from the user keyboard.
Referer = "Referer" ":" ( absoluteURI | relativeURI ) Referer = "Referer" ":" ( absoluteURI | relativeURI )
Example: Example:
Referer: http://www.w3.org/hypertext/DataSources/Overview.html Referer: http://www.w3.org/hypertext/DataSources/Overview.html
If the field value is a relative URI, it SHOULD be interpreted If the field value is a relative URI, it SHOULD be interpreted
relative to the Request-URI. The URI MUST NOT include a fragment. relative to the Request-URI. The URI MUST NOT include a fragment.
See Section 15.1.3 for security considerations. See Section 15.1.3 for security considerations.
14.37. Retry-After 14.37. Retry-After
The Retry-After response-header field can be used with a 503 (Service The Retry-After response-header field can be used with a 503 (Service
Unavailable) response to indicate how long the service is expected to Unavailable) response to indicate how long the service is expected to
be unavailable to the requesting client. This field MAY also be used be unavailable to the requesting client. This field MAY also be used
with any 3xx (Redirection) response to indicate the minimum time the with any 3xx (Redirection) response to indicate the minimum time the
user-agent is asked wait before issuing the redirected request. The user-agent is asked wait before issuing the redirected request. The
value of this field can be either an HTTP-date or an integer number value of this field can be either an HTTP-date or an integer number
of seconds (in decimal) after the time of the response. of seconds (in decimal) after the time of the response.
Retry-After = "Retry-After" ":" ( HTTP-date | delta-seconds ) Retry-After = "Retry-After" ":" ( HTTP-date | delta-seconds )
Two examples of its use are Two examples of its use are
Retry-After: Fri, 31 Dec 1999 23:59:59 GMT Retry-After: Fri, 31 Dec 1999 23:59:59 GMT
Retry-After: 120 Retry-After: 120
In the latter example, the delay is 2 minutes. In the latter example, the delay is 2 minutes.
14.38. Server 14.38. Server
The Server response-header field contains information about the The Server response-header field contains information about the
software used by the origin server to handle the request. The field software used by the origin server to handle the request. The field
can contain multiple product tokens (Section 3.8) and comments can contain multiple product tokens (Section 3.8) and comments
identifying the server and any significant subproducts. The product identifying the server and any significant subproducts. The product
tokens are listed in order of their significance for identifying the tokens are listed in order of their significance for identifying the
application. application.
Server = "Server" ":" 1*( product | comment ) Server = "Server" ":" 1*( product | comment )
Example: Example:
Server: CERN/3.0 libwww/2.17 Server: CERN/3.0 libwww/2.17
If the response is being forwarded through a proxy, the proxy If the response is being forwarded through a proxy, the proxy
application MUST NOT modify the Server response-header. Instead, it application MUST NOT modify the Server response-header. Instead, it
SHOULD include a Via field (as described in Section 14.45). SHOULD include a Via field (as described in Section 14.45).
Note: Revealing the specific software version of the server might Note: Revealing the specific software version of the server might
allow the server machine to become more vulnerable to attacks allow the server machine to become more vulnerable to attacks
against software that is known to contain security holes. Server against software that is known to contain security holes. Server
implementors are encouraged to make this field a configurable implementors are encouraged to make this field a configurable
option. option.
skipping to change at page 149, line 10 skipping to change at page 151, line 25
t-codings = "trailers" | ( transfer-extension [ accept-params ] ) t-codings = "trailers" | ( transfer-extension [ accept-params ] )
The presence of the keyword "trailers" indicates that the client is The presence of the keyword "trailers" indicates that the client is
willing to accept trailer fields in a chunked transfer-coding, as willing to accept trailer fields in a chunked transfer-coding, as
defined in Section 3.6.1. This keyword is reserved for use with defined in Section 3.6.1. This keyword is reserved for use with
transfer-coding values even though it does not itself represent a transfer-coding values even though it does not itself represent a
transfer-coding. transfer-coding.
Examples of its use are: Examples of its use are:
TE: deflate TE: deflate
TE: TE:
TE: trailers, deflate;q=0.5 TE: trailers, deflate;q=0.5
The TE header field only applies to the immediate connection. The TE header field only applies to the immediate connection.
Therefore, the keyword MUST be supplied within a Connection header Therefore, the keyword MUST be supplied within a Connection header
field (Section 14.10) whenever TE is present in an HTTP/1.1 message. field (Section 14.10) whenever TE is present in an HTTP/1.1 message.
A server tests whether a transfer-coding is acceptable, according to A server tests whether a transfer-coding is acceptable, according to
a TE field, using these rules: a TE field, using these rules:
1. The "chunked" transfer-coding is always acceptable. If the 1. The "chunked" transfer-coding is always acceptable. If the
keyword "trailers" is listed, the client indicates that it is keyword "trailers" is listed, the client indicates that it is
skipping to change at page 150, line 5 skipping to change at page 152, line 20
If the TE field-value is empty or if no TE field is present, the only If the TE field-value is empty or if no TE field is present, the only
transfer-coding is "chunked". A message with no transfer-coding is transfer-coding is "chunked". A message with no transfer-coding is
always acceptable. always acceptable.
14.40. Trailer 14.40. Trailer
The Trailer general field value indicates that the given set of The Trailer general field value indicates that the given set of
header fields is present in the trailer of a message encoded with header fields is present in the trailer of a message encoded with
chunked transfer-coding. chunked transfer-coding.
Trailer = "Trailer" ":" 1#field-name Trailer = "Trailer" ":" 1#field-name
An HTTP/1.1 message SHOULD include a Trailer header field in a An HTTP/1.1 message SHOULD include a Trailer header field in a
message using chunked transfer-coding with a non-empty trailer. message using chunked transfer-coding with a non-empty trailer.
Doing so allows the recipient to know which header fields to expect Doing so allows the recipient to know which header fields to expect
in the trailer. in the trailer.
If no Trailer header field is present, the trailer SHOULD NOT include If no Trailer header field is present, the trailer SHOULD NOT include
any header fields. See Section 3.6.1 for restrictions on the use of any header fields. See Section 3.6.1 for restrictions on the use of
trailer fields in a "chunked" transfer-coding. trailer fields in a "chunked" transfer-coding.
skipping to change at page 150, line 33 skipping to change at page 152, line 48
o Trailer o Trailer
14.41. Transfer-Encoding 14.41. Transfer-Encoding
The Transfer-Encoding general-header field indicates what (if any) The Transfer-Encoding general-header field indicates what (if any)
type of transformation has been applied to the message body in order type of transformation has been applied to the message body in order
to safely transfer it between the sender and the recipient. This to safely transfer it between the sender and the recipient. This
differs from the content-coding in that the transfer-coding is a differs from the content-coding in that the transfer-coding is a
property of the message, not of the entity. property of the message, not of the entity.
Transfer-Encoding = "Transfer-Encoding" ":" 1#transfer-coding Transfer-Encoding = "Transfer-Encoding" ":" 1#transfer-coding
Transfer-codings are defined in Section 3.6. An example is: Transfer-codings are defined in Section 3.6. An example is:
Transfer-Encoding: chunked Transfer-Encoding: chunked
If multiple encodings have been applied to an entity, the transfer- If multiple encodings have been applied to an entity, the transfer-
codings MUST be listed in the order in which they were applied. codings MUST be listed in the order in which they were applied.
Additional information about the encoding parameters MAY be provided Additional information about the encoding parameters MAY be provided
by other entity-header fields not defined by this specification. by other entity-header fields not defined by this specification.
Many older HTTP/1.0 applications do not understand the Transfer- Many older HTTP/1.0 applications do not understand the Transfer-
Encoding header. Encoding header.
14.42. Upgrade 14.42. Upgrade
The Upgrade general-header allows the client to specify what The Upgrade general-header allows the client to specify what
additional communication protocols it supports and would like to use additional communication protocols it supports and would like to use
if the server finds it appropriate to switch protocols. The server if the server finds it appropriate to switch protocols. The server
MUST use the Upgrade header field within a 101 (Switching Protocols) MUST use the Upgrade header field within a 101 (Switching Protocols)
response to indicate which protocol(s) are being switched. response to indicate which protocol(s) are being switched.
Upgrade = "Upgrade" ":" 1#product Upgrade = "Upgrade" ":" 1#product
For example, For example,
Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11 Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11
The Upgrade header field is intended to provide a simple mechanism The Upgrade header field is intended to provide a simple mechanism
for transition from HTTP/1.1 to some other, incompatible protocol. for transition from HTTP/1.1 to some other, incompatible protocol.
It does so by allowing the client to advertise its desire to use It does so by allowing the client to advertise its desire to use
another protocol, such as a later version of HTTP with a higher major another protocol, such as a later version of HTTP with a higher major
version number, even though the current request has been made using version number, even though the current request has been made using
HTTP/1.1. This eases the difficult transition between incompatible HTTP/1.1. This eases the difficult transition between incompatible
protocols by allowing the client to initiate a request in the more protocols by allowing the client to initiate a request in the more
commonly supported protocol while indicating to the server that it commonly supported protocol while indicating to the server that it
would like to use a "better" protocol if available (where "better" is would like to use a "better" protocol if available (where "better" is
skipping to change at page 152, line 18 skipping to change at page 154, line 30
user agent originating the request. This is for statistical user agent originating the request. This is for statistical
purposes, the tracing of protocol violations, and automated purposes, the tracing of protocol violations, and automated
recognition of user agents for the sake of tailoring responses to recognition of user agents for the sake of tailoring responses to
avoid particular user agent limitations. User agents SHOULD include avoid particular user agent limitations. User agents SHOULD include
this field with requests. The field can contain multiple product this field with requests. The field can contain multiple product
tokens (Section 3.8) and comments identifying the agent and any tokens (Section 3.8) and comments identifying the agent and any
subproducts which form a significant part of the user agent. By subproducts which form a significant part of the user agent. By
convention, the product tokens are listed in order of their convention, the product tokens are listed in order of their
significance for identifying the application. significance for identifying the application.
User-Agent = "User-Agent" ":" 1*( product | comment ) User-Agent = "User-Agent" ":" 1*( product | comment )
Example: Example:
User-Agent: CERN-LineMode/2.15 libwww/2.17b3 User-Agent: CERN-LineMode/2.15 libwww/2.17b3
14.44. Vary 14.44. 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 13.6 for use of the Vary header field by caches. Section 13.6 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.
A Vary field value consisting of a list of field-names signals that A Vary field value consisting of a list of field-names signals that
the representation selected for the response is based on a selection the representation selected for the response is based on a selection
skipping to change at page 153, line 27 skipping to change at page 155, line 41
14.45. Via 14.45. Via
The Via general-header field MUST be used by gateways and proxies to The Via general-header field MUST be used by gateways and proxies to
indicate the intermediate protocols and recipients between the user indicate the intermediate protocols and recipients between the user
agent and the server on requests, and between the origin server and agent and the server on requests, and between the origin server and
the client on responses. It is analogous to the "Received" field of the client on responses. It is analogous to the "Received" field of
RFC 822 [9] and is intended to be used for tracking message forwards, RFC 822 [9] and is intended to be used for tracking message forwards,
avoiding request loops, and identifying the protocol capabilities of avoiding request loops, and identifying the protocol capabilities of
all senders along the request/response chain. all senders along the request/response chain.
Via = "Via" ":" 1#( received-protocol received-by [ comment ] ) Via = "Via" ":" 1#( received-protocol received-by [ comment ] )
received-protocol = [ protocol-name "/" ] protocol-version received-protocol = [ protocol-name "/" ] protocol-version
protocol-name = token protocol-name = token
protocol-version = token protocol-version = token
received-by = ( host [ ":" port ] ) | pseudonym received-by = ( host [ ":" port ] ) | pseudonym
pseudonym = token pseudonym = token
The received-protocol indicates the protocol version of the message The received-protocol indicates the protocol version of the message
received by the server or client along each segment of the request/ received by the server or client along each segment of the request/
response chain. The received-protocol version is appended to the Via response chain. The received-protocol version is appended to the Via
field value when the message is forwarded so that information about field value when the message is forwarded so that information about
the protocol capabilities of upstream applications remains visible to the protocol capabilities of upstream applications remains visible to
all recipients. all recipients.
The protocol-name is optional if and only if it would be "HTTP". The The protocol-name is optional if and only if it would be "HTTP". The
received-by field is normally the host and optional port number of a received-by field is normally the host and optional port number of a
skipping to change at page 154, line 18 skipping to change at page 156, line 31
optional and MAY be removed by any recipient prior to forwarding the optional and MAY be removed by any recipient prior to forwarding the
message. message.
For example, a request message could be sent from an HTTP/1.0 user For example, a request message could be sent from an HTTP/1.0 user
agent to an internal proxy code-named "fred", which uses HTTP/1.1 to agent to an internal proxy code-named "fred", which uses HTTP/1.1 to
forward the request to a public proxy at nowhere.com, which completes forward the request to a public proxy at nowhere.com, which completes
the request by forwarding it to the origin server at www.ics.uci.edu. the request by forwarding it to the origin server at www.ics.uci.edu.
The request received by www.ics.uci.edu would then have the following The request received by www.ics.uci.edu would then have the following
Via header field: Via header field:
Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1) Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1)
Proxies and gateways used as a portal through a network firewall Proxies and gateways used as a portal through a network firewall
SHOULD NOT, by default, forward the names and ports of hosts within SHOULD NOT, by default, forward the names and ports of hosts within
the firewall region. This information SHOULD only be propagated if the firewall region. This information SHOULD only be propagated if
explicitly enabled. If not enabled, the received-by host of any host explicitly enabled. If not enabled, the received-by host of any host
behind the firewall SHOULD be replaced by an appropriate pseudonym behind the firewall SHOULD be replaced by an appropriate pseudonym
for that host. for that host.
For organizations that have strong privacy requirements for hiding For organizations that have strong privacy requirements for hiding
internal structures, a proxy MAY combine an ordered subsequence of internal structures, a proxy MAY combine an ordered subsequence of
Via header field entries with identical received-protocol values into Via header field entries with identical received-protocol values into
a single such entry. For example, a single such entry. For example,
Via: 1.0 ricky, 1.1 ethel, 1.1 fred, 1.0 lucy Via: 1.0 ricky, 1.1 ethel, 1.1 fred, 1.0 lucy
could be collapsed to could be collapsed to
Via: 1.0 ricky, 1.1 mertz, 1.0 lucy Via: 1.0 ricky, 1.1 mertz, 1.0 lucy
Applications SHOULD NOT combine multiple entries unless they are all Applications SHOULD NOT combine multiple entries unless they are all
under the same organizational control and the hosts have already been under the same organizational control and the hosts have already been
replaced by pseudonyms. Applications MUST NOT combine entries which replaced by pseudonyms. Applications MUST NOT combine entries which
have different received-protocol values. have different received-protocol values.
14.46. Warning 14.46. 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 = <"> HTTP-date <">
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.
skipping to change at page 157, line 30 skipping to change at page 159, line 43
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.
14.47. WWW-Authenticate 14.47. WWW-Authenticate
The WWW-Authenticate response-header field MUST be included in 401 The WWW-Authenticate response-header field MUST be included in 401
(Unauthorized) response messages. The field value consists of at (Unauthorized) response messages. The field value consists of at
least one challenge that indicates the authentication scheme(s) and least one challenge that indicates the authentication scheme(s) and
parameters applicable to the Request-URI. parameters applicable to the Request-URI.
WWW-Authenticate = "WWW-Authenticate" ":" 1#challenge WWW-Authenticate = "WWW-Authenticate" ":" 1#challenge
The HTTP access authentication process is described in "HTTP The HTTP access authentication process is described in "HTTP
Authentication: Basic and Digest Access Authentication" [43]. User Authentication: Basic and Digest Access Authentication" [43]. User
agents are advised to take special care in parsing the WWW- agents are advised to take special care in parsing the WWW-
Authenticate field value as it might contain more than one challenge, Authenticate field value as it might contain more than one challenge,
or if more than one WWW-Authenticate header field is provided, the or if more than one WWW-Authenticate header field is provided, the
contents of a challenge itself can contain a comma-separated list of contents of a challenge itself can contain a comma-separated list of
authentication parameters. authentication parameters.
15. Security Considerations 15. Security Considerations
skipping to change at page 162, line 8 skipping to change at page 164, line 8
If a single server supports multiple organizations that do not trust If a single server supports multiple organizations that do not trust
one another, then it MUST check the values of Location and Content- one another, then it MUST check the values of Location and Content-
Location headers in responses that are generated under control of Location headers in responses that are generated under control of
said organizations to make sure that they do not attempt to said organizations to make sure that they do not attempt to
invalidate resources over which they have no authority. invalidate resources over which they have no authority.
15.5. Content-Disposition Issues 15.5. Content-Disposition Issues
RFC 1806 [35], from which the often implemented Content-Disposition RFC 1806 [35], from which the often implemented Content-Disposition
(see Appendix A.5.1) header in HTTP is derived, has a number of very (see Appendix E.1) header in HTTP is derived, has a number of very
serious security considerations. Content-Disposition is not part of serious security considerations. Content-Disposition is not part of
the HTTP standard, but since it is widely implemented, we are the HTTP standard, but since it is widely implemented, we are
documenting its use and risks for implementors. See RFC 2183 [49] documenting its use and risks for implementors. See RFC 2183 [49]
(which updates RFC 1806) for details. (which updates RFC 1806) for details.
15.6. Authentication Credentials and Idle Clients 15.6. Authentication Credentials and Idle Clients
Existing HTTP clients and user agents typically retain authentication Existing HTTP clients and user agents typically retain authentication
information indefinitely. HTTP/1.1. does not provide a method for a information indefinitely. HTTP/1.1. does not provide a method for a
server to direct clients to discard these cached credentials. This server to direct clients to discard these cached credentials. This
skipping to change at page 164, line 7 skipping to change at page 166, line 7
protect against a broad range of security and privacy attacks. Such protect against a broad range of security and privacy attacks. Such
cryptography is beyond the scope of the HTTP/1.1 specification. cryptography is beyond the scope of the HTTP/1.1 specification.
15.7.1. Denial of Service Attacks on Proxies 15.7.1. Denial of Service Attacks on Proxies
They exist. They are hard to defend against. Research continues. They exist. They are hard to defend against. Research continues.
Beware. Beware.
16. Acknowledgments 16. Acknowledgments
16.1. (RFC2616)
This specification makes heavy use of the augmented BNF and generic This specification makes heavy use of the augmented BNF and generic
constructs defined by David H. Crocker for RFC 822 [9]. Similarly, constructs defined by David H. Crocker for RFC 822 [9]. Similarly,
it reuses many of the definitions provided by Nathaniel Borenstein it reuses many of the definitions provided by Nathaniel Borenstein
and Ned Freed for MIME [7]. We hope that their inclusion in this and Ned Freed for MIME [7]. We hope that their inclusion in this
specification will help reduce past confusion over the relationship specification will help reduce past confusion over the relationship
between HTTP and Internet mail message formats. between HTTP and Internet mail message formats.
The HTTP protocol has evolved considerably over the years. It has The HTTP protocol has evolved considerably over the years. It has
benefited from a large and active developer community--the many benefited from a large and active developer community--the many
people who have participated on the www-talk mailing list--and it is people who have participated on the www-talk mailing list--and it is
skipping to change at page 165, line 5 skipping to change at page 167, line 5
Groff, Phillip M. Hallam-Baker, Hakon W. Lie, Ari Luotonen, Rob Groff, Phillip M. Hallam-Baker, Hakon W. Lie, Ari Luotonen, Rob
McCool, Lou Montulli, Dave Raggett, Tony Sanders, and Marc McCool, Lou Montulli, Dave Raggett, Tony Sanders, and Marc
VanHeyningen deserve special recognition for their efforts in VanHeyningen deserve special recognition for their efforts in
defining early aspects of the protocol. defining early aspects of the protocol.
This document has benefited greatly from the comments of all those This document has benefited greatly from the comments of all those
participating in the HTTP-WG. In addition to those already participating in the HTTP-WG. In addition to those already
mentioned, the following individuals have contributed to this mentioned, the following individuals have contributed to this
specification: specification:
Gary Adams Ross Patterson Gary Adams Ross Patterson
Harald Tveit Alvestrand Albert Lunde Harald Tveit Alvestrand Albert Lunde
Keith Ball John C. Mallery Keith Ball John C. Mallery
Brian Behlendorf Jean-Philippe Martin-Flatin Brian Behlendorf Jean-Philippe Martin-Flatin
Paul Burchard Mitra Paul Burchard Mitra
Maurizio Codogno David Morris Maurizio Codogno David Morris
Mike Cowlishaw Gavin Nicol Mike Cowlishaw Gavin Nicol
Roman Czyborra Bill Perry Roman Czyborra Bill Perry
Michael A. Dolan Jeffrey Perry Michael A. Dolan Jeffrey Perry
David J. Fiander Scott Powers David J. Fiander Scott Powers
Alan Freier Owen Rees Alan Freier Owen Rees
Marc Hedlund Luigi Rizzo Marc Hedlund Luigi Rizzo
Greg Herlihy David Robinson Greg Herlihy David Robinson
Koen Holtman Marc Salomon Koen Holtman Marc Salomon
Alex Hopmann Rich Salz Alex Hopmann Rich Salz
Bob Jernigan Allan M. Schiffman Bob Jernigan Allan M. Schiffman
Shel Kaphan Jim Seidman Shel Kaphan Jim Seidman
Rohit Khare Chuck Shotton Rohit Khare Chuck Shotton
John Klensin Eric W. Sink John Klensin Eric W. Sink
Martijn Koster Simon E. Spero Martijn Koster Simon E. Spero
Alexei Kosut Richard N. Taylor Alexei Kosut Richard N. Taylor
David M. Kristol Robert S. Thau David M. Kristol Robert S. Thau
Daniel LaLiberte Bill (BearHeart) Weinman Daniel LaLiberte Bill (BearHeart) Weinman
Ben Laurie Francois Yergeau Ben Laurie Francois Yergeau
Paul J. Leach Mary Ellen Zurko Paul J. Leach Mary Ellen Zurko
Daniel DuBois Josh Cohen Daniel DuBois Josh Cohen
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.
Most of the specification of ranges is based on work originally done Most of the specification of ranges is based on work originally done
by Ari Luotonen and John Franks, with additional input from Steve by Ari Luotonen and John Franks, with additional input from Steve
Zilles. Zilles.
Thanks to the "cave men" of Palo Alto. You know who you are. Thanks to the "cave men" of Palo Alto. You know who you are.
skipping to change at page 166, line 5 skipping to change at page 168, line 5
with John Klensin, Jeff Mogul, Paul Leach, Dave Kristol, Koen with John Klensin, Jeff Mogul, Paul Leach, Dave Kristol, Koen
Holtman, John Franks, Josh Cohen, Alex Hopmann, Scott Lawrence, and Holtman, John Franks, Josh Cohen, Alex Hopmann, Scott Lawrence, and
Larry Masinter for their help. And thanks go particularly to Jeff Larry Masinter for their help. And thanks go particularly to Jeff
Mogul and Scott Lawrence for performing the "MUST/MAY/SHOULD" audit. Mogul and Scott Lawrence for performing the "MUST/MAY/SHOULD" audit.
The Apache Group, Anselm Baird-Smith, author of Jigsaw, and Henrik The Apache Group, Anselm Baird-Smith, author of Jigsaw, and Henrik
Frystyk implemented RFC 2068 early, and we wish to thank them for the Frystyk implemented RFC 2068 early, and we wish to thank them for the
discovery of many of the problems that this document attempts to discovery of many of the problems that this document attempts to
rectify. rectify.
16.2. (This Document)
This document is based on [50], which was authored by Roy T.
Fielding, James Gettys, Jeffrey C. Mogul, Henrik Frystyk Nielsen,
Larry Masinter, Paul J. Leach and Tim Berners-Lee.
17. References 17. References
17.1. References
[1] Alvestrand, H., "Tags for the Identification of Languages", [1] Alvestrand, H., "Tags for the Identification of Languages",
RFC 1766, March 1995. RFC 1766, March 1995.
[2] Anklesaria, F., McCahill, M., Lindner, P., Johnson, D., Torrey, [2] Anklesaria, F., McCahill, M., Lindner, P., Johnson, D., Torrey,
D., and B. Alberti, "The Internet Gopher Protocol (a D., and B. Alberti, "The Internet Gopher Protocol (a
distributed document search and retrieval protocol)", RFC 1436, distributed document search and retrieval protocol)", RFC 1436,
March 1993. March 1993.
[3] Berners-Lee, T., "Universal Resource Identifiers in WWW: A [3] Berners-Lee, T., "Universal Resource Identifiers in WWW: A
Unifying Syntax for the Expression of Names and Addresses of Unifying Syntax for the Expression of Names and Addresses of
skipping to change at page 167, line 16 skipping to change at page 170, line 17
Three: Message Header Extensions for Non-ASCII Text", RFC 2047, Three: Message Header Extensions for Non-ASCII Text", RFC 2047,
November 1996. November 1996.
[15] Masinter, L. and E. Nebel, "Form-based File Upload in HTML", [15] Masinter, L. and E. Nebel, "Form-based File Upload in HTML",
RFC 1867, November 1995. RFC 1867, November 1995.
[16] Postel, J., "Simple Mail Transfer Protocol", STD 10, RFC 821, [16] Postel, J., "Simple Mail Transfer Protocol", STD 10, RFC 821,
August 1982. August 1982.
[17] Postel, J., "Media Type Registration Procedure", RFC 1590, [17] Postel, J., "Media Type Registration Procedure", RFC 1590,
November 1996. March 1994.
[18] Postel, J. and J. Reynolds, "File Transfer Protocol", STD 9, [18] Postel, J. and J. Reynolds, "File Transfer Protocol", STD 9,
RFC 959, October 1985. RFC 959, October 1985.
[19] Reynolds, J. and J. Postel, "Assigned Numbers", STD 2, [19] Reynolds, J. and J. Postel, "Assigned Numbers", STD 2,
RFC 1700, October 1994. RFC 1700, October 1994.
[20] Masinter, L. and K. Sollins, "Functional Requirements for [20] Masinter, L. and K. Sollins, "Functional Requirements for
Uniform Resource Names", RFC 1737, December 1994. Uniform Resource Names", RFC 1737, December 1994.
skipping to change at page 169, line 25 skipping to change at page 172, line 28
[42] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform [42] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifiers (URI): Generic Syntax", RFC 2396, Resource Identifiers (URI): Generic Syntax", RFC 2396,
August 1998. August 1998.
[43] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., [43] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S.,
Leach, P., Luotonen, A., and L. Stewart, "HTTP Authentication: Leach, P., Luotonen, A., and L. Stewart, "HTTP Authentication:
Basic and Digest Access Authentication", RFC 2617, June 1999. Basic and Digest Access Authentication", RFC 2617, June 1999.
[44] Luotonen, A., "Tunneling TCP based protocols through Web proxy [44] Luotonen, A., "Tunneling TCP based protocols through Web proxy
servers", Work in Progress. servers", Work in Progress.
[45] Palme, J. and A. Hopmann, "MIME E-mail Encapsulation of [45] Palme, J. and A. Hopmann, "MIME E-mail Encapsulation of
Aggregate Documents, such as HTML (MHTML)", RFC 2110, Aggregate Documents, such as HTML (MHTML)", RFC 2110,
March 1997. March 1997.
[46] Bradner, S., "The Internet Standards Process -- Revision 3", [46] Bradner, S., "The Internet Standards Process -- Revision 3",
BCP 9, RFC 2026, October 1996. October 1996.
[47] Masinter, L., "Hyper Text Coffee Pot Control Protocol [47] Masinter, L., "Hyper Text Coffee Pot Control Protocol
(HTCPCP/1.0)", RFC 2324, April 1998. (HTCPCP/1.0)", RFC 2324, April 1998.
[48] Freed, N. and N. Borenstein, "Multipurpose Internet Mail [48] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part Five: Conformance Criteria and Extensions (MIME) Part Five: Conformance Criteria and
Examples", RFC 2049, November 1996. Examples", RFC 2049, November 1996.
[49] Troost, R., Dorner, S., and K. Moore, "Communicating [49] Troost, R., Dorner, S., and K. Moore, "Communicating
Presentation Information in Internet Messages: The Content- Presentation Information in Internet Messages: The Content-
Disposition Header Field", RFC 2183, August 1997. Disposition Header Field", RFC 2183, August 1997.
Appendix A. Appendices 17.2. Normative References
A.1. Internet Media Type message/http and application/http [50] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L.,
Leach, P., and T. Berners-Lee, "Hypertext Transfer Protocol --
HTTP/1.1", RFC 2616, June 1999.
URIs
[51] <mailto:ietf-http-wg@w3.org>
[52] <mailto:ietf-http-wg-request@w3.org?subject=subscribe>
Appendix A. Internet Media Type message/http and application/http
In addition to defining the HTTP/1.1 protocol, this document serves In addition to defining the HTTP/1.1 protocol, this document serves
as the specification for the Internet media type "message/http" and as the specification for the Internet media type "message/http" and
"application/http". The message/http type can be used to enclose a "application/http". The message/http type can be used to enclose a
single HTTP request or response message, provided that it obeys the single HTTP request or response message, provided that it obeys the
MIME restrictions for all "message" types regarding line length and MIME restrictions for all "message" types regarding line length and
encodings. The application/http type can be used to enclose a encodings. The application/http type can be used to enclose a
pipeline of one or more HTTP request or response messages (not pipeline of one or more HTTP request or response messages (not
intermixed). The following is to be registered with IANA [17]. intermixed). The following is to be registered with IANA [17].
skipping to change at page 171, line 15 skipping to change at page 176, line 5
msgtype: The message type -- "request" or "response". If not msgtype: The message type -- "request" or "response". If not
present, the type can be determined from the first line of the present, the type can be determined from the first line of the
body. body.
Encoding considerations: HTTP messages enclosed by this type are in Encoding considerations: HTTP messages enclosed by this type are in
"binary" format; use of an appropriate Content-Transfer-Encoding "binary" format; use of an appropriate Content-Transfer-Encoding
is required when transmitted via E-mail. is required when transmitted via E-mail.
Security considerations: none Security considerations: none
A.2. Internet Media Type multipart/byteranges Appendix B. Internet Media Type multipart/byteranges
When an HTTP 206 (Partial Content) response message includes the When an HTTP 206 (Partial Content) response message includes the
content of multiple ranges (a response to a request for multiple non- content of multiple ranges (a response to a request for multiple non-
overlapping ranges), these are transmitted as a multipart message- overlapping ranges), these are transmitted as a multipart message-
body. The media type for this purpose is called "multipart/ body. The media type for this purpose is called "multipart/
byteranges". byteranges".
The multipart/byteranges media type includes two or more parts, each The multipart/byteranges media type includes two or more parts, each
with its own Content-Type and Content-Range fields. The required with its own Content-Type and Content-Range fields. The required
boundary parameter specifies the boundary string used to separate boundary parameter specifies the boundary string used to separate
skipping to change at page 172, line 37 skipping to change at page 178, line 5
2. Although RFC 2046 [40] permits the boundary string to be quoted, 2. Although RFC 2046 [40] permits the boundary string to be quoted,
some existing implementations handle a quoted boundary string some existing implementations handle a quoted boundary string
incorrectly. incorrectly.
3. A number of browsers and servers were coded to an early draft of 3. A number of browsers and servers were coded to an early draft of
the byteranges specification to use a media type of multipart/ the byteranges specification to use a media type of multipart/
x-byteranges, which is almost, but not quite compatible with the x-byteranges, which is almost, but not quite compatible with the
version documented in HTTP/1.1. version documented in HTTP/1.1.
A.3. Tolerant Applications Appendix C. Tolerant Applications
Although this document specifies the requirements for the generation Although this document specifies the requirements for the generation
of HTTP/1.1 messages, not all applications will be correct in their of HTTP/1.1 messages, not all applications will be correct in their
implementation. We therefore recommend that operational applications implementation. We therefore recommend that operational applications
be tolerant of deviations whenever those deviations can be be tolerant of deviations whenever those deviations can be
interpreted unambiguously. interpreted unambiguously.
Clients SHOULD be tolerant in parsing the Status-Line and servers Clients SHOULD be tolerant in parsing the Status-Line and servers
tolerant when parsing the Request-Line. In particular, they SHOULD tolerant when parsing the Request-Line. In particular, they SHOULD
accept any amount of SP or HT characters between fields, even though accept any amount of SP or HT characters between fields, even though
skipping to change at page 173, line 32 skipping to change at page 179, line 5
proper value. proper value.
o All expiration-related calculations MUST be done in GMT. The o All expiration-related calculations MUST be done in GMT. The
local time zone MUST NOT influence the calculation or comparison local time zone MUST NOT influence the calculation or comparison
of an age or expiration time. of an age or expiration time.
o If an HTTP header incorrectly carries a date value with a time o If an HTTP header incorrectly carries a date value with a time
zone other than GMT, it MUST be converted into GMT using the most zone other than GMT, it MUST be converted into GMT using the most
conservative possible conversion. conservative possible conversion.
A.4. Differences Between HTTP Entities and RFC 2045 Entities Appendix D. Differences Between HTTP Entities and RFC 2045 Entities
HTTP/1.1 uses many of the constructs defined for Internet Mail (RFC HTTP/1.1 uses many of the constructs defined for Internet Mail (RFC
822 [9]) and the Multipurpose Internet Mail Extensions (MIME [7]) to 822 [9]) and the Multipurpose Internet Mail Extensions (MIME [7]) to
allow entities to be transmitted in an open variety of allow entities to be transmitted in an open variety of
representations and with extensible mechanisms. However, RFC 2045 representations and with extensible mechanisms. However, RFC 2045
discusses mail, and HTTP has a few features that are different from discusses mail, and HTTP has a few features that are different from
those described in RFC 2045. These differences were carefully chosen those described in RFC 2045. These differences were carefully chosen
to optimize performance over binary connections, to allow greater to optimize performance over binary connections, to allow greater
freedom in the use of new media types, to make date comparisons freedom in the use of new media types, to make date comparisons
easier, and to acknowledge the practice of some early HTTP servers easier, and to acknowledge the practice of some early HTTP servers
and clients. and clients.
This appendix describes specific areas where HTTP differs from RFC This appendix describes specific areas where HTTP differs from RFC
2045. Proxies and gateways to strict MIME environments SHOULD be 2045. Proxies and gateways to strict MIME environments SHOULD be
aware of these differences and provide the appropriate conversions aware of these differences and provide the appropriate conversions
where necessary. Proxies and gateways from MIME environments to HTTP where necessary. Proxies and gateways from MIME environments to HTTP
also need to be aware of the differences because some conversions also need to be aware of the differences because some conversions
might be required. might be required.
A.4.1. MIME-Version D.1. MIME-Version
HTTP is not a MIME-compliant protocol. However, HTTP/1.1 messages HTTP is not a MIME-compliant protocol. However, HTTP/1.1 messages
MAY include a single MIME-Version general-header field to indicate MAY include a single MIME-Version general-header field to indicate
what version of the MIME protocol was used to construct the message. what version of the MIME protocol was used to construct the message.
Use of the MIME-Version header field indicates that the message is in Use of the MIME-Version header field indicates that the message is in
full compliance with the MIME protocol (as defined in RFC 2045[7]). full compliance with the MIME protocol (as defined in RFC 2045[7]).
Proxies/gateways are responsible for ensuring full compliance (where Proxies/gateways are responsible for ensuring full compliance (where
possible) when exporting HTTP messages to strict MIME environments. possible) when exporting HTTP messages to strict MIME environments.
MIME-Version = "MIME-Version" ":" 1*DIGIT "." 1*DIGIT MIME-Version = "MIME-Version" ":" 1*DIGIT "." 1*DIGIT
MIME version "1.0" is the default for use in HTTP/1.1. However, MIME version "1.0" is the default for use in HTTP/1.1. However,
HTTP/1.1 message parsing and semantics are defined by this document HTTP/1.1 message parsing and semantics are defined by this document
and not the MIME specification. and not the MIME specification.
A.4.2. Conversion to Canonical Form D.2. Conversion to Canonical Form
RFC 2045 [7] requires that an Internet mail entity be converted to RFC 2045 [7] requires that an Internet mail entity be converted to
canonical form prior to being transferred, as described in section 4 canonical form prior to being transferred, as described in section 4
of RFC 2049 [48]. Section 3.7.1 of this document describes the forms of RFC 2049 [48]. Section 3.7.1 of this document describes the forms
allowed for subtypes of the "text" media type when transmitted over allowed for subtypes of the "text" media type when transmitted over
HTTP. RFC 2046 requires that content with a type of "text" represent HTTP. RFC 2046 requires that content with a type of "text" represent
line breaks as CRLF and forbids the use of CR or LF outside of line line breaks as CRLF and forbids the use of CR or LF outside of line
break sequences. HTTP allows CRLF, bare CR, and bare LF to indicate break sequences. HTTP allows CRLF, bare CR, and bare LF to indicate
a line break within text content when a message is transmitted over a line break within text content when a message is transmitted over
HTTP. HTTP.
skipping to change at page 174, line 47 skipping to change at page 180, line 19
complicated by the presence of a Content-Encoding and by the fact complicated by the presence of a Content-Encoding and by the fact
that HTTP allows the use of some character sets which do not use that HTTP allows the use of some character sets which do not use
octets 13 and 10 to represent CR and LF, as is the case for some octets 13 and 10 to represent CR and LF, as is the case for some
multi-byte character sets. multi-byte character sets.
Implementors should note that conversion will break any cryptographic Implementors should note that conversion will break any cryptographic
checksums applied to the original content unless the original content checksums applied to the original content unless the original content
is already in canonical form. Therefore, the canonical form is is already in canonical form. Therefore, the canonical form is
recommended for any content that uses such checksums in HTTP. recommended for any content that uses such checksums in HTTP.
A.4.3. Conversion of Date Formats D.3. Conversion of Date Formats
HTTP/1.1 uses a restricted set of date formats (Section 3.3.1) to HTTP/1.1 uses a restricted set of date formats (Section 3.3.1) to
simplify the process of date comparison. Proxies and gateways from simplify the process of date comparison. Proxies and gateways from
other protocols SHOULD ensure that any Date header field present in a other protocols SHOULD ensure that any Date header field present in a
message conforms to one of the HTTP/1.1 formats and rewrite the date message conforms to one of the HTTP/1.1 formats and rewrite the date
if necessary. if necessary.
A.4.4. Introduction of Content-Encoding D.4. Introduction of Content-Encoding
RFC 2045 does not include any concept equivalent to HTTP/1.1's RFC 2045 does not include any concept equivalent to HTTP/1.1's
Content-Encoding header field. Since this acts as a modifier on the Content-Encoding header field. Since this acts as a modifier on the
media type, proxies and gateways from HTTP to MIME-compliant media type, proxies and gateways from HTTP to MIME-compliant
protocols MUST either change the value of the Content-Type header protocols MUST either change the value of the Content-Type header
field or decode the entity-body before forwarding the message. (Some field or decode the entity-body before forwarding the message. (Some
experimental applications of Content-Type for Internet mail have used experimental applications of Content-Type for Internet mail have used
a media-type parameter of ";conversions=<content-coding>" to perform a media-type parameter of ";conversions=<content-coding>" to perform
a function equivalent to Content-Encoding. However, this parameter a function equivalent to Content-Encoding. However, this parameter
is not part of RFC 2045). is not part of RFC 2045).
A.4.5. No Content-Transfer-Encoding D.5. No Content-Transfer-Encoding
HTTP does not use the Content-Transfer-Encoding (CTE) field of RFC HTTP does not use the Content-Transfer-Encoding (CTE) field of RFC
2045. Proxies and gateways from MIME-compliant protocols to HTTP 2045. Proxies and gateways from MIME-compliant protocols to HTTP
MUST remove any non-identity CTE ("quoted-printable" or "base64") MUST remove any non-identity CTE ("quoted-printable" or "base64")
encoding prior to delivering the response message to an HTTP client. encoding prior to delivering the response message to an HTTP client.
Proxies and gateways from HTTP to MIME-compliant protocols are Proxies and gateways from HTTP to MIME-compliant protocols are
responsible for ensuring that the message is in the correct format responsible for ensuring that the message is in the correct format
and encoding for safe transport on that protocol, where "safe and encoding for safe transport on that protocol, where "safe
transport" is defined by the limitations of the protocol being used. transport" is defined by the limitations of the protocol being used.
Such a proxy or gateway SHOULD label the data with an appropriate Such a proxy or gateway SHOULD label the data with an appropriate
Content-Transfer-Encoding if doing so will improve the likelihood of Content-Transfer-Encoding if doing so will improve the likelihood of
safe transport over the destination protocol. safe transport over the destination protocol.
A.4.6. Introduction of Transfer-Encoding D.6. Introduction of Transfer-Encoding
HTTP/1.1 introduces the Transfer-Encoding header field HTTP/1.1 introduces the Transfer-Encoding header field
(Section 14.41). Proxies/gateways MUST remove any transfer-coding (Section 14.41). Proxies/gateways MUST remove any transfer-coding
prior to forwarding a message via a MIME-compliant protocol. prior to forwarding a message via a MIME-compliant protocol.
A process for decoding the "chunked" transfer-coding (Section 3.6) A process for decoding the "chunked" transfer-coding (Section 3.6)
can be represented in pseudo-code as: can be represented in pseudo-code as:
length := 0 length := 0
read chunk-size, chunk-extension (if any) and CRLF read chunk-size, chunk-extension (if any) and CRLF
while (chunk-size > 0) { while (chunk-size > 0) {
read chunk-data and CRLF read chunk-data and CRLF
append chunk-data to entity-body append chunk-data to entity-body
length := length + chunk-size length := length + chunk-size
read chunk-size and CRLF read chunk-size and CRLF
} }
read entity-header
while (entity-header not empty) {
append entity-header to existing header fields
read entity-header read entity-header
} while (entity-header not empty) {
Content-Length := length append entity-header to existing header fields
Remove "chunked" from Transfer-Encoding read entity-header
}
Content-Length := length
Remove "chunked" from Transfer-Encoding
A.4.7. MHTML and Line Length Limitations D.7. MHTML and Line Length Limitations
HTTP implementations which share code with MHTML [45] implementations HTTP implementations which share code with MHTML [45] implementations
need to be aware of MIME line length limitations. Since HTTP does need to be aware of MIME line length limitations. Since HTTP does
not have this limitation, HTTP does not fold long lines. MHTML not have this limitation, HTTP does not fold long lines. MHTML
messages being transported by HTTP follow all conventions of MHTML, messages being transported by HTTP follow all conventions of MHTML,
including line length limitations and folding, canonicalization, including line length limitations and folding, canonicalization,
etc., since HTTP transports all message-bodies as payload (see etc., since HTTP transports all message-bodies as payload (see
Section 3.7.2) and does not interpret the content or any MIME header Section 3.7.2) and does not interpret the content or any MIME header
lines that might be contained therein. lines that might be contained therein.
A.5. Additional Features Appendix E. Additional Features
RFC 1945 and RFC 2068 document protocol elements used by some RFC 1945 and RFC 2068 document protocol elements used by some
existing HTTP implementations, but not consistently and correctly existing HTTP implementations, but not consistently and correctly
across most HTTP/1.1 applications. Implementors are advised to be across most HTTP/1.1 applications. Implementors are advised to be
aware of these features, but cannot rely upon their presence in, or aware of these features, but cannot rely upon their presence in, or
interoperability with, other HTTP/1.1 applications. Some of these interoperability with, other HTTP/1.1 applications. Some of these
describe proposed experimental features, and some describe features describe proposed experimental features, and some describe features
that experimental deployment found lacking that are now addressed in that experimental deployment found lacking that are now addressed in
the base HTTP/1.1 specification. the base HTTP/1.1 specification.
A number of other headers, such as Content-Disposition and Title, A number of other headers, such as Content-Disposition and Title,
from SMTP and MIME are also often implemented (see RFC 2076 [37]). from SMTP and MIME are also often implemented (see RFC 2076 [37]).
A.5.1. Content-Disposition E.1. Content-Disposition
The Content-Disposition response-header field has been proposed as a The Content-Disposition response-header field has been proposed as a
means for the origin server to suggest a default filename if the user means for the origin server to suggest a default filename if the user
requests that the content is saved to a file. This usage is derived requests that the content is saved to a file. This usage is derived
from the definition of Content-Disposition in RFC 1806 [35]. from the definition of Content-Disposition in RFC 1806 [35].
content-disposition = "Content-Disposition" ":" content-disposition = "Content-Disposition" ":"
disposition-type *( ";" disposition-parm ) disposition-type *( ";" disposition-parm )
disposition-type = "attachment" | disp-extension-token disposition-type = "attachment" | disp-extension-token
disposition-parm = filename-parm | disp-extension-parm disposition-parm = filename-parm | disp-extension-parm
filename-parm = "filename" "=" quoted-string filename-parm = "filename" "=" quoted-string
disp-extension-token = token disp-extension-token = token
disp-extension-parm = token "=" ( token | quoted-string ) disp-extension-parm = token "=" ( token | quoted-string )
An example is An example is
Content-Disposition: attachment; filename="fname.ext" Content-Disposition: attachment; filename="fname.ext"
The receiving user agent SHOULD NOT respect any directory path The receiving user agent SHOULD NOT respect any directory path
information present in the filename-parm parameter, which is the only information present in the filename-parm parameter, which is the only
parameter believed to apply to HTTP implementations at this time. parameter believed to apply to HTTP implementations at this time.
The filename SHOULD be treated as a terminal component only. The filename SHOULD be treated as a terminal component only.
If this header is used in a response with the application/ If this header is used in a response with the application/
octet-stream content-type, the implied suggestion is that the user octet-stream content-type, the implied suggestion is that the user
agent should not display the response, but directly enter a `save agent should not display the response, but directly enter a `save
response as...' dialog. response as...' dialog.
See Section 15.5 for Content-Disposition security issues. See Section 15.5 for Content-Disposition security issues.
A.6. Compatibility with Previous Versions Appendix F. Compatibility with Previous Versions
It is beyond the scope of a protocol specification to mandate It is beyond the scope of a protocol specification to mandate
compliance with previous versions. HTTP/1.1 was deliberately compliance with previous versions. HTTP/1.1 was deliberately
designed, however, to make supporting previous versions easy. It is designed, however, to make supporting previous versions easy. It is
worth noting that, at the time of composing this specification worth noting that, at the time of composing this specification
(1996), we would expect commercial HTTP/1.1 servers to: (1996), we would expect commercial HTTP/1.1 servers to:
o recognize the format of the Request-Line for HTTP/0.9, 1.0, and o recognize the format of the Request-Line for HTTP/0.9, 1.0, and
1.1 requests; 1.1 requests;
skipping to change at page 178, line 8 skipping to change at page 183, line 33
o recognize the format of the Status-Line for HTTP/1.0 and 1.1 o recognize the format of the Status-Line for HTTP/1.0 and 1.1
responses; responses;
o understand any valid response in the format of HTTP/0.9, 1.0, or o understand any valid response in the format of HTTP/0.9, 1.0, or
1.1. 1.1.
For most implementations of HTTP/1.0, each connection is established For most implementations of HTTP/1.0, each connection is established
by the client prior to the request and closed by the server after by the client prior to the request and closed by the server after
sending the response. Some implementations implement the Keep-Alive sending the response. Some implementations implement the Keep-Alive
version of persistent connections described in Section 19.7.1 of RFC version of persistent connections described in section 19.7.1 of RFC
2068 [33]. 2068 [33].
A.6.1. Changes from HTTP/1.0 F.1. Changes from HTTP/1.0
This section summarizes major differences between versions HTTP/1.0 This section summarizes major differences between versions HTTP/1.0
and HTTP/1.1. and HTTP/1.1.
A.6.1.1. Changes to Simplify Multi-homed Web Servers and Conserve IP F.1.1. Changes to Simplify Multi-homed Web Servers and Conserve IP
Addresses Addresses
The requirements that clients and servers support the Host request- The requirements that clients and servers support the Host request-
header, report an error if the Host request-header (Section 14.23) is header, report an error if the Host request-header (Section 14.23) is
missing from an HTTP/1.1 request, and accept absolute URIs missing from an HTTP/1.1 request, and accept absolute URIs (section
(Section 5.1.2) are among the most important changes defined by this 5.1.2) are among the most important changes defined by this
specification. specification.
Older HTTP/1.0 clients assumed a one-to-one relationship of IP Older HTTP/1.0 clients assumed a one-to-one relationship of IP
addresses and servers; there was no other established mechanism for addresses and servers; there was no other established mechanism for
distinguishing the intended server of a request than the IP address distinguishing the intended server of a request than the IP address
to which that request was directed. The changes outlined above will to which that request was directed. The changes outlined above will
allow the Internet, once older HTTP clients are no longer common, to allow the Internet, once older HTTP clients are no longer common, to
support multiple Web sites from a single IP address, greatly support multiple Web sites from a single IP address, greatly
simplifying large operational Web servers, where allocation of many simplifying large operational Web servers, where allocation of many
IP addresses to a single host has created serious problems. The IP addresses to a single host has created serious problems. The
skipping to change at page 179, line 5 skipping to change at page 184, line 26
o Both clients and servers MUST support the Host request-header. o Both clients and servers MUST support the Host request-header.
o A client that sends an HTTP/1.1 request MUST send a Host header. o A client that sends an HTTP/1.1 request MUST send a Host header.
o Servers MUST report a 400 (Bad Request) error if an HTTP/1.1 o Servers MUST report a 400 (Bad Request) error if an HTTP/1.1
request does not include a Host request-header. request does not include a Host request-header.
o Servers MUST accept absolute URIs. o Servers MUST accept absolute URIs.
A.6.2. Compatibility with HTTP/1.0 Persistent Connections F.2. Compatibility with HTTP/1.0 Persistent Connections
Some clients and servers might wish to be compatible with some Some clients and servers might wish to be compatible with some
previous implementations of persistent connections in HTTP/1.0 previous implementations of persistent connections in HTTP/1.0
clients and servers. Persistent connections in HTTP/1.0 are clients and servers. Persistent connections in HTTP/1.0 are
explicitly negotiated as they are not the default behavior. HTTP/1.0 explicitly negotiated as they are not the default behavior. HTTP/1.0
experimental implementations of persistent connections are faulty, experimental implementations of persistent connections are faulty,
and the new facilities in HTTP/1.1 are designed to rectify these and the new facilities in HTTP/1.1 are designed to rectify these
problems. The problem was that some existing 1.0 clients may be problems. The problem was that some existing 1.0 clients may be
sending Keep-Alive to a proxy server that doesn't understand sending Keep-Alive to a proxy server that doesn't understand
Connection, which would then erroneously forward it to the next Connection, which would then erroneously forward it to the next
skipping to change at page 179, line 32 skipping to change at page 185, line 5
connections, so that prohibition is clearly unacceptable. Therefore, connections, so that prohibition is clearly unacceptable. Therefore,
we need some other mechanism for indicating a persistent connection we need some other mechanism for indicating a persistent connection
is desired, which is safe to use even when talking to an old proxy is desired, which is safe to use even when talking to an old proxy
that ignores Connection. Persistent connections are the default for that ignores Connection. Persistent connections are the default for
HTTP/1.1 messages; we introduce a new keyword (Connection: close) for HTTP/1.1 messages; we introduce a new keyword (Connection: close) for
declaring non-persistence. See Section 14.10. declaring non-persistence. See Section 14.10.
The original HTTP/1.0 form of persistent connections (the Connection: The original HTTP/1.0 form of persistent connections (the Connection:
Keep-Alive and Keep-Alive header) is documented in RFC 2068. [33] Keep-Alive and Keep-Alive header) is documented in RFC 2068. [33]
A.6.3. Changes from RFC 2068 F.3. Changes from RFC 2068
This specification has been carefully audited to correct and This specification has been carefully audited to correct and
disambiguate key word usage; RFC 2068 had many problems in respect to disambiguate key word usage; RFC 2068 had many problems in respect to
the conventions laid out in RFC 2119 [34]. the conventions laid out in RFC 2119 [34].
Clarified which error code should be used for inbound server failures Clarified which error code should be used for inbound server failures
(e.g. DNS failures). (Section 10.5.5). (e.g. DNS failures). (Section 10.5.5).
CREATE had a race that required an Etag be sent when a resource is CREATE had a race that required an Etag be sent when a resource is
first created. (Section 10.2.2). first created. (Section 10.2.2).
skipping to change at page 183, line 5 skipping to change at page 188, line 5
clients.(Section 3.6, 3.6.1, and 14.39) clients.(Section 3.6, 3.6.1, and 14.39)
The PATCH, LINK, UNLINK methods were defined but not commonly The PATCH, LINK, UNLINK methods were defined but not commonly
implemented in previous versions of this specification. See RFC 2068 implemented in previous versions of this specification. See RFC 2068
[33]. [33].
The Alternates, Content-Version, Derived-From, Link, URI, Public and The Alternates, Content-Version, Derived-From, Link, URI, Public and
Content-Base header fields were defined in previous versions of this Content-Base header fields were defined in previous versions of this
specification, but not commonly implemented. See RFC 2068 [33]. specification, but not commonly implemented. See RFC 2068 [33].
Appendix B. Index Appendix G. Change Log (to be removed by RFC Editor before publication)
Please see the PostScript version of this RFC for the INDEX. G.1. Since RFC2616
Update Authors. Add Editorial Note and Acknowledgements (containing
the original RFC2616 authors). Add "Normative References",
containing just RFC2616 for now.
Appendix H. Open issues (to be removed by RFC Editor prior to
publication)
H.1. rfc2616bis
Type: edit
julian.reschke@greenbytes.de (2006-10-10): Umbrella issue for changes
with respect to the revision process itself.
H.2. edit
Type: edit
julian.reschke@greenbytes.de (2006-08-10): Umbrella issue for
editorial fixes/enhancements.
Index Index
1 1
100 Continue (status code) 63 100 Continue (status code) 65
101 Switching Protocols (status code) 63 101 Switching Protocols (status code) 65
110 Response is stale (warn code) 156
111 Revalidation failed (warn code) 156
112 Disconnected operation (warn code) 156
113 Heuristic expiration (warn code) 156
199 Miscellaneous warning (warn code) 156
2 2
200 OK (status code) 64 200 OK (status code) 66
201 Created (status code) 64 201 Created (status code) 66
202 Accepted (status code) 64 202 Accepted (status code) 66
203 Non-Authoritative Information (status code) 65 203 Non-Authoritative Information (status code) 67
204 No Content (status code) 65 204 No Content (status code) 67
205 Reset Content (status code) 65 205 Reset Content (status code) 67
206 Partial Content (status code) 66 206 Partial Content (status code) 68
214 Transformation applied (warn code) 156
299 Miscellaneous persistent warning (warn code) 157
3 3
300 Multiple Choices (status code) 67 300 Multiple Choices (status code) 69
301 Moved Permanently (status code) 67 301 Moved Permanently (status code) 69
302 Found (status code) 68 302 Found (status code) 70
303 See Other (status code) 68 303 See Other (status code) 70
304 Not Modified (status code) 69 304 Not Modified (status code) 71
305 Use Proxy (status code) 69 305 Use Proxy (status code) 71
306 (Unused) (status code) 70 306 (Unused) (status code) 72
307 Temporary Redirect (status code) 70 307 Temporary Redirect (status code) 72
4 4
400 Bad Request (status code) 71 400 Bad Request (status code) 73
401 Unauthorized (status code) 71 401 Unauthorized (status code) 73
402 Payment Required (status code) 71 402 Payment Required (status code) 73
403 Forbidden (status code) 71 403 Forbidden (status code) 73
404 Not Found (status code) 71 404 Not Found (status code) 73
405 Method Not Allowed (status code) 72 405 Method Not Allowed (status code) 74
406 Not Acceptable (status code) 72 406 Not Acceptable (status code) 74
407 Proxy Authentication Required (status code) 72 407 Proxy Authentication Required (status code) 74
408 Request Timeout (status code) 73 408 Request Timeout (status code) 75
409 Conflict (status code) 73 409 Conflict (status code) 75
410 Gone (status code) 73 410 Gone (status code) 75
411 Length Required (status code) 74 411 Length Required (status code) 76
412 Precondition Failed (status code) 74 412 Precondition Failed (status code) 76
413 Request Entity Too Large (status code) 74 413 Request Entity Too Large (status code) 76
414 Request-URI Too Long (status code) 74 414 Request-URI Too Long (status code) 76
415 Unsupported Media Type (status code) 74 415 Unsupported Media Type (status code) 76
416 Requested Range Not Satisfiable (status code) 74 416 Requested Range Not Satisfiable (status code) 76
417 Expectation Failed (status code) 75 417 Expectation Failed (status code) 77
5 5
500 Internal Server Error (status code) 75 500 Internal Server Error (status code) 77
501 Not Implemented (status code) 75 501 Not Implemented (status code) 77
502 Bad Gateway (status code) 75 502 Bad Gateway (status code) 77
503 Service Unavailable (status code) 76 503 Service Unavailable (status code) 78
504 Gateway Timeout (status code) 76 504 Gateway Timeout (status code) 78
505 HTTP Version Not Supported (status code) 76 505 HTTP Version Not Supported (status code) 78
A A
Accept header field 107 Accept header 109
Accept-Charset header field 109 Accept-Charset header 111
Accept-Encoding header field 109 Accept-Encoding header 111
Accept-Language header field 111 Accept-Language header 113
Accept-Ranges header field 112 Accept-Ranges header 114
age 12 age 14
Age header field 112 Age header 114
Allow header field 113 Allow header 115
Alternates header field 182 Authorization header 116
application/http Media Type 170
Authorization header field 113
C C
cache 11 cache 13
Cache Directives Cache Directives
max-age 119, 121 max-age 121, 123
max-stale 119 max-stale 121
min-fresh 119 min-fresh 121
must-revalidate 121 must-revalidate 123
no-cache 117 no-cache 119
no-store 117 no-store 119
no-transform 122 no-transform 125
only-if-cached 121 only-if-cached 123
private 116 private 118
proxy-revalidate 122 proxy-revalidate 124
public 116 public 118
s-maxage 118 s-maxage 120
Cache-Control header field 114 Cache-Control header 116
cacheable 11 cacheable 13
client 10 client 12
compress (content coding) 25 compress 27
CONNECT method 62 CONNECT method 64
connection 9 connection 11
Connection header field 124 Connection header 126
Content Codings 25 content negotiation 12
compress 25 Content-Encoding header 127
deflate 26 Content-Language header 128
gzip 25 Content-Length header 128
identity 26 Content-Location header 129
content negotiation 10 Content-MD5 header 130
Content-Base header field 182 Content-Range header 131
Content-Disposition header field 176 Content-Type header 133
Content-Encoding header field 125
Content-Language header field 125
Content-Length header field 126
Content-Location header field 127
Content-MD5 header field 128
Content-Range header field 129
Content-Type header field 131
Content-Version header field 182
D D
Date header field 131 Date header 133
deflate (content coding) 26 deflate 28
DELETE method 61 DELETE method 63
Derived-From header field 182 downstream 15
downstream 13
E E
entity 9 entity 11
ETag header field 133 ETag header 135
Expect header field 133 Expect header 135
Expires header field 134 Expires header 136
explicit expiration time 12 explicit expiration time 14
F F
first-hand 11 first-hand 13
fresh 12 fresh 14
freshness lifetime 12 freshness lifetime 14
From heade fieldr 135 From header 137
G G
gateway 11 gateway 13
GET method 58 GET method 60
Grammar Grammar
Accept 107 Accept 109
Accept-Charset 109 Accept-Charset 111
Accept-Encoding 109 Accept-Encoding 111
accept-extension 107 accept-extension 109
Accept-Language 111 Accept-Language 113
accept-params 107 accept-params 109
Accept-Ranges 112 Accept-Ranges 114
acceptable-ranges 112 acceptable-ranges 114
Age 113 Age 115
age-value 113 age-value 115
Allow 113 Allow 115
ALPHA 18 ALPHA 20
asctime-date 23 asctime-date 25
attribute 26 attribute 28
Authorization 114 Authorization 116
byte-content-range-spec 129 byte-content-range-spec 131
byte-range-resp-spec 129 byte-range-resp-spec 131
byte-range-set 145 byte-range-set 147
byte-range-spec 145 byte-range-spec 147
byte-ranges-specifier 145 byte-ranges-specifier 147
bytes-unit 33 bytes-unit 35
Cache-Control 115 Cache-Control 117
cache-directive 115 cache-directive 117
cache-extension 115 cache-extension 117
cache-request-directive 115 cache-request-directive 117
cache-response-directive 115 cache-response-directive 117
CHAR 18 CHAR 20
charset 24 charset 26
chunk 28 chunk 30
chunk-data 28 chunk-data 30
chunk-ext-name 28 chunk-ext-name 30
chunk-ext-val 28 chunk-ext-val 30
chunk-extension 28 chunk-extension 30
chunk-size 28 chunk-size 30
Chunked-Body 28 Chunked-Body 30
codings 109 codings 111
comment 19 comment 21
Connection 124 Connection 126
connection-token 124 connection-token 126
content-coding 25 content-coding 27
content-disposition 177 content-disposition 182
Content-Encoding 125 Content-Encoding 127
Content-Language 125 Content-Language 128
Content-Length 126 Content-Length 128
Content-Location 127 Content-Location 129
Content-MD5 128 Content-MD5 130
Content-Range 129 Content-Range 131
content-range-spec 129 content-range-spec 131
Content-Type 131 Content-Type 133
CR 18 CR 20
CRLF 18 CRLF 20
ctext 19 ctext 21
CTL 18 CTL 20
Date 131 Date 134
date1 23 date1 25
date2 23 date2 25
date3 23 date3 25
delta-seconds 24 delta-seconds 26
DIGIT 18 DIGIT 20
disp-extension-parm 177 disp-extension-parm 182
disp-extension-token 177 disp-extension-token 182
disposition-parm 177 disposition-parm 182
disposition-type 177 disposition-type 182
entity-body 47 entity-body 49
entity-header 47 entity-header 49
entity-tag 32 entity-tag 34
ETag 133 ETag 135
Expect 133 Expect 135
expect-params 133 expect-params 135
expectation 133 expectation 135
expectation-extension 133 expectation-extension 135
Expires 134 Expires 136
extension-code 45 extension-code 47
extension-header 47 extension-header 49
extension-method 39 extension-method 41
extension-pragma 143 extension-pragma 145
field-content 35 field-content 37
field-name 35 field-name 37
field-value 35 field-value 37
filename-parm 177 filename-parm 182
first-byte-pos 145 first-byte-pos 147
From 135 From 137
general-header 38 general-header 40
generic-message 34 generic-message 36
HEX 19 HEX 21
Host 135 Host 138
HT 18 HT 20
HTTP-date 23 HTTP-date 25
HTTP-message 34 HTTP-message 36
HTTP-Version 20 HTTP-Version 22
http_URL 21 http_URL 23
If-Match 136 If-Match 138
If-Modified-Since 137 If-Modified-Since 139
If-None-Match 139 If-None-Match 141
If-Range 140 If-Range 142
If-Unmodified-Since 141 If-Unmodified-Since 143
instance-length 129 instance-length 131
language-range 111 language-range 113
language-tag 32 language-tag 34
last-byte-pos 145 last-byte-pos 147
last-chunk 28 last-chunk 30
Last-Modified 141 Last-Modified 143
LF 18 LF 20
LOALPHA 18 LOALPHA 20
Location 142 Location 144
LWS 18 LWS 20
Max-Forwards 142 Max-Forwards 145
md5-digest 128 md5-digest 130
media-range 107 media-range 109
media-type 29 media-type 31
message-body 35 message-body 37
message-header 35 message-header 37
Method 39 Method 41
MIME-Version 174 MIME-Version 179
month 23 month 25
OCTET 18 OCTET 20
opaque-tag 32 opaque-tag 34
other-range-unit 33 other-range-unit 35
parameter 26 parameter 28
Pragma 143 Pragma 145
pragma-directive 143 pragma-directive 145
primary-tag 32 primary-tag 34
product 31 product 33
product-version 31 product-version 33
protocol-name 153 protocol-name 155
protocol-version 153 protocol-version 155
Proxy-Authenticate 144 Proxy-Authenticate 146
Proxy-Authorization 144 Proxy-Authorization 146
pseudonym 153 pseudonym 155
qdtext 19 qdtext 21
quoted-pair 19 quoted-pair 21
quoted-string 19 quoted-string 21
qvalue 31 qvalue 33
Range 146 Range 148
range-unit 33 range-unit 35
ranges-specifier 145 ranges-specifier 147
Reason-Phrase 45 Reason-Phrase 47
received-by 153 received-by 155
received-protocol 153 received-protocol 155
Referer 147 Referer 149
Request 39 Request 41
request-header 42 request-header 44
Request-Line 39 Request-Line 41
Request-URI 40 Request-URI 42
Response 43 Response 45
response-header 46 response-header 48
Retry-After 147 Retry-After 150
rfc850-date 23 rfc850-date 25
rfc1123-date 23 rfc1123-date 25
separators 19 separators 21
Server 148 Server 150
SP 18 SP 20
start-line 34 start-line 36
Status-Code 45 Status-Code 47
Status-Line 43 Status-Line 45
subtag 32 subtag 34
subtype 29 subtype 31
suffix-byte-range-spec 145 suffix-byte-range-spec 147
suffix-length 145 suffix-length 147
t-codings 148 t-codings 151
TE 148 TE 151
TEXT 18 TEXT 20
time 23 time 25
token 19 token 21
Trailer 150 Trailer 152
trailer 28 trailer 30
transfer-coding 26 transfer-coding 28
Transfer-Encoding 150 Transfer-Encoding 152
transfer-extension 26 transfer-extension 28
type 29 type 31
UPALPHA 18 UPALPHA 20
Upgrade 151 Upgrade 153
User-Agent 152 User-Agent 154
value 26 value 28
Vary 152 Vary 154
Via 153 Via 155
warn-agent 155 warn-agent 157
warn-code 155 warn-code 157
warn-date 155 warn-date 157
warn-text 155 warn-text 157
Warning 155 Warning 157
warning-value 155 warning-value 157
weak 32 weak 34
weekday 23 weekday 25
wkday 23 wkday 25
WWW-Authenticate 157 WWW-Authenticate 159
gzip (content coding) 25 gzip 27
H H
HEAD method 58 HEAD method 60
Header Fields Headers
Accept 107 Accept 109
Accept-Charset 109 Accept-Charset 111
Accept-Encoding 109 Accept-Encoding 111
Accept-Language 111 Accept-Language 113
Accept-Ranges 112 Accept-Ranges 114
Age 112 Age 114
Allow 113 Allow 115
Alternate 182 Authorization 116
Authorization 113 Cache-Control 116
Cache-Control 114 Connection 126
Connection 124 Content-Encoding 127
Content-Base 182 Content-Language 128
Content-Disposition 176 Content-Length 128
Content-Encoding 125 Content-Location 129
Content-Language 125 Content-MD5 130
Content-Length 126 Content-Range 131
Content-Location 127 Content-Type 133
Content-MD5 128 Date 133
Content-Range 129 ETag 135
Content-Type 131 Expect 135
Content-Version 182 Expires 136
Date 131 From 137
Derived-From 182 Host 137
ETag 133 If-Match 138
Expect 133 If-Modified-Since 139
Expires 134 If-None-Match 141
From 135 If-Range 142
Host 135 If-Unmodified-Since 143
If-Match 136 Last-Modified 143
If-Modified-Since 137 Location 144
If-None-Match 139 Max-Forwards 144
If-Range 140 Pragma 145
If-Unmodified-Since 141 Proxy-Authenticate 146
Last-Modified 141 Proxy-Authorization 146
Link 182 Range 147
Location 142 Referer 149
Max-Forwards 142 Retry-After 150
MIME-Version 174 Server 150
Pragma 143 TE 151
Proxy-Authenticate 144 Trailer 152
Proxy-Authorization 144 Transfer-Encoding 152
Public 182 Upgrade 153
Range 144 User-Agent 154
Referer 147 Vary 154
Retry-After 147 Via 155
Server 148 Warning 157
TE 148 WWW-Authenticate 159
Trailer 149 heuristic expiration time 14
Transfer-Encoding 150 Host header 137
Upgrade 150
URI 182
User-Agent 152
Vary 152
Via 153
Warning 154
WWW-Authenticate 157
heuristic expiration time 12
Host header field 135
http URI scheme 21
I I
identity (content coding) 26 identity 28
If-Match header field 136 If-Match header 138
If-Modified-Since header field 137 If-Modified-Since header 139
If-None-Match header field 139 If-None-Match header 141
If-Range header field 140 If-Range header 142
If-Unmodified-Since header field 141 If-Unmodified-Since header 143
inbound 13 inbound 15
L L
Last-Modified header field 141 Last-Modified header 143
Link header field 182 Location header 144
LINK method 181
Location header field 142
M M
max-age max-age
Cache Directive 119, 121 Cache Directive 121, 123
Max-Forwards header field 142 Max-Forwards header 144
max-stale max-stale
Cache Directive 119 Cache Directive 121
Media Type message 11
application/http 170
message/http 170
multipart/byteranges 171
multipart/x-byteranges 172
message 9
message/http Media Type 170
Methods Methods
CONNECT 62 CONNECT 64
DELETE 61 DELETE 63
GET 58 GET 60
HEAD 58 HEAD 60
LINK 181 OPTIONS 59
OPTIONS 57 POST 61
PATCH 181 PUT 62
POST 59 TRACE 63
PUT 60
TRACE 61
UNLINK 181
MIME-Version header field 174
min-fresh min-fresh
Cache Directive 119
multipart/byteranges Media Type 171
multipart/x-byteranges Media Type 172
must-revalidate
Cache Directive 121 Cache Directive 121
must-revalidate
Cache Directive 123
N N
no-cache no-cache
Cache Directive 117 Cache Directive 119
no-store no-store
Cache Directive 117 Cache Directive 119
no-transform no-transform
Cache Directive 122 Cache Directive 125
O O
only-if-cached only-if-cached
Cache Directive 121 Cache Directive 123
OPTIONS method 57 OPTIONS method 59
origin server 10 origin server 12
outbound 13 outbound 15
P P
PATCH method 181 POST method 61
POST method 59 Pragma header 145
Pragma header field 143
private private
Cache Directive 116 Cache Directive 118
proxy 10 proxy 12
Proxy-Authenticate header field 144 Proxy-Authenticate header 146
Proxy-Authorization header field 144 Proxy-Authorization header 146
proxy-revalidate proxy-revalidate
Cache Directive 122 Cache Directive 124
public public
Cache Directive 116 Cache Directive 118
Public header field 182 PUT method 62
PUT method 60
R R
Range header field 144 Range header 147
Referer header field 147 Referer header 149
representation 9 representation 11
request 9 request 11
resource 9 resource 11
response 9 response 11
Retry-After header field 147 Retry-After header 150
S S
s-maxage s-maxage
Cache Directive 118 Cache Directive 120
semantically transparent 12 semantically transparent 14
server 10 server 12
Server header field 148 Server header 150
stale 12 stale 14
Status Codes Status Codes
100 Continue 63 100 Continue 65
101 Switching Protocols 63 101 Switching Protocols 65
200 OK 64 200 OK 66
201 Created 64 201 Created 66
202 Accepted 64 202 Accepted 66
203 Non-Authoritative Information 65 203 Non-Authoritative Information 67
204 No Content 65 204 No Content 67
205 Reset Content 65 205 Reset Content 67
206 Partial Content 66 206 Partial Content 68
300 Multiple Choices 67 300 Multiple Choices 69
301 Moved Permanently 67 301 Moved Permanently 69
302 Found 68 302 Found 70
303 See Other 68 303 See Other 70
304 Not Modified 69 304 Not Modified 71
305 Use Proxy 69 305 Use Proxy 71
306 (Unused) 70 306 (Unused) 72
307 Temporary Redirect 70 307 Temporary Redirect 72
400 Bad Request 71 400 Bad Request 73
401 Unauthorized 71 401 Unauthorized 73
402 Payment Required 71 402 Payment Required 73
403 Forbidden 71 403 Forbidden 73
404 Not Found 71 404 Not Found 73
405 Method Not Allowed 72 405 Method Not Allowed 74
406 Not Acceptable 72 406 Not Acceptable 74
407 Proxy Authentication Required 72 407 Proxy Authentication Required 74
408 Request Timeout 73 408 Request Timeout 75
409 Conflict 73 409 Conflict 75
410 Gone 73 410 Gone 75
411 Length Required 74 411 Length Required 76
412 Precondition Failed 74 412 Precondition Failed 76
413 Request Entity Too Large 74 413 Request Entity Too Large 76
414 Request-URI Too Long 74 414 Request-URI Too Long 76
415 Unsupported Media Type 74 415 Unsupported Media Type 76
416 Requested Range Not Satisfiable 74 416 Requested Range Not Satisfiable 76
417 Expectation Failed 75 417 Expectation Failed 77
500 Internal Server Error 75 500 Internal Server Error 77
501 Not Implemented 75 501 Not Implemented 77
502 Bad Gateway 75 502 Bad Gateway 77
503 Service Unavailable 76 503 Service Unavailable 78
504 Gateway Timeout 76 504 Gateway Timeout 78
505 HTTP Version Not Supported 76 505 HTTP Version Not Supported 78
T T
TE header field 148 TE header 151
TRACE method 61 TRACE method 63
Trailer header field 149 Trailer header 152
Transfer-Encoding header field 150 Transfer-Encoding header 152
tunnel 11 tunnel 13
U U
UNLINK method 181 Upgrade header 153
Upgrade header field 150 upstream 15
upstream 13 user agent 12
URI header field 182 User-Agent header 154
URI scheme
http 21
user agent 10
User-Agent header field 152
V V
validator 12 validator 14
variant 10 variant 12
Vary header field 152 Vary header 154
Via header field 153 Via header 155
W W
Warn Codes Warning header 157
110 Response is stale 156 WWW-Authenticate header 159
111 Revalidation failed 156
112 Disconnected operation 156
113 Heuristic expiration 156
199 Miscellaneous warning 156
214 Transformation applied 156
299 Miscellaneous persistent warning 157
Warning header field 154
WWW-Authenticate header field 157
Authors' Addresses Authors' Addresses
Roy T. Fielding Yves Lafon
Department of Information and Computer Science
University of California, Irvine
Irvine, CA 92697-3425
Fax: +1(949)824-1715
Email: fielding@ics.uci.edu
James Gettys
World Wide Web Consortium
MIT Laboratory for Computer Science, NE43-356
545 Technology Square
Cambridge, MA 02139
Fax: +1(617)258-8682
Email: jg@w3.org
Jeffrey C. Mogul
Compaq Computer Corporation
Western Research Laboratory
250 University Avenue
Palo Alto, CA 94305
Email: mogul@wrl.dec.com
Henrik Frystyk Nielsen
World Wide Web Consortium World Wide Web Consortium
MIT Laboratory for Computer Science, NE43-356 2004, Route des Lucioles
545 Technology Square Sophia Antipolis 06902
Cambridge, MA 02139 France
Fax: +1(617)258-8682
Email: frystyk@w3.org
Larry Masinter
Xerox Corporation
MIT Laboratory for Computer Science, NE43-356
3333 Coyote Hill Road
Palo Alto, CA 94034
Email: masinter@parc.xerox.com
Paul J. Leach
Microsoft Corporation
1 Microsoft Way
Redmond, WA 98052
Email: paulle@microsoft.com Phone: +33 492387943
Fax: +33 492387822
Email: ylafon@w3.org
URI: http://www.w3.org/
Tim Berners-Lee Julian F. Reschke
World Wide Web Consortium greenbytes GmbH
MIT Laboratory for Computer Science, NE43-356 Hafenweg 16
545 Technology Square Muenster, NW 48155
Cambridge, MA 02139 Germany
Fax: +1(617)258-8682 Phone: +49 251 2807760
Email: timbl@w3.org Fax: +49 251 2807761
Email: julian.reschke@greenbytes.de
URI: http://greenbytes.de/tech/webdav/
Full Copyright Statement Full Copyright Statement
Copyright (C) The Internet Society (1999). All Rights Reserved. Copyright (C) The IETF Trust (2006).
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be This document is subject to the rights, licenses and restrictions
revoked by the Internet Society or its successors or assigns. contained in BCP 78, and except as set forth therein, the authors
retain all their rights.
This document and the information contained herein is provided on an This document and the information contained herein are provided on an
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property Intellectual Property
The IETF takes no position regarding the validity or scope of any The IETF takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights this document or the extent to which any license under such rights
might or might not be available; neither does it represent that it might or might not be available; nor does it represent that it has
has made any effort to identify any such rights. Information on the made any independent effort to identify any such rights. Information
IETF's procedures with respect to rights in standards-track and on the procedures with respect to rights in RFC documents can be
standards-related documentation can be found in BCP 11. Copies of found in BCP 78 and BCP 79.
claims of rights made available for publication and any assurances of
licenses to be made available, or the result of an attempt made to Copies of IPR disclosures made to the IETF Secretariat and any
obtain a general license or permission for the use of such assurances of licenses to be made available, or the result of an
proprietary rights by implementors or users of this specification can attempt made to obtain a general license or permission for the use of
be obtained from the IETF Secretariat. such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at
http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to practice rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF Executive this standard. Please address the information to the IETF at
Director. ietf-ipr@ietf.org.
Acknowledgment
Funding for the RFC Editor function is currently provided by the
Internet Society.
 End of changes. 271 change blocks. 
1400 lines changed or deleted 1392 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/