rfc2616.txt   draft-lafon-rfc2616bis-03.txt 
Network Working Group R. Fielding Network Working Group R. Fielding
Request for Comments: 2616 UC Irvine Internet-Draft Day Software
Obsoletes: 2068 J. Gettys Obsoletes: 2616 (if approved) J. Gettys
Category: Standards Track Compaq/W3C Intended status: Standards Track J. Mogul
J. Mogul Expires: January 1, 2008 HP
Compaq
H. Frystyk H. Frystyk
W3C/MIT Microsoft
L. Masinter L. Masinter
Xerox Adobe Systems
P. Leach P. Leach
Microsoft Microsoft
T. Berners-Lee T. Berners-Lee
W3C/MIT W3C/MIT
June 1999 Y. Lafon, Ed.
W3C
J. Reschke, Ed.
greenbytes
June 30, 2007
Hypertext Transfer Protocol -- HTTP/1.1 Hypertext Transfer Protocol -- HTTP/1.1
draft-lafon-rfc2616bis-03
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.
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.
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 January 1, 2008.
Copyright Notice Copyright Notice
Copyright (C) The Internet Society (1999). Copyright (C) The IETF Trust (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 [RFC2324]. A feature of
the typing and negotiation of data representation, allowing systems HTTP is the typing and negotiation of data representation, allowing
to be built independently of the data being transferred. systems 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 [1], which may be joined by sending a message
with subject "subscribe" to ietf-http-wg-request@w3.org [2].
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/rfc2616bis/>.
The purpose of this document is to revise [RFC2616], 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 [RFC2026]).
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://purl.org/NET/http-errata>) (most of the
suggested fixes have been applied to draft 01 [3]).
o Incorporate corrections for newly discovered and agreed-upon
problems, using the HTTP WG mailing list as forum and
<http://www.w3.org/Protocols/HTTP/1.1/rfc2616bis/issues/> as
issues list.
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 . . . . . . . . . . . . . . . . . . . . . . . . 12
1.1. Purpose . . . . . . . . . . . . . . . . . . . . . . . . 8 1.1. Purpose . . . . . . . . . . . . . . . . . . . . . . . . 12
1.2. Requirements . . . . . . . . . . . . . . . . . . . . . . 8 1.2. Requirements . . . . . . . . . . . . . . . . . . . . . . 12
1.3. Terminology . . . . . . . . . . . . . . . . . . . . . . 9 1.3. Terminology . . . . . . . . . . . . . . . . . . . . . . 13
1.4. Overall Operation . . . . . . . . . . . . . . . . . . . 13 1.4. Overall Operation . . . . . . . . . . . . . . . . . . . 17
2. Notational Conventions and Generic Grammar . . . . . . . . . 16 2. Notational Conventions and Generic Grammar . . . . . . . . . 20
2.1. Augmented BNF . . . . . . . . . . . . . . . . . . . . . 16 2.1. Augmented BNF . . . . . . . . . . . . . . . . . . . . . 20
2.2. Basic Rules . . . . . . . . . . . . . . . . . . . . . . 18 2.2. Basic Rules . . . . . . . . . . . . . . . . . . . . . . 22
3. Protocol Parameters . . . . . . . . . . . . . . . . . . . . . 20 3. Protocol Parameters . . . . . . . . . . . . . . . . . . . . . 24
3.1. HTTP Version . . . . . . . . . . . . . . . . . . . . . . 20 3.1. HTTP Version . . . . . . . . . . . . . . . . . . . . . . 24
3.2. Uniform Resource Identifiers . . . . . . . . . . . . . . 21 3.2. Uniform Resource Identifiers . . . . . . . . . . . . . . 25
3.2.1. General Syntax . . . . . . . . . . . . . . . . . . . 21 3.2.1. General Syntax . . . . . . . . . . . . . . . . . . . 25
3.2.2. http URL . . . . . . . . . . . . . . . . . . . . . . 21 3.2.2. http URL . . . . . . . . . . . . . . . . . . . . . . 26
3.2.3. URI Comparison . . . . . . . . . . . . . . . . . . . 22 3.2.3. URI Comparison . . . . . . . . . . . . . . . . . . . 26
3.3. Date/Time Formats . . . . . . . . . . . . . . . . . . . 22 3.3. Date/Time Formats . . . . . . . . . . . . . . . . . . . 27
3.3.1. Full Date . . . . . . . . . . . . . . . . . . . . . 22 3.3.1. Full Date . . . . . . . . . . . . . . . . . . . . . 27
3.3.2. Delta Seconds . . . . . . . . . . . . . . . . . . . 24 3.3.2. Delta Seconds . . . . . . . . . . . . . . . . . . . 28
3.4. Character Sets . . . . . . . . . . . . . . . . . . . . . 24 3.4. Character Sets . . . . . . . . . . . . . . . . . . . . . 28
3.4.1. Missing Charset . . . . . . . . . . . . . . . . . . 25 3.4.1. Missing Charset . . . . . . . . . . . . . . . . . . 29
3.5. Content Codings . . . . . . . . . . . . . . . . . . . . 25 3.5. Content Codings . . . . . . . . . . . . . . . . . . . . 30
3.6. Transfer Codings . . . . . . . . . . . . . . . . . . . . 26 3.6. Transfer Codings . . . . . . . . . . . . . . . . . . . . 31
3.6.1. Chunked Transfer Coding . . . . . . . . . . . . . . 27 3.6.1. Chunked Transfer Coding . . . . . . . . . . . . . . 32
3.7. Media Types . . . . . . . . . . . . . . . . . . . . . . 29 3.7. Media Types . . . . . . . . . . . . . . . . . . . . . . 33
3.7.1. Canonicalization and Text Defaults . . . . . . . . . 29 3.7.1. Canonicalization and Text Defaults . . . . . . . . . 34
3.7.2. Multipart Types . . . . . . . . . . . . . . . . . . 30 3.7.2. Multipart Types . . . . . . . . . . . . . . . . . . 34
3.8. Product Tokens . . . . . . . . . . . . . . . . . . . . . 31 3.8. Product Tokens . . . . . . . . . . . . . . . . . . . . . 35
3.9. Quality Values . . . . . . . . . . . . . . . . . . . . . 31 3.9. Quality Values . . . . . . . . . . . . . . . . . . . . . 36
3.10. Language Tags . . . . . . . . . . . . . . . . . . . . . 32 3.10. Language Tags . . . . . . . . . . . . . . . . . . . . . 36
3.11. Entity Tags . . . . . . . . . . . . . . . . . . . . . . 32 3.11. Entity Tags . . . . . . . . . . . . . . . . . . . . . . 37
3.12. Range Units . . . . . . . . . . . . . . . . . . . . . . 33 3.12. Range Units . . . . . . . . . . . . . . . . . . . . . . 37
4. HTTP Message . . . . . . . . . . . . . . . . . . . . . . . . 34 4. HTTP Message . . . . . . . . . . . . . . . . . . . . . . . . 39
4.1. Message Types . . . . . . . . . . . . . . . . . . . . . 34 4.1. Message Types . . . . . . . . . . . . . . . . . . . . . 39
4.2. Message Headers . . . . . . . . . . . . . . . . . . . . 34 4.2. Message Headers . . . . . . . . . . . . . . . . . . . . 39
4.3. Message Body . . . . . . . . . . . . . . . . . . . . . . 35 4.3. Message Body . . . . . . . . . . . . . . . . . . . . . . 40
4.4. Message Length . . . . . . . . . . . . . . . . . . . . . 36 4.4. Message Length . . . . . . . . . . . . . . . . . . . . . 41
4.5. General Header Fields . . . . . . . . . . . . . . . . . 37 4.5. General Header Fields . . . . . . . . . . . . . . . . . 42
5. Request . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 5. Request . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
5.1. Request-Line . . . . . . . . . . . . . . . . . . . . . . 39 5.1. Request-Line . . . . . . . . . . . . . . . . . . . . . . 44
5.1.1. Method . . . . . . . . . . . . . . . . . . . . . . . 39 5.1.1. Method . . . . . . . . . . . . . . . . . . . . . . . 44
5.1.2. Request-URI . . . . . . . . . . . . . . . . . . . . 40 5.1.2. Request-URI . . . . . . . . . . . . . . . . . . . . 45
5.2. The Resource Identified by a Request . . . . . . . . . . 41 5.2. The Resource Identified by a Request . . . . . . . . . . 46
5.3. Request Header Fields . . . . . . . . . . . . . . . . . 42 5.3. Request Header Fields . . . . . . . . . . . . . . . . . 47
6. Response . . . . . . . . . . . . . . . . . . . . . . . . . . 43 6. Response . . . . . . . . . . . . . . . . . . . . . . . . . . 48
6.1. Status-Line . . . . . . . . . . . . . . . . . . . . . . 43 6.1. Status-Line . . . . . . . . . . . . . . . . . . . . . . 48
6.1.1. Status Code and Reason Phrase . . . . . . . . . . . 43 6.1.1. Status Code and Reason Phrase . . . . . . . . . . . 48
6.2. Response Header Fields . . . . . . . . . . . . . . . . . 46 6.2. Response Header Fields . . . . . . . . . . . . . . . . . 51
7. Entity . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 7. Entity . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
7.1. Entity Header Fields . . . . . . . . . . . . . . . . . . 47 7.1. Entity Header Fields . . . . . . . . . . . . . . . . . . 52
7.2. Entity Body . . . . . . . . . . . . . . . . . . . . . . 47 7.2. Entity Body . . . . . . . . . . . . . . . . . . . . . . 52
7.2.1. Type . . . . . . . . . . . . . . . . . . . . . . . . 48 7.2.1. Type . . . . . . . . . . . . . . . . . . . . . . . . 53
7.2.2. Entity Length . . . . . . . . . . . . . . . . . . . 48 7.2.2. Entity Length . . . . . . . . . . . . . . . . . . . 53
8. Connections . . . . . . . . . . . . . . . . . . . . . . . . . 49 8. Connections . . . . . . . . . . . . . . . . . . . . . . . . . 54
8.1. Persistent Connections . . . . . . . . . . . . . . . . . 49 8.1. Persistent Connections . . . . . . . . . . . . . . . . . 54
8.1.1. Purpose . . . . . . . . . . . . . . . . . . . . . . 49 8.1.1. Purpose . . . . . . . . . . . . . . . . . . . . . . 54
8.1.2. Overall Operation . . . . . . . . . . . . . . . . . 49 8.1.2. Overall Operation . . . . . . . . . . . . . . . . . 54
8.1.3. Proxy Servers . . . . . . . . . . . . . . . . . . . 51 8.1.3. Proxy Servers . . . . . . . . . . . . . . . . . . . 56
8.1.4. Practical Considerations . . . . . . . . . . . . . . 51 8.1.4. Practical Considerations . . . . . . . . . . . . . . 56
8.2. Message Transmission Requirements . . . . . . . . . . . 52 8.2. Message Transmission Requirements . . . . . . . . . . . 57
8.2.1. Persistent Connections and Flow Control . . . . . . 52 8.2.1. Persistent Connections and Flow Control . . . . . . 57
8.2.2. Monitoring Connections for Error Status Messages . . 52 8.2.2. Monitoring Connections for Error Status Messages . . 57
8.2.3. Use of the 100 (Continue) Status . . . . . . . . . . 53 8.2.3. Use of the 100 (Continue) Status . . . . . . . . . . 58
8.2.4. Client Behavior if Server Prematurely Closes 8.2.4. Client Behavior if Server Prematurely Closes
Connection . . . . . . . . . . . . . . . . . . . . . 55 Connection . . . . . . . . . . . . . . . . . . . . . 60
9. Method Definitions . . . . . . . . . . . . . . . . . . . . . 56 9. Method Definitions . . . . . . . . . . . . . . . . . . . . . 61
9.1. Safe and Idempotent Methods . . . . . . . . . . . . . . 56 9.1. Safe and Idempotent Methods . . . . . . . . . . . . . . 61
9.1.1. Safe Methods . . . . . . . . . . . . . . . . . . . . 56 9.1.1. Safe Methods . . . . . . . . . . . . . . . . . . . . 61
9.1.2. Idempotent Methods . . . . . . . . . . . . . . . . . 56 9.1.2. Idempotent Methods . . . . . . . . . . . . . . . . . 61
9.2. OPTIONS . . . . . . . . . . . . . . . . . . . . . . . . 57 9.2. OPTIONS . . . . . . . . . . . . . . . . . . . . . . . . 62
9.3. GET . . . . . . . . . . . . . . . . . . . . . . . . . . 58 9.3. GET . . . . . . . . . . . . . . . . . . . . . . . . . . 63
9.4. HEAD . . . . . . . . . . . . . . . . . . . . . . . . . . 58 9.4. HEAD . . . . . . . . . . . . . . . . . . . . . . . . . . 63
9.5. POST . . . . . . . . . . . . . . . . . . . . . . . . . . 59 9.5. POST . . . . . . . . . . . . . . . . . . . . . . . . . . 64
9.6. PUT . . . . . . . . . . . . . . . . . . . . . . . . . . 60 9.6. PUT . . . . . . . . . . . . . . . . . . . . . . . . . . 65
9.7. DELETE . . . . . . . . . . . . . . . . . . . . . . . . . 61 9.7. DELETE . . . . . . . . . . . . . . . . . . . . . . . . . 66
9.8. TRACE . . . . . . . . . . . . . . . . . . . . . . . . . 61 9.8. TRACE . . . . . . . . . . . . . . . . . . . . . . . . . 66
9.9. CONNECT . . . . . . . . . . . . . . . . . . . . . . . . 62 9.9. CONNECT . . . . . . . . . . . . . . . . . . . . . . . . 67
10. Status Code Definitions . . . . . . . . . . . . . . . . . . . 63 10. Status Code Definitions . . . . . . . . . . . . . . . . . . . 68
10.1. Informational 1xx . . . . . . . . . . . . . . . . . . . 63 10.1. Informational 1xx . . . . . . . . . . . . . . . . . . . 68
10.1.1. 100 Continue . . . . . . . . . . . . . . . . . . . . 63 10.1.1. 100 Continue . . . . . . . . . . . . . . . . . . . . 68
10.1.2. 101 Switching Protocols . . . . . . . . . . . . . . 63 10.1.2. 101 Switching Protocols . . . . . . . . . . . . . . 68
10.2. Successful 2xx . . . . . . . . . . . . . . . . . . . . . 64 10.2. Successful 2xx . . . . . . . . . . . . . . . . . . . . . 69
10.2.1. 200 OK . . . . . . . . . . . . . . . . . . . . . . . 64 10.2.1. 200 OK . . . . . . . . . . . . . . . . . . . . . . . 69
10.2.2. 201 Created . . . . . . . . . . . . . . . . . . . . 64 10.2.2. 201 Created . . . . . . . . . . . . . . . . . . . . 69
10.2.3. 202 Accepted . . . . . . . . . . . . . . . . . . . . 64 10.2.3. 202 Accepted . . . . . . . . . . . . . . . . . . . . 69
10.2.4. 203 Non-Authoritative Information . . . . . . . . . 65 10.2.4. 203 Non-Authoritative Information . . . . . . . . . 70
10.2.5. 204 No Content . . . . . . . . . . . . . . . . . . . 65 10.2.5. 204 No Content . . . . . . . . . . . . . . . . . . . 70
10.2.6. 205 Reset Content . . . . . . . . . . . . . . . . . 65 10.2.6. 205 Reset Content . . . . . . . . . . . . . . . . . 70
10.2.7. 206 Partial Content . . . . . . . . . . . . . . . . 66 10.2.7. 206 Partial Content . . . . . . . . . . . . . . . . 71
10.3. Redirection 3xx . . . . . . . . . . . . . . . . . . . . 66 10.3. Redirection 3xx . . . . . . . . . . . . . . . . . . . . 71
10.3.1. 300 Multiple Choices . . . . . . . . . . . . . . . . 67 10.3.1. 300 Multiple Choices . . . . . . . . . . . . . . . . 72
10.3.2. 301 Moved Permanently . . . . . . . . . . . . . . . 67 10.3.2. 301 Moved Permanently . . . . . . . . . . . . . . . 72
10.3.3. 302 Found . . . . . . . . . . . . . . . . . . . . . 68 10.3.3. 302 Found . . . . . . . . . . . . . . . . . . . . . 73
10.3.4. 303 See Other . . . . . . . . . . . . . . . . . . . 68 10.3.4. 303 See Other . . . . . . . . . . . . . . . . . . . 73
10.3.5. 304 Not Modified . . . . . . . . . . . . . . . . . . 69 10.3.5. 304 Not Modified . . . . . . . . . . . . . . . . . . 74
10.3.6. 305 Use Proxy . . . . . . . . . . . . . . . . . . . 69 10.3.6. 305 Use Proxy . . . . . . . . . . . . . . . . . . . 74
10.3.7. 306 (Unused) . . . . . . . . . . . . . . . . . . . . 70 10.3.7. 306 (Unused) . . . . . . . . . . . . . . . . . . . . 75
10.3.8. 307 Temporary Redirect . . . . . . . . . . . . . . . 70 10.3.8. 307 Temporary Redirect . . . . . . . . . . . . . . . 75
10.4. Client Error 4xx . . . . . . . . . . . . . . . . . . . . 70 10.4. Client Error 4xx . . . . . . . . . . . . . . . . . . . . 75
10.4.1. 400 Bad Request . . . . . . . . . . . . . . . . . . 71 10.4.1. 400 Bad Request . . . . . . . . . . . . . . . . . . 76
10.4.2. 401 Unauthorized . . . . . . . . . . . . . . . . . . 71 10.4.2. 401 Unauthorized . . . . . . . . . . . . . . . . . . 76
10.4.3. 402 Payment Required . . . . . . . . . . . . . . . . 71 10.4.3. 402 Payment Required . . . . . . . . . . . . . . . . 76
10.4.4. 403 Forbidden . . . . . . . . . . . . . . . . . . . 71 10.4.4. 403 Forbidden . . . . . . . . . . . . . . . . . . . 76
10.4.5. 404 Not Found . . . . . . . . . . . . . . . . . . . 71 10.4.5. 404 Not Found . . . . . . . . . . . . . . . . . . . 76
10.4.6. 405 Method Not Allowed . . . . . . . . . . . . . . . 72 10.4.6. 405 Method Not Allowed . . . . . . . . . . . . . . . 77
10.4.7. 406 Not Acceptable . . . . . . . . . . . . . . . . . 72 10.4.7. 406 Not Acceptable . . . . . . . . . . . . . . . . . 77
10.4.8. 407 Proxy Authentication Required . . . . . . . . . 72 10.4.8. 407 Proxy Authentication Required . . . . . . . . . 77
10.4.9. 408 Request Timeout . . . . . . . . . . . . . . . . 73 10.4.9. 408 Request Timeout . . . . . . . . . . . . . . . . 78
10.4.10. 409 Conflict . . . . . . . . . . . . . . . . . . . . 73 10.4.10. 409 Conflict . . . . . . . . . . . . . . . . . . . . 78
10.4.11. 410 Gone . . . . . . . . . . . . . . . . . . . . . . 73 10.4.11. 410 Gone . . . . . . . . . . . . . . . . . . . . . . 78
10.4.12. 411 Length Required . . . . . . . . . . . . . . . . 74 10.4.12. 411 Length Required . . . . . . . . . . . . . . . . 79
10.4.13. 412 Precondition Failed . . . . . . . . . . . . . . 74 10.4.13. 412 Precondition Failed . . . . . . . . . . . . . . 79
10.4.14. 413 Request Entity Too Large . . . . . . . . . . . . 74 10.4.14. 413 Request Entity Too Large . . . . . . . . . . . . 79
10.4.15. 414 Request-URI Too Long . . . . . . . . . . . . . . 74 10.4.15. 414 Request-URI Too Long . . . . . . . . . . . . . . 79
10.4.16. 415 Unsupported Media Type . . . . . . . . . . . . . 74 10.4.16. 415 Unsupported Media Type . . . . . . . . . . . . . 79
10.4.17. 416 Requested Range Not Satisfiable . . . . . . . . 74 10.4.17. 416 Requested Range Not Satisfiable . . . . . . . . 79
10.4.18. 417 Expectation Failed . . . . . . . . . . . . . . . 75 10.4.18. 417 Expectation Failed . . . . . . . . . . . . . . . 80
10.5. Server Error 5xx . . . . . . . . . . . . . . . . . . . . 75 10.5. Server Error 5xx . . . . . . . . . . . . . . . . . . . . 80
10.5.1. 500 Internal Server Error . . . . . . . . . . . . . 75 10.5.1. 500 Internal Server Error . . . . . . . . . . . . . 80
10.5.2. 501 Not Implemented . . . . . . . . . . . . . . . . 75 10.5.2. 501 Not Implemented . . . . . . . . . . . . . . . . 80
10.5.3. 502 Bad Gateway . . . . . . . . . . . . . . . . . . 75 10.5.3. 502 Bad Gateway . . . . . . . . . . . . . . . . . . 80
10.5.4. 503 Service Unavailable . . . . . . . . . . . . . . 76 10.5.4. 503 Service Unavailable . . . . . . . . . . . . . . 81
10.5.5. 504 Gateway Timeout . . . . . . . . . . . . . . . . 76 10.5.5. 504 Gateway Timeout . . . . . . . . . . . . . . . . 81
10.5.6. 505 HTTP Version Not Supported . . . . . . . . . . . 76 10.5.6. 505 HTTP Version Not Supported . . . . . . . . . . . 81
11. Access Authentication . . . . . . . . . . . . . . . . . . . . 77 11. Access Authentication . . . . . . . . . . . . . . . . . . . . 82
12. Content Negotiation . . . . . . . . . . . . . . . . . . . . . 78 12. Content Negotiation . . . . . . . . . . . . . . . . . . . . . 83
12.1. Server-driven Negotiation . . . . . . . . . . . . . . . 78 12.1. Server-driven Negotiation . . . . . . . . . . . . . . . 83
12.2. Agent-driven Negotiation . . . . . . . . . . . . . . . . 79 12.2. Agent-driven Negotiation . . . . . . . . . . . . . . . . 84
12.3. Transparent Negotiation . . . . . . . . . . . . . . . . 80 12.3. Transparent Negotiation . . . . . . . . . . . . . . . . 85
13. Caching in HTTP . . . . . . . . . . . . . . . . . . . . . . . 81 13. Caching in HTTP . . . . . . . . . . . . . . . . . . . . . . . 86
13.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 13.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
13.1.1. Cache Correctness . . . . . . . . . . . . . . . . . 82 13.1.1. Cache Correctness . . . . . . . . . . . . . . . . . 87
13.1.2. Warnings . . . . . . . . . . . . . . . . . . . . . . 83 13.1.2. Warnings . . . . . . . . . . . . . . . . . . . . . . 88
13.1.3. Cache-control Mechanisms . . . . . . . . . . . . . . 84 13.1.3. Cache-control Mechanisms . . . . . . . . . . . . . . 89
13.1.4. Explicit User Agent Warnings . . . . . . . . . . . . 84 13.1.4. Explicit User Agent Warnings . . . . . . . . . . . . 89
13.1.5. Exceptions to the Rules and Warnings . . . . . . . . 85 13.1.5. Exceptions to the Rules and Warnings . . . . . . . . 90
13.1.6. Client-controlled Behavior . . . . . . . . . . . . . 85 13.1.6. Client-controlled Behavior . . . . . . . . . . . . . 90
13.2. Expiration Model . . . . . . . . . . . . . . . . . . . . 86 13.2. Expiration Model . . . . . . . . . . . . . . . . . . . . 91
13.2.1. Server-Specified Expiration . . . . . . . . . . . . 86 13.2.1. Server-Specified Expiration . . . . . . . . . . . . 91
13.2.2. Heuristic Expiration . . . . . . . . . . . . . . . . 86 13.2.2. Heuristic Expiration . . . . . . . . . . . . . . . . 91
13.2.3. Age Calculations . . . . . . . . . . . . . . . . . . 87 13.2.3. Age Calculations . . . . . . . . . . . . . . . . . . 92
13.2.4. Expiration Calculations . . . . . . . . . . . . . . 89 13.2.4. Expiration Calculations . . . . . . . . . . . . . . 94
13.2.5. Disambiguating Expiration Values . . . . . . . . . . 90 13.2.5. Disambiguating Expiration Values . . . . . . . . . . 95
13.2.6. Disambiguating Multiple Responses . . . . . . . . . 91 13.2.6. Disambiguating Multiple Responses . . . . . . . . . 96
13.3. Validation Model . . . . . . . . . . . . . . . . . . . . 91 13.3. Validation Model . . . . . . . . . . . . . . . . . . . . 96
13.3.1. Last-Modified Dates . . . . . . . . . . . . . . . . 92 13.3.1. Last-Modified Dates . . . . . . . . . . . . . . . . 97
13.3.2. Entity Tag Cache Validators . . . . . . . . . . . . 92 13.3.2. Entity Tag Cache Validators . . . . . . . . . . . . 97
13.3.3. Weak and Strong Validators . . . . . . . . . . . . . 93 13.3.3. Weak and Strong Validators . . . . . . . . . . . . . 98
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 . . . . . . . . . . . . . . . . 100
13.3.5. Non-validating Conditionals . . . . . . . . . . . . 97 13.3.5. Non-validating Conditionals . . . . . . . . . . . . 102
13.4. Response Cacheability . . . . . . . . . . . . . . . . . 97 13.4. Response Cacheability . . . . . . . . . . . . . . . . . 102
13.5. Constructing Responses From Caches . . . . . . . . . . . 98 13.5. Constructing Responses From Caches . . . . . . . . . . . 103
13.5.1. End-to-end and Hop-by-hop Headers . . . . . . . . . 98 13.5.1. End-to-end and Hop-by-hop Headers . . . . . . . . . 103
13.5.2. Non-modifiable Headers . . . . . . . . . . . . . . . 99 13.5.2. Non-modifiable Headers . . . . . . . . . . . . . . . 104
13.5.3. Combining Headers . . . . . . . . . . . . . . . . . 100 13.5.3. Combining Headers . . . . . . . . . . . . . . . . . 105
13.5.4. Combining Byte Ranges . . . . . . . . . . . . . . . 101 13.5.4. Combining Byte Ranges . . . . . . . . . . . . . . . 106
13.6. Caching Negotiated Responses . . . . . . . . . . . . . . 102 13.6. Caching Negotiated Responses . . . . . . . . . . . . . . 107
13.7. Shared and Non-Shared Caches . . . . . . . . . . . . . . 103 13.7. Shared and Non-Shared Caches . . . . . . . . . . . . . . 108
13.8. Errors or Incomplete Response Cache Behavior . . . . . . 103 13.8. Errors or Incomplete Response Cache Behavior . . . . . . 108
13.9. Side Effects of GET and HEAD . . . . . . . . . . . . . . 104 13.9. Side Effects of GET and HEAD . . . . . . . . . . . . . . 109
13.10. Invalidation After Updates or Deletions . . . . . . . . 104 13.10. Invalidation After Updates or Deletions . . . . . . . . 109
13.11. Write-Through Mandatory . . . . . . . . . . . . . . . . 105 13.11. Write-Through Mandatory . . . . . . . . . . . . . . . . 110
13.12. Cache Replacement . . . . . . . . . . . . . . . . . . . 105 13.12. Cache Replacement . . . . . . . . . . . . . . . . . . . 110
13.13. History Lists . . . . . . . . . . . . . . . . . . . . . 106 13.13. History Lists . . . . . . . . . . . . . . . . . . . . . 111
14. Header Field Definitions . . . . . . . . . . . . . . . . . . 107 14. Header Field Definitions . . . . . . . . . . . . . . . . . . 112
14.1. Accept . . . . . . . . . . . . . . . . . . . . . . . . . 107 14.1. Accept . . . . . . . . . . . . . . . . . . . . . . . . . 112
14.2. Accept-Charset . . . . . . . . . . . . . . . . . . . . . 109 14.2. Accept-Charset . . . . . . . . . . . . . . . . . . . . . 114
14.3. Accept-Encoding . . . . . . . . . . . . . . . . . . . . 109 14.3. Accept-Encoding . . . . . . . . . . . . . . . . . . . . 114
14.4. Accept-Language . . . . . . . . . . . . . . . . . . . . 111 14.4. Accept-Language . . . . . . . . . . . . . . . . . . . . 116
14.5. Accept-Ranges . . . . . . . . . . . . . . . . . . . . . 112 14.5. Accept-Ranges . . . . . . . . . . . . . . . . . . . . . 117
14.6. Age . . . . . . . . . . . . . . . . . . . . . . . . . . 112 14.6. Age . . . . . . . . . . . . . . . . . . . . . . . . . . 117
14.7. Allow . . . . . . . . . . . . . . . . . . . . . . . . . 113 14.7. Allow . . . . . . . . . . . . . . . . . . . . . . . . . 118
14.8. Authorization . . . . . . . . . . . . . . . . . . . . . 113 14.8. Authorization . . . . . . . . . . . . . . . . . . . . . 118
14.9. Cache-Control . . . . . . . . . . . . . . . . . . . . . 114 14.9. Cache-Control . . . . . . . . . . . . . . . . . . . . . 119
14.9.1. What is Cacheable . . . . . . . . . . . . . . . . . 116 14.9.1. What is Cacheable . . . . . . . . . . . . . . . . . 121
14.9.2. What May be Stored by Caches . . . . . . . . . . . . 117 14.9.2. What May be Stored by Caches . . . . . . . . . . . . 122
14.9.3. Modifications of the Basic Expiration Mechanism . . 118 14.9.3. Modifications of the Basic Expiration Mechanism . . 123
14.9.4. Cache Revalidation and Reload Controls . . . . . . . 120 14.9.4. Cache Revalidation and Reload Controls . . . . . . . 125
14.9.5. No-Transform Directive . . . . . . . . . . . . . . . 122 14.9.5. No-Transform Directive . . . . . . . . . . . . . . . 127
14.9.6. Cache Control Extensions . . . . . . . . . . . . . . 123 14.9.6. Cache Control Extensions . . . . . . . . . . . . . . 128
14.10. Connection . . . . . . . . . . . . . . . . . . . . . . . 124 14.10. Connection . . . . . . . . . . . . . . . . . . . . . . . 129
14.11. Content-Encoding . . . . . . . . . . . . . . . . . . . . 125 14.11. Content-Encoding . . . . . . . . . . . . . . . . . . . . 130
14.12. Content-Language . . . . . . . . . . . . . . . . . . . . 125 14.12. Content-Language . . . . . . . . . . . . . . . . . . . . 130
14.13. Content-Length . . . . . . . . . . . . . . . . . . . . . 126 14.13. Content-Length . . . . . . . . . . . . . . . . . . . . . 131
14.14. Content-Location . . . . . . . . . . . . . . . . . . . . 127 14.14. Content-Location . . . . . . . . . . . . . . . . . . . . 132
14.15. Content-MD5 . . . . . . . . . . . . . . . . . . . . . . 128 14.15. Content-MD5 . . . . . . . . . . . . . . . . . . . . . . 133
14.16. Content-Range . . . . . . . . . . . . . . . . . . . . . 129 14.16. Content-Range . . . . . . . . . . . . . . . . . . . . . 134
14.17. Content-Type . . . . . . . . . . . . . . . . . . . . . . 131 14.17. Content-Type . . . . . . . . . . . . . . . . . . . . . . 136
14.18. Date . . . . . . . . . . . . . . . . . . . . . . . . . . 131 14.18. Date . . . . . . . . . . . . . . . . . . . . . . . . . . 136
14.18.1. Clockless Origin Server Operation . . . . . . . . . 132 14.18.1. Clockless Origin Server Operation . . . . . . . . . 137
14.19. ETag . . . . . . . . . . . . . . . . . . . . . . . . . . 133 14.19. ETag . . . . . . . . . . . . . . . . . . . . . . . . . . 138
14.20. Expect . . . . . . . . . . . . . . . . . . . . . . . . . 133 14.20. Expect . . . . . . . . . . . . . . . . . . . . . . . . . 138
14.21. Expires . . . . . . . . . . . . . . . . . . . . . . . . 134 14.21. Expires . . . . . . . . . . . . . . . . . . . . . . . . 139
14.22. From . . . . . . . . . . . . . . . . . . . . . . . . . . 135 14.22. From . . . . . . . . . . . . . . . . . . . . . . . . . . 140
14.23. Host . . . . . . . . . . . . . . . . . . . . . . . . . . 135 14.23. Host . . . . . . . . . . . . . . . . . . . . . . . . . . 140
14.24. If-Match . . . . . . . . . . . . . . . . . . . . . . . . 136 14.24. If-Match . . . . . . . . . . . . . . . . . . . . . . . . 141
14.25. If-Modified-Since . . . . . . . . . . . . . . . . . . . 137 14.25. If-Modified-Since . . . . . . . . . . . . . . . . . . . 142
14.26. If-None-Match . . . . . . . . . . . . . . . . . . . . . 139 14.26. If-None-Match . . . . . . . . . . . . . . . . . . . . . 144
14.27. If-Range . . . . . . . . . . . . . . . . . . . . . . . . 140 14.27. If-Range . . . . . . . . . . . . . . . . . . . . . . . . 145
14.28. If-Unmodified-Since . . . . . . . . . . . . . . . . . . 141 14.28. If-Unmodified-Since . . . . . . . . . . . . . . . . . . 146
14.29. Last-Modified . . . . . . . . . . . . . . . . . . . . . 141 14.29. Last-Modified . . . . . . . . . . . . . . . . . . . . . 146
14.30. Location . . . . . . . . . . . . . . . . . . . . . . . . 142 14.30. Location . . . . . . . . . . . . . . . . . . . . . . . . 147
14.31. Max-Forwards . . . . . . . . . . . . . . . . . . . . . . 142 14.31. Max-Forwards . . . . . . . . . . . . . . . . . . . . . . 148
14.32. Pragma . . . . . . . . . . . . . . . . . . . . . . . . . 143 14.32. Pragma . . . . . . . . . . . . . . . . . . . . . . . . . 148
14.33. Proxy-Authenticate . . . . . . . . . . . . . . . . . . . 144 14.33. Proxy-Authenticate . . . . . . . . . . . . . . . . . . . 149
14.34. Proxy-Authorization . . . . . . . . . . . . . . . . . . 144 14.34. Proxy-Authorization . . . . . . . . . . . . . . . . . . 149
14.35. Range . . . . . . . . . . . . . . . . . . . . . . . . . 144 14.35. Range . . . . . . . . . . . . . . . . . . . . . . . . . 150
14.35.1. Byte Ranges . . . . . . . . . . . . . . . . . . . . 144 14.35.1. Byte Ranges . . . . . . . . . . . . . . . . . . . . 150
14.35.2. Range Retrieval Requests . . . . . . . . . . . . . . 146 14.35.2. Range Retrieval Requests . . . . . . . . . . . . . . 151
14.36. Referer . . . . . . . . . . . . . . . . . . . . . . . . 147 14.36. Referer . . . . . . . . . . . . . . . . . . . . . . . . 152
14.37. Retry-After . . . . . . . . . . . . . . . . . . . . . . 147 14.37. Retry-After . . . . . . . . . . . . . . . . . . . . . . 153
14.38. Server . . . . . . . . . . . . . . . . . . . . . . . . . 148 14.38. Server . . . . . . . . . . . . . . . . . . . . . . . . . 153
14.39. TE . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 14.39. TE . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
14.40. Trailer . . . . . . . . . . . . . . . . . . . . . . . . 149 14.40. Trailer . . . . . . . . . . . . . . . . . . . . . . . . 155
14.41. Transfer-Encoding . . . . . . . . . . . . . . . . . . . 150 14.41. Transfer-Encoding . . . . . . . . . . . . . . . . . . . 155
14.42. Upgrade . . . . . . . . . . . . . . . . . . . . . . . . 150 14.42. Upgrade . . . . . . . . . . . . . . . . . . . . . . . . 156
14.43. User-Agent . . . . . . . . . . . . . . . . . . . . . . . 152 14.43. User-Agent . . . . . . . . . . . . . . . . . . . . . . . 157
14.44. Vary . . . . . . . . . . . . . . . . . . . . . . . . . . 152 14.44. Vary . . . . . . . . . . . . . . . . . . . . . . . . . . 157
14.45. Via . . . . . . . . . . . . . . . . . . . . . . . . . . 153 14.45. Via . . . . . . . . . . . . . . . . . . . . . . . . . . 158
14.46. Warning . . . . . . . . . . . . . . . . . . . . . . . . 154 14.46. Warning . . . . . . . . . . . . . . . . . . . . . . . . 160
14.47. WWW-Authenticate . . . . . . . . . . . . . . . . . . . . 157 14.47. WWW-Authenticate . . . . . . . . . . . . . . . . . . . . 162
15. Security Considerations . . . . . . . . . . . . . . . . . . . 158 15. Security Considerations . . . . . . . . . . . . . . . . . . . 163
15.1. Personal Information . . . . . . . . . . . . . . . . . . 158 15.1. Personal Information . . . . . . . . . . . . . . . . . . 163
15.1.1. Abuse of Server Log Information . . . . . . . . . . 158 15.1.1. Abuse of Server Log Information . . . . . . . . . . 163
15.1.2. Transfer of Sensitive Information . . . . . . . . . 158 15.1.2. Transfer of Sensitive Information . . . . . . . . . 163
15.1.3. Encoding Sensitive Information in URI's . . . . . . 159 15.1.3. Encoding Sensitive Information in URI's . . . . . . 164
15.1.4. Privacy Issues Connected to Accept Headers . . . . . 160 15.1.4. Privacy Issues Connected to Accept Headers . . . . . 165
15.2. Attacks Based On File and Path Names . . . . . . . . . . 160 15.2. Attacks Based On File and Path Names . . . . . . . . . . 165
15.3. DNS Spoofing . . . . . . . . . . . . . . . . . . . . . . 161 15.3. DNS Spoofing . . . . . . . . . . . . . . . . . . . . . . 166
15.4. Location Headers and Spoofing . . . . . . . . . . . . . 161 15.4. Location Headers and Spoofing . . . . . . . . . . . . . 166
15.5. Content-Disposition Issues . . . . . . . . . . . . . . . 162 15.5. Content-Disposition Issues . . . . . . . . . . . . . . . 167
15.6. Authentication Credentials and Idle Clients . . . . . . 162 15.6. Authentication Credentials and Idle Clients . . . . . . 167
15.7. Proxies and Caching . . . . . . . . . . . . . . . . . . 162 15.7. Proxies and Caching . . . . . . . . . . . . . . . . . . 167
15.7.1. Denial of Service Attacks on Proxies . . . . . . . . 163 15.7.1. Denial of Service Attacks on Proxies . . . . . . . . 168
16. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 164 16. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 169
17. References . . . . . . . . . . . . . . . . . . . . . . . . . 166 16.1. (RFC2616) . . . . . . . . . . . . . . . . . . . . . . . 169
Appendix A. Appendices . . . . . . . . . . . . . . . . . . . . . 170 16.2. (This Document) . . . . . . . . . . . . . . . . . . . . 170
A.1. Internet Media Type message/http and application/http . 170 17. References . . . . . . . . . . . . . . . . . . . . . . . . . 171
A.2. Internet Media Type multipart/byteranges . . . . . . . . 171 17.1. References (to be classified) . . . . . . . . . . . . . 171
A.3. Tolerant Applications . . . . . . . . . . . . . . . . . 172 17.2. Informative References . . . . . . . . . . . . . . . . . 174
A.4. Differences Between HTTP Entities and RFC 2045 Appendix A. Internet Media Type message/http and
Entities . . . . . . . . . . . . . . . . . . . . . . . . 173 application/http . . . . . . . . . . . . . . . . . . 177
A.4.1. MIME-Version . . . . . . . . . . . . . . . . . . . . 174 Appendix B. Internet Media Type multipart/byteranges . . . . . . 179
A.4.2. Conversion to Canonical Form . . . . . . . . . . . . 174 Appendix C. Tolerant Applications . . . . . . . . . . . . . . . 181
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 . . . . . . . . . . . . . . . . . . . . . . 182
A.4.5. No Content-Transfer-Encoding . . . . . . . . . . . . 175 D.1. MIME-Version . . . . . . . . . . . . . . . . . . . . . . 182
A.4.6. Introduction of Transfer-Encoding . . . . . . . . . 175 D.2. Conversion to Canonical Form . . . . . . . . . . . . . . 182
A.4.7. MHTML and Line Length Limitations . . . . . . . . . 176 D.3. Conversion of Date Formats . . . . . . . . . . . . . . . 183
A.5. Additional Features . . . . . . . . . . . . . . . . . . 176 D.4. Introduction of Content-Encoding . . . . . . . . . . . . 183
A.5.1. Content-Disposition . . . . . . . . . . . . . . . . 176 D.5. No Content-Transfer-Encoding . . . . . . . . . . . . . . 183
A.6. Compatibility with Previous Versions . . . . . . . . . . 177 D.6. Introduction of Transfer-Encoding . . . . . . . . . . . 184
A.6.1. Changes from HTTP/1.0 . . . . . . . . . . . . . . . 178 D.7. MHTML and Line Length Limitations . . . . . . . . . . . 184
A.6.2. Compatibility with HTTP/1.0 Persistent Connections . 179 Appendix E. Additional Features . . . . . . . . . . . . . . . . 185
A.6.3. Changes from RFC 2068 . . . . . . . . . . . . . . . 179 E.1. Content-Disposition . . . . . . . . . . . . . . . . . . 185
Appendix B. Index . . . . . . . . . . . . . . . . . . . . . . . 183 Appendix F. Compatibility with Previous Versions . . . . . . . . 186
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 F.1. Changes from HTTP/1.0 . . . . . . . . . . . . . . . . . 186
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 196 F.1.1. Changes to Simplify Multi-homed Web Servers and
Intellectual Property and Copyright Statements . . . . . . . . . 198 Conserve IP Addresses . . . . . . . . . . . . . . . 186
F.2. Compatibility with HTTP/1.0 Persistent Connections . . . 187
F.3. Changes from RFC 2068 . . . . . . . . . . . . . . . . . 188
F.4. Changes from RFC 2616 . . . . . . . . . . . . . . . . . 190
Appendix G. Change Log (to be removed by RFC Editor before
publication) . . . . . . . . . . . . . . . . . . . . 192
G.1. Since RFC2616 . . . . . . . . . . . . . . . . . . . . . 192
G.2. Since draft-lafon-rfc2616bis-00 . . . . . . . . . . . . 192
G.3. Since draft-lafon-rfc2616bis-01 . . . . . . . . . . . . 192
G.4. Since draft-lafon-rfc2616bis-02 . . . . . . . . . . . . 192
Appendix H. Resolved issues (to be removed by RFC Editor
before publication) . . . . . . . . . . . . . . . . 194
H.1. i45-rfc977-reference . . . . . . . . . . . . . . . . . . 194
H.2. i46-rfc1700_remove . . . . . . . . . . . . . . . . . . . 194
H.3. i47-inconsistency-in-date-format-explanation . . . . . . 194
H.4. i49-connection-header-text . . . . . . . . . . . . . . . 195
H.5. i48-date-reference-typo . . . . . . . . . . . . . . . . 195
Appendix I. Open issues (to be removed by RFC Editor prior to
publication) . . . . . . . . . . . . . . . . . . . . 197
I.1. rfc2616bis . . . . . . . . . . . . . . . . . . . . . . . 197
I.2. unneeded_references . . . . . . . . . . . . . . . . . . 197
I.3. edit . . . . . . . . . . . . . . . . . . . . . . . . . . 197
I.4. i66-iso8859-1-reference . . . . . . . . . . . . . . . . 197
I.5. abnf . . . . . . . . . . . . . . . . . . . . . . . . . . 197
I.6. rfc2048_informative_and_obsolete . . . . . . . . . . . . 198
I.7. i34-updated-reference-for-uris . . . . . . . . . . . . . 198
I.8. i50-misc-typos . . . . . . . . . . . . . . . . . . . . . 198
I.9. i65-informative-references . . . . . . . . . . . . . . . 198
I.10. i52-sort-1.3-terminology . . . . . . . . . . . . . . . . 199
I.11. i63-header-length-limit-with-encoded-words . . . . . . . 200
I.12. i31-qdtext-bnf . . . . . . . . . . . . . . . . . . . . . 200
I.13. i62-whitespace-in-quoted-pair . . . . . . . . . . . . . 200
I.14. i58-what-identifies-an-http-resource . . . . . . . . . . 201
I.15. i51-http-date-vs-rfc1123-date . . . . . . . . . . . . . 201
I.16. i67-quoting-charsets . . . . . . . . . . . . . . . . . . 201
I.17. media-reg . . . . . . . . . . . . . . . . . . . . . . . 201
I.18. languagetag . . . . . . . . . . . . . . . . . . . . . . 202
I.19. i56-6.1.1-can-be-misread-as-a-complete-list . . . . . . 202
I.20. i57-status-code-and-reason-phrase . . . . . . . . . . . 202
I.21. i59-status-code-registry . . . . . . . . . . . . . . . . 203
I.22. i21-put-side-effects . . . . . . . . . . . . . . . . . . 203
I.23. i54-definition-of-1xx-warn-codes . . . . . . . . . . . . 203
I.24. i60-13.5.1-and-13.5.2 . . . . . . . . . . . . . . . . . 203
I.25. i53-allow-is-not-in-13.5.2 . . . . . . . . . . . . . . . 203
I.26. i25-accept-encoding-bnf . . . . . . . . . . . . . . . . 204
I.27. i61-redirection-vs-location . . . . . . . . . . . . . . 204
I.28. fragment-combination . . . . . . . . . . . . . . . . . . 205
I.29. i55-updating-to-rfc4288 . . . . . . . . . . . . . . . . 205
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 218
Intellectual Property and Copyright Statements . . . . . . . . . 221
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
across the Internet. HTTP/1.0, as defined by RFC 1945 [6], improved across the Internet. HTTP/1.0, as defined by [RFC1945], improved the
the protocol by allowing messages to be in the format of MIME-like protocol by allowing messages to be in the format of MIME-like
messages, containing metainformation about the data transferred and messages, containing metainformation about the data transferred and
modifiers on the request/response semantics. However, HTTP/1.0 does modifiers on the request/response semantics. However, HTTP/1.0 does
not sufficiently take into consideration the effects of hierarchical not sufficiently take into consideration the effects of hierarchical
proxies, caching, the need for persistent connections, or virtual proxies, caching, the need for persistent connections, or virtual
hosts. In addition, the proliferation of incompletely-implemented hosts. In addition, the proliferation of incompletely-implemented
applications calling themselves "HTTP/1.0" has necessitated a applications calling themselves "HTTP/1.0" has necessitated a
protocol version change in order for two communicating applications protocol version change in order for two communicating applications
to determine each other's true capabilities. to determine each other's true capabilities.
This specification defines the protocol referred to as "HTTP/1.1". This specification defines the protocol referred to as "HTTP/1.1".
This protocol includes more stringent requirements than HTTP/1.0 in This protocol includes more stringent requirements than HTTP/1.0 in
order to ensure reliable implementation of its features. order to ensure reliable implementation of its features.
Practical information systems require more functionality than simple Practical information systems require more functionality than simple
retrieval, including search, front-end update, and annotation. HTTP retrieval, including search, front-end update, and annotation. HTTP
allows an open-ended set of methods and headers that indicate the allows an open-ended set of methods and headers that indicate the
purpose of a request [47]. It builds on the discipline of reference purpose of a request [RFC2324]. It builds on the discipline of
provided by the Uniform Resource Identifier (URI) [3], as a location reference provided by the Uniform Resource Identifier (URI)
(URL) [4] or name (URN) [20], for indicating the resource to which a [RFC1630], as a location (URL) [RFC1738] or name (URN) [RFC1737], for
method is to be applied. Messages are passed in a format similar to indicating the resource to which a method is to be applied. Messages
that used by Internet mail [9] as defined by the Multipurpose are passed in a format similar to that used by Internet mail [RFC822]
Internet Mail Extensions (MIME) [7]. as defined by the Multipurpose Internet Mail Extensions (MIME)
[RFC2045].
HTTP is also used as a generic protocol for communication between HTTP is also used as a generic protocol for communication between
user agents and proxies/gateways to other Internet systems, including user agents and proxies/gateways to other Internet systems, including
those supported by the SMTP [16], NNTP [13], FTP [18], Gopher [2], those supported by the SMTP [RFC821], NNTP [RFC3977], FTP [RFC959],
and WAIS [10] protocols. In this way, HTTP allows basic hypermedia Gopher [RFC1436], and WAIS [WAIS] protocols. In this way, HTTP
access to resources available from diverse applications. allows basic hypermedia access to resources available from diverse
applications.
1.2. Requirements 1.2. Requirements
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [34]. document are to be interpreted as described in [RFC2119].
An implementation is not compliant if it fails to satisfy one or more An implementation is not compliant if it fails to satisfy one or more
of the MUST or REQUIRED level requirements for the protocols it of the MUST or REQUIRED level requirements for the protocols it
implements. An implementation that satisfies all the MUST or implements. An implementation that satisfies all the MUST or
REQUIRED level and all the SHOULD level requirements for its REQUIRED level and all the SHOULD level requirements for its
protocols is said to be "unconditionally compliant"; one that protocols is said to be "unconditionally compliant"; one that
satisfies all the MUST level requirements but not all the SHOULD satisfies all the MUST level requirements but not all the SHOULD
level requirements for its protocols is said to be "conditionally level requirements for its protocols is said to be "conditionally
compliant." compliant."
skipping to change at page 10, line 19 skipping to change at page 14, line 19
The mechanism for selecting the appropriate representation when The mechanism for selecting the appropriate representation when
servicing a request, as described in Section 12. The servicing a request, as described in Section 12. The
representation of entities in any response can be negotiated representation of entities in any response can be negotiated
(including error responses). (including error responses).
variant variant
A resource may have one, or more than one, representation(s) A resource may have one, or more than one, representation(s)
associated with it at any given instant. Each of these associated with it at any given instant. Each of these
representations is termed a `varriant'. Use of the term `variant' representations is termed a `variant'. Use of the term `variant'
does not necessarily imply that the resource is subject to content does not necessarily imply that the resource is subject to content
negotiation. negotiation.
client client
A program that establishes connections for the purpose of sending A program that establishes connections for the purpose of sending
requests. requests.
user agent user agent
skipping to change at page 13, line 27 skipping to change at page 17, 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
skipping to change at page 15, line 4 skipping to change at page 19, line 4
subsets of cached data via CD-ROM, and so on. HTTP systems are used subsets of cached data via CD-ROM, and so on. HTTP systems are used
in corporate intranets over high-bandwidth links, and for access via in corporate intranets over high-bandwidth links, and for access via
PDAs with low-power radio links and intermittent connectivity. The PDAs with low-power radio links and intermittent connectivity. The
goal of HTTP/1.1 is to support the wide diversity of configurations goal of HTTP/1.1 is to support the wide diversity of configurations
already deployed while introducing protocol constructs that meet the already deployed while introducing protocol constructs that meet the
needs of those who build web applications that require high needs of those who build web applications that require high
reliability and, failing that, at least reliable indications of reliability and, failing that, at least reliable indications of
failure. failure.
HTTP communication usually takes place over TCP/IP connections. The HTTP communication usually takes place over TCP/IP connections. The
default port is TCP 80 [19], but other ports can be used. This does default port is TCP 80
not preclude HTTP from being implemented on top of any other protocol (<http://www.iana.org/assignments/port-numbers>), but other ports can
on the Internet, or on other networks. HTTP only presumes a reliable be used. This does not preclude HTTP from being implemented on top
transport; any protocol that provides such guarantees can be used; of any other protocol on the Internet, or on other networks. HTTP
the mapping of the HTTP/1.1 request and response structures onto the only presumes a reliable transport; any protocol that provides such
transport data units of the protocol in question is outside the scope guarantees can be used; the mapping of the HTTP/1.1 request and
of this specification. response structures onto the transport data units of the protocol in
question is outside the scope of this specification.
In HTTP/1.0, most implementations used a new connection for each In HTTP/1.0, most implementations used a new connection for each
request/response exchange. In HTTP/1.1, a connection may be used for request/response exchange. In HTTP/1.1, a connection may be used for
one or more request/response exchanges, although connections may be one or more request/response exchanges, although connections may be
closed for a variety of reasons (see Section 8.1). closed for a variety of reasons (see Section 8.1).
2. Notational Conventions and Generic Grammar 2. Notational Conventions and Generic Grammar
2.1. Augmented BNF 2.1. Augmented BNF
All of the mechanisms specified in this document are described in All of the mechanisms specified in this document are described in
both prose and an augmented Backus-Naur Form (BNF) similar to that both prose and an augmented Backus-Naur Form (BNF) similar to that
used by RFC 822 [9]. Implementors will need to be familiar with the used by [RFC822]. Implementors will need to be familiar with the
notation in order to understand this specification. The augmented notation in order to understand this specification. The augmented
BNF includes the following constructs: BNF includes the following constructs:
name = definition name = definition
The name of a rule is simply the name itself (without any The name of a rule is simply the name itself (without any
enclosing "<" and ">") and is separated from its definition by the enclosing "<" and ">") and is separated from its definition by the
equal "=" character. White space is only significant in that equal "=" character. White space is only significant in that
indentation of continuation lines is used to indicate a rule indentation of continuation lines is used to indicate a rule
definition that spans more than one line. Certain basic rules are definition that spans more than one line. Certain basic rules are
skipping to change at page 18, line 11 skipping to change at page 22, line 11
between adjacent words and separators, without changing the between adjacent words and separators, without changing the
interpretation of a field. At least one delimiter (LWS and/or interpretation of a field. At least one delimiter (LWS and/or
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 [USASCII].
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 [ISO-8859-1] only when encoded according to the rules of
[14]. [RFC2047].
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.
skipping to change at page 20, line 21 skipping to change at page 24, line 21
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
number for the addition of message components which do not affect number for the addition of message components which do not affect
communication behavior or which only add to extensible field values. communication behavior or which only add to extensible field values.
The <minor> number is incremented when the changes made to the The <minor> number is incremented when the changes made to the
protocol add features which do not change the general message parsing protocol add features which do not change the general message parsing
algorithm, but which may add to the message semantics and imply algorithm, but which may add to the message semantics and imply
additional capabilities of the sender. The <major> number is additional capabilities of the sender. The <major> number is
incremented when the format of a message within the protocol is incremented when the format of a message within the protocol is
changed. See RFC 2145 [36] for a fuller explanation. changed. See [RFC2145] for a fuller explanation.
The version of an HTTP message is indicated by an HTTP-Version field The version of an HTTP message is indicated by an HTTP-Version field
in the first line of the message. in the first line of the message.
HTTP-Version = "HTTP" "/" 1*DIGIT "." 1*DIGIT HTTP-Version = "HTTP" "/" 1*DIGIT "." 1*DIGIT
Note that the major and minor numbers MUST be treated as separate Note that the major and minor numbers MUST be treated as separate
integers and that each MAY be incremented higher than a single digit. integers and that each MAY be incremented higher than a single digit.
Thus, HTTP/2.4 is a lower version than HTTP/2.13, which in turn is Thus, HTTP/2.4 is a lower version than HTTP/2.13, which in turn is
lower than HTTP/12.3. Leading zeros MUST be ignored by recipients lower than HTTP/12.3. Leading zeros MUST be ignored by recipients
and MUST NOT be sent. and MUST NOT be sent.
An application that sends a request or response message that includes An application that sends a request or response message that includes
HTTP-Version of "HTTP/1.1" MUST be at least conditionally compliant HTTP-Version of "HTTP/1.1" MUST be at least conditionally compliant
with this specification. Applications that are at least with this specification. Applications that are at least
conditionally compliant with this specification SHOULD use an HTTP- conditionally compliant with this specification SHOULD use an HTTP-
Version of "HTTP/1.1" in their messages, and MUST do so for any Version of "HTTP/1.1" in their messages, and MUST do so for any
message that is not compatible with HTTP/1.0. For more details on message that is not compatible with HTTP/1.0. For more details on
when to send specific HTTP-Version values, see RFC 2145 [36]. when to send specific HTTP-Version values, see [RFC2145].
The HTTP version of an application is the highest HTTP version for The HTTP version of an application is the highest HTTP version for
which the application is at least conditionally compliant. which the application is at least conditionally compliant. HTTP-
Version is case-sensitive.
Proxy and gateway applications need to be careful when forwarding Proxy and gateway applications need to be careful when forwarding
messages in protocol versions different from that of the application. messages in protocol versions different from that of the application.
Since the protocol version indicates the protocol capability of the Since the protocol version indicates the protocol capability of the
sender, a proxy/gateway MUST NOT send a message with a version sender, a proxy/gateway MUST NOT send a message with a version
indicator which is greater than its actual version. If a higher indicator which is greater than its actual version. If a higher
version request is received, the proxy/gateway MUST either downgrade version request is received, the proxy/gateway MUST either downgrade
the request version, or respond with an error, or switch to tunnel the request version, or respond with an error, or switch to tunnel
behavior. behavior.
Due to interoperability problems with HTTP/1.0 proxies discovered Due to interoperability problems with HTTP/1.0 proxies discovered
since the publication of RFC 2068 [33], caching proxies MUST, since the publication of [RFC2068], caching proxies MUST, gateways
gateways MAY, and tunnels MUST NOT upgrade the request to the highest MAY, and tunnels MUST NOT upgrade the request to the highest version
version they support. The proxy/gateway's response to that request they support. The proxy/gateway's response to that request MUST be
MUST be in the same major version as the request. in the same major version as the request.
Note: Converting between versions of HTTP may involve modification Note: Converting between versions of HTTP may involve modification
of header fields required or forbidden by the versions involved. of header fields required or forbidden by the versions involved.
3.2. Uniform Resource Identifiers 3.2. Uniform Resource Identifiers
URIs have been known by many names: WWW addresses, Universal Document URIs have been known by many names: WWW addresses, Universal Document
Identifiers, Universal Resource Identifiers [3], and finally the Identifiers, Universal Resource Identifiers [RFC1630], and finally
combination of Uniform Resource Locators (URL) [4] and Names (URN) the combination of Uniform Resource Locators (URL) [RFC1738] and
[20]. As far as HTTP is concerned, Uniform Resource Identifiers are Names (URN) [RFC1737]. As far as HTTP is concerned, Uniform Resource
simply formatted strings which identify--via name, location, or any Identifiers are simply formatted strings which identify--via name,
other characteristic--a resource. location, or any other characteristic--a resource.
3.2.1. General Syntax 3.2.1. General Syntax
URIs in HTTP can be represented in absolute form or relative to some URIs in HTTP can be represented in absolute form or relative to some
known base URI [11], depending upon the context of their use. The known base URI [RFC1808], depending upon the context of their use.
two forms are differentiated by the fact that absolute URIs always The two forms are differentiated by the fact that absolute URIs
begin with a scheme name followed by a colon. For definitive always begin with a scheme name followed by a colon. For definitive
information on URL syntax and semantics, see "Uniform Resource information on URL syntax and semantics, see "Uniform Resource
Identifiers (URI): Generic Syntax and Semantics," RFC 2396 [42] Identifiers (URI): Generic Syntax and Semantics," [RFC2396] (which
(which replaces RFCs 1738 [4] and RFC 1808 [11]). This specification replaces [RFC1738] and [RFC1808]). This specification adopts the
adopts the definitions of "URI-reference", "absoluteURI", definitions of "URI-reference", "absoluteURI", "relativeURI", "port",
"relativeURI", "port", "host","abs_path", "rel_path", and "authority" "host", "abs_path", "rel_path", and "authority" from that
from that specification. specification.
The HTTP protocol does not place any a priori limit on the length of The HTTP protocol does not place any a priori limit on the length of
a URI. Servers MUST be able to handle the URI of any resource they a URI. Servers MUST be able to handle the URI of any resource they
serve, and SHOULD be able to handle URIs of unbounded length if they serve, and SHOULD be able to handle URIs of unbounded length if they
provide GET-based forms that could generate such URIs. A server provide GET-based forms that could generate such URIs. A server
SHOULD return 414 (Request-URI Too Long) status if a URI is longer SHOULD return 414 (Request-URI Too Long) status if a URI is longer
than the server can handle (see Section 10.4.15). than the server can handle (see Section 10.4.15).
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
skipping to change at page 22, line 11 skipping to change at page 26, line 17
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
[24]). If the abs_path is not present in the URL, it MUST be given [RFC1900]). If the abs_path is not present in the URL, it MUST be
as "/" when used as a Request-URI for a resource (Section 5.1.2). If given as "/" when used as a Request-URI for a resource
a proxy receives a host name which is not a fully qualified domain (Section 5.1.2). If a proxy receives a host name which is not a
name, it MAY add its domain to the host name it received. If a proxy fully qualified domain name, it MAY add its domain to the host name
receives a fully qualified domain name, the proxy MUST NOT change the it received. If a proxy receives a fully qualified domain name, the
host name. proxy MUST NOT change the 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:
o A port that is empty or not given is equivalent to the default o A port that is empty or not given is equivalent to the default
port for that URI-reference; port for that URI-reference;
o Comparisons of host names MUST be case-insensitive; o Comparisons of host names MUST be case-insensitive;
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" set (see [RFC2396]) are
RFC 2396 [42]) are equivalent to their ""%" HEX HEX" encoding. 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://example.com:80/~smith/home.html
http://ABC.com/%7Esmith/home.html http://EXAMPLE.com/%7Esmith/home.html
http://ABC.com:/%7esmith/home.html http://EXAMPLE.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 ; [RFC822], updated by [RFC1123]
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 [RFC1036]
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 [RFC1123] (an update to
RFC 822 [9]). The second format is in common use, but is based on [RFC822]). The second format is in common use, but is based on the
the obsolete RFC 850 [12] date format and lacks a four-digit year. obsolete RFC 1036 date format [RFC1036] 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
skipping to change at page 24, line 39 skipping to change at page 29, line 15
to characters. In particular, use of external profiling information to characters. In particular, use of external profiling information
to determine the exact mapping is not permitted. to determine the exact mapping is not permitted.
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]. (<http://www.iana.org/assignments/character-sets>).
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 MUST represent the character set defined by
by that registry. Applications SHOULD limit their use of character that registry. Applications SHOULD limit their use of character sets
sets to those defined by the IANA registry. to those defined by the IANA registry.
Implementors should be aware of IETF character set requirements [38] HTTP uses charset in two contexts: within an Accept-Charset request
[41]. header (in which the charset value is an unquoted token) and as the
value of a parameter in a Content-Type header (within a request or
response), in which case the parameter value of the charset parameter
may be quoted.
Implementors should be aware of IETF character set requirements
[RFC2279] [RFC2277].
3.4.1. Missing Charset 3.4.1. Missing Charset
Some HTTP/1.0 software has interpreted a Content-Type header without Some HTTP/1.0 software has interpreted a Content-Type header without
charset parameter incorrectly to mean "recipient should guess." charset parameter incorrectly to mean "recipient should guess."
Senders wishing to defeat this behavior MAY include a charset Senders wishing to defeat this behavior MAY include a charset
parameter even when the charset is ISO-8859-1 and SHOULD do so when parameter even when the charset is ISO-8859-1 and SHOULD do so when
it is known that it will not confuse the recipient. it is known that it will not confuse the recipient.
Unfortunately, some older HTTP/1.0 clients did not deal properly with Unfortunately, some older HTTP/1.0 clients did not deal properly with
skipping to change at page 25, line 46 skipping to change at page 30, line 30
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
following tokens: following tokens:
gzip gzip
An encoding format produced by the file compression program "gzip" An encoding format produced by the file compression program "gzip"
(GNU zip) as described in RFC 1952 [25]. This format is a Lempel- (GNU zip) as described in [RFC1952]. This format is a Lempel-Ziv
Ziv coding (LZ77) with a 32 bit CRC. coding (LZ77) with a 32 bit CRC.
compress compress
The encoding format produced by the common UNIX file compression The encoding format produced by the common UNIX file compression
program "compress". This format is an adaptive Lempel-Ziv-Welch program "compress". This format is an adaptive Lempel-Ziv-Welch
coding (LZW). coding (LZW).
Use of program names for the identification of encoding formats is Use of program names for the identification of encoding formats is
not desirable and is discouraged for future encodings. Their use not desirable and is discouraged for future encodings. Their use
here is representative of historical practice, not good design. here is representative of historical practice, not good design.
For compatibility with previous implementations of HTTP, For compatibility with previous implementations of HTTP,
applications SHOULD consider "x-gzip" and "x-compress" to be applications SHOULD consider "x-gzip" and "x-compress" to be
equivalent to "gzip" and "compress" respectively. equivalent to "gzip" and "compress" respectively.
deflate deflate
The "zlib" format defined in RFC 1950 [31] in combination with the The "zlib" format defined in [RFC1950] in combination with the
"deflate" compression mechanism described in RFC 1951 [29]. "deflate" compression mechanism described in [RFC1951].
identity identity
The default (identity) encoding; the use of no transformation The default (identity) encoding; the use of no transformation
whatsoever. This content-coding is used only in the Accept- whatsoever. This content-coding is used only in the Accept-
Encoding header, and SHOULD NOT be used in the Content-Encoding Encoding header, and SHOULD NOT be used in the Content-Encoding
header. header.
New content-coding value tokens SHOULD be registered; to allow New content-coding value tokens SHOULD be registered; to allow
interoperability between clients and servers, specifications of the interoperability between clients and servers, specifications of the
content coding algorithms needed to implement a new value SHOULD be content coding algorithms needed to implement a new value SHOULD be
publicly available and adequate for independent implementation, and publicly available and adequate for independent implementation, and
conform to the purpose of content coding defined in this section. conform to the purpose of content coding defined in this section.
skipping to change at page 27, line 14 skipping to change at page 31, line 45
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
than once to a message-body. These rules allow the recipient to than once to a message-body. These rules allow the recipient to
determine the transfer-length of the message (Section 4.4). determine the transfer-length of the message (Section 4.4).
Transfer-codings are analogous to the Content-Transfer-Encoding Transfer-codings are analogous to the Content-Transfer-Encoding
values of MIME [7], which were designed to enable safe transport of values of MIME [RFC2045], which were designed to enable safe
binary data over a 7-bit transport service. However, safe transport transport of binary data over a 7-bit transport service. However,
has a different focus for an 8bit-clean transfer protocol. In HTTP, safe transport has a different focus for an 8bit-clean transfer
the only unsafe characteristic of message-bodies is the difficulty in protocol. In HTTP, the only unsafe characteristic of message-bodies
determining the exact body length (Section 7.2.2), or the desire to is the difficulty in determining the exact body length
encrypt data over a shared transport. (Section 7.2.2), or the desire to encrypt data over a shared
transport.
The Internet Assigned Numbers Authority (IANA) acts as a registry for The Internet Assigned Numbers Authority (IANA) acts as a registry for
transfer-coding value tokens. Initially, the registry contains the transfer-coding value tokens. Initially, the registry contains the
following tokens: "chunked" (Section 3.6.1), "identity" (section following tokens: "chunked" (Section 3.6.1), "gzip" (Section 3.5),
3.6.2), "gzip" (Section 3.5), "compress" (Section 3.5), and "deflate" "compress" (Section 3.5), and "deflate" (Section 3.5).
(Section 3.5).
New transfer-coding value tokens SHOULD be registered in the same way New transfer-coding value tokens SHOULD be registered in the same way
as new content-coding value tokens (Section 3.5). as new content-coding value tokens (Section 3.5).
A server which receives an entity-body with a transfer-coding it does A server which receives an entity-body with a transfer-coding it does
not understand SHOULD return 501 (Unimplemented), and close the not understand SHOULD return 501 (Unimplemented), and close the
connection. A server MUST NOT send transfer-codings to an HTTP/1.0 connection. A server MUST NOT send transfer-codings to an HTTP/1.0
client. client.
3.6.1. Chunked Transfer Coding 3.6.1. Chunked Transfer Coding
skipping to change at page 28, line 22 skipping to change at page 32, line 44
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-data in octets. The chunked encoding is ended by any chunk
zero, followed by the trailer, which is terminated by an empty line. whose size is 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).
A server using chunked transfer-coding in a response MUST NOT use the A server using chunked transfer-coding in a response MUST NOT use the
trailer for any header fields unless at least one of the following is trailer for any header fields unless at least one of the following is
true: true:
skipping to change at page 29, line 4 skipping to change at page 33, line 28
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 [RFC1590] 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).
skipping to change at page 29, line 37 skipping to change at page 34, line 12
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
its definition within the media type registry. its definition within the media type registry.
Note that some older HTTP applications do not recognize media type Note that some older HTTP applications do not recognize media type
parameters. When sending data to older HTTP applications, parameters. When sending data to older HTTP applications,
implementations SHOULD only use media type parameters when they are implementations SHOULD only use media type parameters when they are
required by that type/subtype definition. required by that type/subtype definition.
Media-type values are registered with the Internet Assigned Number Media-type values are registered with the Internet Assigned Number
Authority (IANA [19]). The media type registration process is Authority (IANA). The media type registration process is outlined in
outlined in RFC 1590 [17]. Use of non-registered media types is [RFC1590]. Use of non-registered media types is discouraged.
discouraged.
3.7.1. Canonicalization and Text Defaults 3.7.1. Canonicalization and Text Defaults
Internet media types are registered with a canonical form. An Internet media types are registered with a canonical form. An
entity-body transferred via HTTP messages MUST be represented in the entity-body transferred via HTTP messages MUST be represented in the
appropriate canonical form prior to its transmission except for appropriate canonical form prior to its transmission except for
"text" types, as defined in the next paragraph. "text" types, as defined in the next paragraph.
When in canonical form, media subtypes of the "text" type use CRLF as When in canonical form, media subtypes of the "text" type use CRLF as
the text line break. HTTP relaxes this requirement and allows the the text line break. HTTP relaxes this requirement and allows the
skipping to change at page 30, line 30 skipping to change at page 35, line 4
parameter is provided by the sender, media subtypes of the "text" parameter is provided by the sender, media subtypes of the "text"
type are defined to have a default charset value of "ISO-8859-1" when type are defined to have a default charset value of "ISO-8859-1" when
received via HTTP. Data in character sets other than "ISO-8859-1" or received via HTTP. Data in character sets other than "ISO-8859-1" or
its subsets MUST be labeled with an appropriate charset value. See its subsets MUST be labeled with an appropriate charset value. See
Section 3.4.1 for compatibility problems. Section 3.4.1 for compatibility problems.
3.7.2. Multipart Types 3.7.2. Multipart Types
MIME provides for a number of "multipart" types -- encapsulations of MIME provides for a number of "multipart" types -- encapsulations of
one or more entities within a single message-body. All multipart one or more entities within a single message-body. All multipart
types share a common syntax, as defined in section 5.1.1 of RFC 2046 types share a common syntax, as defined in Section 5.1.1 of
[40], and MUST include a boundary parameter as part of the media type [RFC2046], and MUST include a boundary parameter as part of the media
value. The message body is itself a protocol element and MUST type value. The message body is itself a protocol element and MUST
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.
If an application receives an unrecognized multipart subtype, the If an application receives an unrecognized multipart subtype, the
application MUST treat it as being equivalent to "multipart/mixed". application MUST treat it as being equivalent to "multipart/mixed".
Note: The "multipart/form-data" type has been specifically defined Note: The "multipart/form-data" type has been specifically defined
for carrying form data suitable for processing via the POST for carrying form data suitable for processing via the POST
request method, as described in RFC 1867 [15]. request method, as described in RFC 1867 [RFC1867].
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.
skipping to change at page 32, line 16 skipping to change at page 36, line 38
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 [RFC1766]. In summary, a language tag is composed of 1 or
or more parts: A primary language tag and a possibly empty series of 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:
skipping to change at page 34, line 15 skipping to change at page 39, line 15
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 [RFC822] for transferring entities (the payload of
of the message). Both types of message consist of a start-line, zero the message). Both types of message consist of a start-line, zero or
or more header fields (also known as "headers"), an empty line (i.e., more header fields (also known as "headers"), an empty line (i.e., a
a line with nothing preceding the CRLF) indicating the end of the 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,
skipping to change at page 34, line 42 skipping to change at page 39, line 42
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.
4.2. Message Headers 4.2. Message Headers
HTTP header fields, which include general-header (Section 4.5), HTTP header fields, which include general-header (Section 4.5),
request-header (Section 5.3), response-header (Section 6.2), and request-header (Section 5.3), response-header (Section 6.2), and
entity-header (Section 7.1) fields, follow the same generic format as entity-header (Section 7.1) fields, follow the same generic format as
that given in Section 3.1 of RFC 822 [9]. Each header field consists that given in Section 3.1 of [RFC822]. Each header field consists of
of a name followed by a colon (":") and the field value. Field names 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
skipping to change at page 36, line 41 skipping to change at page 41, line 41
been applied. When a message-body is included with a message, the been applied. When a message-body is included with a message, the
transfer-length of that body is determined by one of the following transfer-length of that body is determined by one of the following
(in order of precedence): (in order of precedence):
1. Any response message which "MUST NOT" include a message-body 1. Any response message which "MUST NOT" include a message-body
(such as the 1xx, 204, and 304 responses and any response to a (such as the 1xx, 204, and 304 responses and any response to a
HEAD request) is always terminated by the first empty line after HEAD request) is always terminated by the first empty line after
the header fields, regardless of the entity-header fields present the header fields, regardless of the entity-header fields present
in the message. in the message.
2. If a Transfer-Encoding header field (Section 14.41) is present 2. If a Transfer-Encoding header field (Section 14.41) is present,
and has any value other than "identity", then the transfer-length then the transfer-length is defined by use of the "chunked"
is defined by use of the "chunked" transfer-coding (Section 3.6), transfer-coding (Section 3.6), unless the message is terminated
unless the message is terminated by closing the connection. by closing the connection.
3. If a Content-Length header field (Section 14.13) is present, its 3. If a Content-Length header field (Section 14.13) is present, its
decimal value in OCTETs represents both the entity-length and the decimal value in OCTETs represents both the entity-length and the
transfer-length. The Content-Length header field MUST NOT be transfer-length. The Content-Length header field MUST NOT be
sent if these two lengths are different (i.e., if a Transfer- sent if these two lengths are different (i.e., if a Transfer-
Encoding header field is present). If a message is received with Encoding header field is present). If a message is received with
both a Transfer-Encoding header field and a Content-Length header both a Transfer-Encoding header field and a Content-Length header
field, the latter MUST be ignored. field, the latter MUST be ignored.
4. If the message uses the media type "multipart/byteranges", and 4. If the message uses the media type "multipart/byteranges", and
the ransfer-length is not otherwise specified, then this self- the transfer-length is not otherwise specified, then this self-
elimiting media type defines the transfer-length. This media delimiting media type defines the transfer-length. This media
type UST NOT be used unless the sender knows that the recipient type MUST NOT be used unless the sender knows that the recipient
can arse it; the presence in a request of a Range header with can parse it; the presence in a request of a Range header with
ultiple byte-range specifiers from a 1.1 client implies that the multiple byte-range specifiers from a 1.1 client implies that the
lient can parse multipart/byteranges responses. client can parse multipart/byteranges responses.
A range header might be forwarded by a 1.0 proxy that does not A range header might be forwarded by a 1.0 proxy that does not
understand multipart/byteranges; in this case the server MUST understand multipart/byteranges; in this case the server MUST
delimit the message using methods defined in items 1, 3 or 5 delimit the message using methods defined in items 1, 3 or 5
of this section. of this section.
5. By the server closing the connection. (Closing the connection 5. By the server closing the connection. (Closing the connection
cannot be used to indicate the end of a request body, since that cannot be used to indicate the end of a request body, since that
would leave no possibility for the server to send back a would leave no possibility for the server to send back a
response.) response.)
skipping to change at page 37, line 38 skipping to change at page 42, line 38
the server SHOULD respond with 400 (bad request) if it cannot the server SHOULD respond with 400 (bad request) if it cannot
determine the length of the message, or with 411 (length required) if determine the length of the message, or with 411 (length required) if
it wishes to insist on receiving a valid Content-Length. it wishes to insist on receiving a valid Content-Length.
All HTTP/1.1 applications that receive entities MUST accept the All HTTP/1.1 applications that receive entities MUST accept the
"chunked" transfer-coding (Section 3.6), thus allowing this mechanism "chunked" transfer-coding (Section 3.6), thus allowing this mechanism
to be used for messages when the message length cannot be determined to be used for messages when the message length cannot be determined
in advance. in advance.
Messages MUST NOT include both a Content-Length header field and a Messages MUST NOT include both a Content-Length header field and a
non-identity transfer-coding. If the message does include a non- transfer-coding. If the message does include a transfer-coding, the
identity transfer-coding, the Content-Length MUST be ignored. Content-Length MUST be ignored.
When a Content-Length is given in a message where a message-body is When a Content-Length is given in a message where a message-body is
allowed, its field value MUST exactly match the number of OCTETs in allowed, its field value MUST exactly match the number of OCTETs in
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
skipping to change at page 40, line 12 skipping to change at page 45, line 12
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 [ "?" query ]
| 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.example.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.example.org" and
the lines: send the lines:
GET /pub/WWW/TheProject.html HTTP/1.1 GET /pub/WWW/TheProject.html HTTP/1.1
Host: www.w3.org Host: www.example.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 3.2.1. If the Request-URI is encoded using the "% HEX HEX" Section 3.2.1. If the Request-URI is encoded using the "% HEX HEX"
encoding [42], the origin server MUST decode the Request-URI in order encoding [RFC2396], the origin server MUST decode the Request-URI in
to properly interpret the request. Servers SHOULD respond to invalid order to properly interpret the request. Servers SHOULD respond to
Request-URIs with an appropriate status code. invalid 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 49, line 17 skipping to change at page 54, line 17
8.1. Persistent Connections 8.1. Persistent Connections
8.1.1. Purpose 8.1.1. Purpose
Prior to persistent connections, a separate TCP connection was Prior to persistent connections, a separate TCP connection was
established to fetch each URL, increasing the load on HTTP servers established to fetch each URL, increasing the load on HTTP servers
and causing congestion on the Internet. The use of inline images and and causing congestion on the Internet. The use of inline images and
other associated data often require a client to make multiple other associated data often require a client to make multiple
requests of the same server in a short amount of time. Analysis of requests of the same server in a short amount of time. Analysis of
these performance problems and results from a prototype these performance problems and results from a prototype
implementation are available [26] [30]. Implementation experience implementation are available [Pad1995] [Spero]. Implementation
and measurements of actual HTTP/1.1 (RFC 2068) implementations show experience and measurements of actual HTTP/1.1 ([RFC2068])
good results [39]. Alternatives have also been explored, for implementations show good results [Nie1997]. Alternatives have also
example, T/TCP [27]. been explored, for example, T/TCP [Tou1998].
Persistent HTTP connections have a number of advantages: Persistent HTTP connections have a number of advantages:
o By opening and closing fewer TCP connections, CPU time is saved in o By opening and closing fewer TCP connections, CPU time is saved in
routers and hosts (clients, servers, proxies, gateways, tunnels, routers and hosts (clients, servers, proxies, gateways, tunnels,
or caches), and memory used for TCP protocol control blocks can be or caches), and memory used for TCP protocol control blocks can be
saved in hosts. saved in hosts.
o HTTP requests and responses can be pipelined on a connection. o HTTP requests and responses can be pipelined on a connection.
Pipelining allows a client to make multiple requests without Pipelining allows a client to make multiple requests without
skipping to change at page 50, line 36 skipping to change at page 55, 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 51, line 29 skipping to change at page 56, line 29
It is especially important that proxies correctly implement the It is especially important that proxies correctly implement the
properties of the Connection header field as specified in properties of the Connection header field as specified in
Section 14.10. Section 14.10.
The proxy server MUST signal persistent connections separately with The proxy server MUST signal persistent connections separately with
its clients and the origin servers (or other proxy servers) that it its clients and the origin servers (or other proxy servers) that it
connects to. Each persistent connection applies to only one connects to. Each persistent connection applies to only one
transport link. transport link.
A proxy server MUST NOT establish a HTTP/1.1 persistent connection A proxy server MUST NOT establish a HTTP/1.1 persistent connection
with an HTTP/1.0 client (but see RFC 2068 [33] for information and with an HTTP/1.0 client (but see [RFC2068] for information and
discussion of the problems with the Keep-Alive header implemented by discussion of the problems with the Keep-Alive header implemented by
many HTTP/1.0 clients). many HTTP/1.0 clients).
8.1.4. Practical Considerations 8.1.4. Practical Considerations
Servers will usually have some time-out value beyond which they will Servers will usually have some time-out value beyond which they will
no longer maintain an inactive connection. Proxy servers might make no longer maintain an inactive connection. Proxy servers might make
this a higher value since it is likely that the client will be making this a higher value since it is likely that the client will be making
more connections through the same server. The use of persistent more connections through the same server. The use of persistent
connections places no requirements on the length (or existence) of connections places no requirements on the length (or existence) of
skipping to change at page 59, line 16 skipping to change at page 64, line 16
information contained in the response MAY be used to update a information contained in the response MAY be used to update a
previously cached entity from that resource. If the new field values previously cached entity from that resource. If the new field values
indicate that the cached entity differs from the current entity (as indicate that the cached entity differs from the current entity (as
would be indicated by a change in Content-Length, Content-MD5, ETag would be indicated by a change in Content-Length, Content-MD5, ETag
or Last-Modified), then the cache MUST treat the cache entry as or Last-Modified), then the cache MUST treat the cache entry as
stale. stale.
9.5. POST 9.5. POST
The POST method is used to request that the origin server accept the The POST method is used to request that the origin server accept the
entity enclosed in the request as a new subordinate of the resource entity enclosed in the request as data to be processed by the
identified by the Request-URI in the Request-Line. POST is designed resource identified by the Request-URI in the Request-Line. POST is
to allow a uniform method to cover the following functions: designed to allow a uniform method to cover the following functions:
o Annotation of existing resources; o Annotation of existing resources;
o Posting a message to a bulletin board, newsgroup, mailing list, or o Posting a message to a bulletin board, newsgroup, mailing list, or
similar group of articles; similar group of articles;
o Providing a block of data, such as the result of submitting a o Providing a block of data, such as the result of submitting a
form, to a data-handling process; form, to a data-handling process;
o Extending a database through an append operation. o Extending a database through an append operation.
The actual function performed by the POST method is determined by the The actual function performed by the POST method is determined by the
server and is usually dependent on the Request-URI. The posted server and is usually dependent on the Request-URI.
entity is subordinate to that URI in the same way that a file is
subordinate to a directory containing it, a news article is
subordinate to a newsgroup to which it is posted, or a record is
subordinate to a database.
The action performed by the POST method might not result in a The action performed by the POST method might not result in a
resource that can be identified by a URI. In this case, either 200 resource that can be identified by a URI. In this case, either 200
(OK) or 204 (No Content) is the appropriate response status, (OK) or 204 (No Content) is the appropriate response status,
depending on whether or not the response includes an entity that depending on whether or not the response includes an entity that
describes the result. describes the result.
If a resource has been created on the origin server, the response If a resource has been created on the origin server, the response
SHOULD be 201 (Created) and contain an entity which describes the SHOULD be 201 (Created) and contain an entity which describes the
status of the request and refers to the new resource, and a Location status of the request and refers to the new resource, and a Location
skipping to change at page 62, line 13 skipping to change at page 67, line 9
proxies forwarding messages in an infinite loop. proxies forwarding messages in an infinite loop.
If the request is valid, the response SHOULD contain the entire If the request is valid, the response SHOULD contain the entire
request message in the entity-body, with a Content-Type of "message/ request message in the entity-body, with a Content-Type of "message/
http". Responses to this method MUST NOT be cached. http". Responses to this method MUST NOT be cached.
9.9. CONNECT 9.9. CONNECT
This specification reserves the method name CONNECT for use with a This specification reserves the method name CONNECT for use with a
proxy that can dynamically switch to being a tunnel (e.g. SSL proxy that can dynamically switch to being a tunnel (e.g. SSL
tunneling [44]). tunneling [Luo1998]).
10. Status Code Definitions 10. Status Code Definitions
Each Status-Code is described below, including a description of which Each Status-Code is described below, including a description of which
method(s) it can follow and any metainformation required in the method(s) it can follow and any metainformation required in the
response. response.
10.1. Informational 1xx 10.1. Informational 1xx
This class of status code indicates a provisional response, This class of status code indicates a provisional response,
skipping to change at page 66, line 32 skipping to change at page 71, line 32
o Date o Date
o ETag and/or Content-Location, if the header would have been sent o ETag and/or Content-Location, if the header would have been sent
in a 200 response to the same request in a 200 response to the same request
o Expires, Cache-Control, and/or Vary, if the field-value might o Expires, Cache-Control, and/or Vary, if the field-value might
differ from that sent in any previous response for the same differ from that sent in any previous response for the same
variant variant
If the 206 response is the result of an If-Range request that used a If the 206 response is the result of an If-Range request, the
strong cache validator (see Section 13.3.3), the response SHOULD NOT response SHOULD NOT include other entity-headers. Otherwise, the
include other entity-headers. If the response is the result of an response MUST include all of the entity-headers that would have been
If-Range request that used a weak validator, the response MUST NOT returned with a 200 (OK) response to the same request.
include other entity-headers; this prevents inconsistencies between
cached entity-bodies and updated headers. Otherwise, the response
MUST include all of the entity-headers that would have been returned
with a 200 (OK) response to the same request.
A cache MUST NOT combine a 206 response with other previously cached A cache MUST NOT combine a 206 response with other previously cached
content if the ETag or Last-Modified headers do not match exactly, content if the ETag or Last-Modified headers do not match exactly,
see 13.5.4. see 13.5.4.
A cache that does not support the Range and Content-Range headers A cache that does not support the Range and Content-Range headers
MUST NOT cache 206 (Partial) responses. MUST NOT cache 206 (Partial) responses.
10.3. Redirection 3xx 10.3. Redirection 3xx
skipping to change at page 67, line 50 skipping to change at page 72, line 46
URIs. Clients with link editing capabilities ought to automatically URIs. Clients with link editing capabilities ought to automatically
re-link references to the Request-URI to one or more of the new re-link references to the Request-URI to one or more of the new
references returned by the server, where possible. This response is references returned by the server, where possible. This response is
cacheable unless indicated otherwise. cacheable unless indicated otherwise.
The new permanent URI SHOULD be given by the Location field in the The new permanent URI SHOULD be given by the Location field in the
response. Unless the request method was HEAD, the entity of the response. Unless the request method was HEAD, the entity of the
response SHOULD contain a short hypertext note with a hyperlink to response SHOULD contain a short hypertext note with a hyperlink to
the new URI(s). the new URI(s).
If the 301 status code is received in response to a request other If the 301 status code is received in response to a request method
than GET or HEAD, the user agent MUST NOT automatically redirect the that is known to be "safe", as defined in Section 9.1.1, then the
request unless it can be confirmed by the user, since this might request MAY be automatically redirected by the user agent without
change the conditions under which the request was issued. confirmation. Otherwise, the user agent MUST NOT automatically
redirect the request unless it can be confirmed by the user, since
this might change the conditions under which the request was issued.
Note: When automatically redirecting a POST request after Note: When automatically redirecting a POST request after
receiving a 301 status code, some existing HTTP/1.0 user agents receiving a 301 status code, some existing HTTP/1.0 user agents
will erroneously change it into a GET request. will erroneously change it into a GET request.
10.3.3. 302 Found 10.3.3. 302 Found
The requested resource resides temporarily under a different URI. The requested resource resides temporarily under a different URI.
Since the redirection might be altered on occasion, the client SHOULD Since the redirection might be altered on occasion, the client SHOULD
continue to use the Request-URI for future requests. This response continue to use the Request-URI for future requests. This response
is only cacheable if indicated by a Cache-Control or Expires header is only cacheable if indicated by a Cache-Control or Expires header
field. field.
The temporary URI SHOULD be given by the Location field in the The temporary URI SHOULD be given by the Location field in the
response. Unless the request method was HEAD, the entity of the response. Unless the request method was HEAD, the entity of the
response SHOULD contain a short hypertext note with a hyperlink to response SHOULD contain a short hypertext note with a hyperlink to
the new URI(s). the new URI(s).
If the 302 status code is received in response to a request other If the 302 status code is received in response to a request method
than GET or HEAD, the user agent MUST NOT automatically redirect the that is known to be "safe", as defined in Section 9.1.1, then the
request unless it can be confirmed by the user, since this might request MAY be automatically redirected by the user agent without
change the conditions under which the request was issued. confirmation. Otherwise, the user agent MUST NOT automatically
redirect the request unless it can be confirmed by the user, since
this might change the conditions under which the request was issued.
Note: RFC 1945 and RFC 2068 specify that the client is not allowed Note: RFC 1945 and RFC 2068 specify that the client is not allowed
to change the method on the redirected request. However, most to change the method on the redirected request. However, most
existing user agent implementations treat 302 as if it were a 303 existing user agent implementations treat 302 as if it were a 303
response, performing a GET on the Location field-value regardless response, performing a GET on the Location field-value regardless
of the original request method. The status codes 303 and 307 have of the original request method. The status codes 303 and 307 have
been added for servers that wish to make unambiguously clear which been added for servers that wish to make unambiguously clear which
kind of reaction is expected of the client. kind of reaction is expected of the client.
10.3.4. 303 See Other 10.3.4. 303 See Other
skipping to change at page 69, line 24 skipping to change at page 74, line 24
respond with this status code. The 304 response MUST NOT contain a respond with this status code. The 304 response MUST NOT contain a
message-body, and thus is always terminated by the first empty line message-body, and thus is always terminated by the first empty line
after the header fields. after the header fields.
The response MUST include the following header fields: The response MUST include the following header fields:
o Date, unless its omission is required by Section 14.18.1 o Date, unless its omission is required by Section 14.18.1
If a clockless origin server obeys these rules, and proxies and If a clockless origin server obeys these rules, and proxies and
clients add their own Date to any response received without one (as clients add their own Date to any response received without one (as
already specified by [RFC 2068], section 14.19), caches will operate already specified by [RFC2068], Section 14.19), caches will operate
correctly. correctly.
o ETag and/or Content-Location, if the header would have been sent o ETag and/or Content-Location, if the header would have been sent
in a 200 response to the same request in a 200 response to the same request
o Expires, Cache-Control, and/or Vary, if the field-value might o Expires, Cache-Control, and/or Vary, if the field-value might
differ from that sent in any previous response for the same differ from that sent in any previous response for the same
variant variant
If the conditional GET used a strong cache validator (see If the conditional GET used a strong cache validator (see
skipping to change at page 70, line 28 skipping to change at page 75, line 28
The requested resource resides temporarily under a different URI. The requested resource resides temporarily under a different URI.
Since the redirection MAY be altered on occasion, the client SHOULD Since the redirection MAY be altered on occasion, the client SHOULD
continue to use the Request-URI for future requests. This response continue to use the Request-URI for future requests. This response
is only cacheable if indicated by a Cache-Control or Expires header is only cacheable if indicated by a Cache-Control or Expires header
field. field.
The temporary URI SHOULD be given by the Location field in the The temporary URI SHOULD be given by the Location field in the
response. Unless the request method was HEAD, the entity of the response. Unless the request method was HEAD, the entity of the
response SHOULD contain a short hypertext note with a hyperlink to response SHOULD contain a short hypertext note with a hyperlink to
the new URI(s) , since many pre-HTTP/1.1 user agents do not the new URI(s), since many pre-HTTP/1.1 user agents do not understand
understand the 307 status. Therefore, the note SHOULD contain the the 307 status. Therefore, the note SHOULD contain the information
information necessary for a user to repeat the original request on necessary for a user to repeat the original request on the new URI.
the new URI.
If the 307 status code is received in response to a request other If the 307 status code is received in response to a request method
than GET or HEAD, the user agent MUST NOT automatically redirect the that is known to be "safe", as defined in Section 9.1.1, then the
request unless it can be confirmed by the user, since this might request MAY be automatically redirected by the user agent without
change the conditions under which the request was issued. confirmation. Otherwise, the user agent MUST NOT automatically
redirect the request unless it can be confirmed by the user, since
this might change the conditions under which the request was issued.
10.4. Client Error 4xx 10.4. Client Error 4xx
The 4xx class of status code is intended for cases in which the The 4xx class of status code is intended for cases in which the
client seems to have erred. Except when responding to a HEAD client seems to have erred. Except when responding to a HEAD
request, the server SHOULD include an entity containing an request, the server SHOULD include an entity containing an
explanation of the error situation, and whether it is a temporary or explanation of the error situation, and whether it is a temporary or
permanent condition. These status codes are applicable to any permanent condition. These status codes are applicable to any
request method. User agents SHOULD display any included entity to request method. User agents SHOULD display any included entity to
the user. the user.
skipping to change at page 71, line 27 skipping to change at page 76, line 28
challenge applicable to the requested resource. The client MAY challenge applicable to the requested resource. The client MAY
repeat the request with a suitable Authorization header field repeat the request with a suitable Authorization header field
(Section 14.8). If the request already included Authorization (Section 14.8). If the request already included Authorization
credentials, then the 401 response indicates that authorization has credentials, then the 401 response indicates that authorization has
been refused for those credentials. If the 401 response contains the been refused for those credentials. If the 401 response contains the
same challenge as the prior response, and the user agent has already same challenge as the prior response, and the user agent has already
attempted authentication at least once, then the user SHOULD be attempted authentication at least once, then the user SHOULD be
presented the entity that was given in the response, since that presented the entity that was given in the response, since that
entity might include relevant diagnostic information. HTTP access entity might include relevant diagnostic information. HTTP access
authentication is explained in "HTTP Authentication: Basic and Digest authentication is explained in "HTTP Authentication: Basic and Digest
Access Authentication" [43]. Access Authentication" [RFC2617].
10.4.3. 402 Payment Required 10.4.3. 402 Payment Required
This code is reserved for future use. This code is reserved for future use.
10.4.4. 403 Forbidden 10.4.4. 403 Forbidden
The server understood the request, but is refusing to fulfill it. The server understood the request, but is refusing to fulfill it.
Authorization will not help and the request SHOULD NOT be repeated. Authorization will not help and the request SHOULD NOT be repeated.
If the request method was not HEAD and the server wishes to make If the request method was not HEAD and the server wishes to make
skipping to change at page 72, line 47 skipping to change at page 77, line 48
10.4.8. 407 Proxy Authentication Required 10.4.8. 407 Proxy Authentication Required
This code is similar to 401 (Unauthorized), but indicates that the This code is similar to 401 (Unauthorized), but indicates that the
client must first authenticate itself with the proxy. The proxy MUST client must first authenticate itself with the proxy. The proxy MUST
return a Proxy-Authenticate header field (Section 14.33) containing a return a Proxy-Authenticate header field (Section 14.33) containing a
challenge applicable to the proxy for the requested resource. The challenge applicable to the proxy for the requested resource. The
client MAY repeat the request with a suitable Proxy-Authorization client MAY repeat the request with a suitable Proxy-Authorization
header field (Section 14.34). HTTP access authentication is header field (Section 14.34). HTTP access authentication is
explained in "HTTP Authentication: Basic and Digest Access explained in "HTTP Authentication: Basic and Digest Access
Authentication" [43]. Authentication" [RFC2617].
10.4.9. 408 Request Timeout 10.4.9. 408 Request Timeout
The client did not produce a request within the time that the server The client did not produce a request within the time that the server
was prepared to wait. The client MAY repeat the request without was prepared to wait. The client MAY repeat the request without
modifications at any later time. modifications at any later time.
10.4.10. 409 Conflict 10.4.10. 409 Conflict
The request could not be completed due to a conflict with the current The request could not be completed due to a conflict with the current
skipping to change at page 77, line 12 skipping to change at page 82, line 12
contain an entity describing why that version is not supported and contain an entity describing why that version is not supported and
what other protocols are supported by that server. what other protocols are supported by that server.
11. Access Authentication 11. Access Authentication
HTTP provides several OPTIONAL challenge-response authentication HTTP provides several OPTIONAL challenge-response authentication
mechanisms which can be used by a server to challenge a client mechanisms which can be used by a server to challenge a client
request and by a client to provide authentication information. The request and by a client to provide authentication information. The
general framework for access authentication, and the specification of general framework for access authentication, and the specification of
"basic" and "digest" authentication, are specified in "HTTP "basic" and "digest" authentication, are specified in "HTTP
Authentication: Basic and Digest Access Authentication" [43]. This Authentication: Basic and Digest Access Authentication" [RFC2617].
specification adopts the definitions of "challenge" and "credentials" This specification adopts the definitions of "challenge" and
from that specification. "credentials" from that specification.
12. Content Negotiation 12. Content Negotiation
Most HTTP responses include an entity which contains information for Most HTTP responses include an entity which contains information for
interpretation by a human user. Naturally, it is desirable to supply interpretation by a human user. Naturally, it is desirable to supply
the user with the "best available" entity corresponding to the the user with the "best available" entity corresponding to the
request. Unfortunately for servers and caches, not all users have request. Unfortunately for servers and caches, not all users have
the same preferences for what is "best," and not all user agents are the same preferences for what is "best," and not all user agents are
equally capable of rendering all entity types. For that reason, HTTP equally capable of rendering all entity types. For that reason, HTTP
has provisions for several mechanisms for "content negotiation" -- has provisions for several mechanisms for "content negotiation" --
skipping to change at page 82, line 19 skipping to change at page 87, line 19
ought to err on the side of maintaining transparency unless a ought to err on the side of maintaining transparency unless a
careful and complete analysis shows significant benefits in careful and complete analysis shows significant benefits in
breaking transparency. breaking transparency.
13.1. 13.1.
13.1.1. Cache Correctness 13.1.1. Cache Correctness
A correct cache MUST respond to a request with the most up-to-date A correct cache MUST respond to a request with the most up-to-date
response held by the cache that is appropriate to the request (see response held by the cache that is appropriate to the request (see
sections 13.2.5, 13.2.6, and 13.12) which meets one of the following Sections 13.2.5, 13.2.6, and 13.12) which meets one of the following
conditions: conditions:
1. It has been checked for equivalence with what the origin server 1. It has been checked for equivalence with what the origin server
would have returned by revalidating the response with the origin would have returned by revalidating the response with the origin
server (Section 13.3); server (Section 13.3);
2. It is "fresh enough" (see Section 13.2). In the default case, 2. It is "fresh enough" (see Section 13.2). In the default case,
this means it meets the least restrictive freshness requirement this means it meets the least restrictive freshness requirement
of the client, origin server, and cache (see Section 14.9); if of the client, origin server, and cache (see Section 14.9); if
the origin server so specifies, it is the freshness requirement the origin server so specifies, it is the freshness requirement
of the origin server alone. If a stored response is not "fresh of the origin server alone. If a stored response is not "fresh
enough" by the most restrictive freshness requirement of both the enough" by the most restrictive freshness requirement of both the
client and the origin server, in carefully considered client and the origin server, in carefully considered
circumstances the cache MAY still return the response with the circumstances the cache MAY still return the response with the
appropriate Warning header (see section 13.1.5 and 14.46), unless appropriate Warning header (see Section 13.1.5 and 14.46), unless
such a response is prohibited (e.g., by a "no-store" cache- such a response is prohibited (e.g., by a "no-store" cache-
directive, or by a "no-cache" cache-request-directive; see directive, or by a "no-cache" cache-request-directive; see
Section 14.9). Section 14.9).
3. It is an appropriate 304 (Not Modified), 305 (Proxy Redirect), or 3. It is an appropriate 304 (Not Modified), 305 (Proxy Redirect), or
error (4xx or 5xx) response message. error (4xx or 5xx) response message.
If the cache can not communicate with the origin server, then a If the cache can not communicate with the origin server, then a
correct cache SHOULD respond as above if the response can be correct cache SHOULD respond as above if the response can be
correctly served from the cache; if not it MUST return an error or correctly served from the cache; if not it MUST return an error or
skipping to change at page 83, line 28 skipping to change at page 88, line 28
Warnings MAY be used for other purposes, both cache-related and Warnings MAY be used for other purposes, both cache-related and
otherwise. The use of a warning, rather than an error status code, otherwise. The use of a warning, rather than an error status code,
distinguish these responses from true failures. distinguish these responses from true failures.
Warnings are assigned three digit warn-codes. The first digit Warnings are assigned three digit warn-codes. The first digit
indicates whether the Warning MUST or MUST NOT be deleted from a indicates whether the Warning MUST or MUST NOT be deleted from a
stored cache entry after a successful revalidation: stored cache entry after a successful revalidation:
1xx Warnings that describe the freshness or revalidation status of 1xx Warnings that describe the freshness or revalidation status of
the response, and so MUST be deleted after a successful the response, and so MUST be deleted after a successful
revalidation. 1XX warn-codes MAY be generated by a cache only when revalidation. 1xx warn-codes MAY be generated by a cache only when
validating a cached entry. It MUST NOT be generated by clients. validating a cached entry. It MUST NOT be generated by clients.
2xx Warnings that describe some aspect of the entity body or entity 2xx Warnings that describe some aspect of the entity body or entity
headers that is not rectified by a revalidation (for example, a headers that is not rectified by a revalidation (for example, a
lossy compression of the entity bodies) and which MUST NOT be lossy compression of the entity bodies) and which MUST NOT be
deleted after a successful revalidation. deleted after a successful revalidation.
See Section 14.46 for the definitions of the codes themselves. See Section 14.46 for the definitions of the codes themselves.
HTTP/1.0 caches will cache all Warnings in responses, without HTTP/1.0 caches will cache all Warnings in responses, without
skipping to change at page 87, line 20 skipping to change at page 92, line 20
13.2.3. Age Calculations 13.2.3. Age Calculations
In order to know if a cached entry is fresh, a cache needs to know if In order to know if a cached entry is fresh, a cache needs to know if
its age exceeds its freshness lifetime. We discuss how to calculate its age exceeds its freshness lifetime. We discuss how to calculate
the latter in Section 13.2.4; this section describes how to calculate the latter in Section 13.2.4; this section describes how to calculate
the age of a response or cache entry. the age of a response or cache entry.
In this discussion, we use the term "now" to mean "the current value In this discussion, we use the term "now" to mean "the current value
of the clock at the host performing the calculation." Hosts that use of the clock at the host performing the calculation." Hosts that use
HTTP, but especially hosts running origin servers and caches, SHOULD HTTP, but especially hosts running origin servers and caches, SHOULD
use NTP [28] or some similar protocol to synchronize their clocks to use NTP [RFC1305] or some similar protocol to synchronize their
a globally accurate time standard. clocks to a globally accurate time standard.
HTTP/1.1 requires origin servers to send a Date header, if possible, HTTP/1.1 requires origin servers to send a Date header, if possible,
with every response, giving the time at which the response was with every response, giving the time at which the response was
generated (see Section 14.18). We use the term "date_value" to generated (see Section 14.18). We use the term "date_value" to
denote the value of the Date header, in a form appropriate for denote the value of the Date header, in a form appropriate for
arithmetic operations. arithmetic operations.
HTTP/1.1 uses the Age response-header to convey the estimated age of HTTP/1.1 uses the Age response-header to convey the estimated age of
the response message when obtained from a cache. The Age field value the response message when obtained from a cache. The Age field value
is the cache's estimate of the amount of time since the response was is the cache's estimate of the amount of time since the response was
skipping to change at page 93, line 6 skipping to change at page 98, line 6
13.3.2. Entity Tag Cache Validators 13.3.2. Entity Tag Cache Validators
The ETag response-header field value, an entity tag, provides for an The ETag response-header field value, an entity tag, provides for an
"opaque" cache validator. This might allow more reliable validation "opaque" cache validator. This might allow more reliable validation
in situations where it is inconvenient to store modification dates, in situations where it is inconvenient to store modification dates,
where the one-second resolution of HTTP date values is not where the one-second resolution of HTTP date values is not
sufficient, or where the origin server wishes to avoid certain sufficient, or where the origin server wishes to avoid certain
paradoxes that might arise from the use of modification dates. paradoxes that might arise from the use of modification dates.
Entity Tags are described in Section 3.11. The headers used with Entity Tags are described in Section 3.11. The headers used with
entity tags are described in sections 14.19, 14.24, 14.26 and 14.44. entity tags are described in Sections 14.19, 14.24, 14.26 and 14.44.
13.3.3. Weak and Strong Validators 13.3.3. Weak and Strong Validators
Since both origin servers and caches will compare two validators to Since both origin servers and caches will compare two validators to
decide if they represent the same or different entities, one normally decide if they represent the same or different entities, one normally
would expect that if the entity (the entity-body or any entity- would expect that if the entity (the entity-body or any entity-
headers) changes in any way, then the associated validator would headers) changes in any way, then the associated validator would
change as well. If this is true, then we call this validator a change as well. If this is true, then we call this validator a
"strong validator." "strong validator."
skipping to change at page 99, line 21 skipping to change at page 104, line 21
o Connection o Connection
o Keep-Alive o Keep-Alive
o Proxy-Authenticate o Proxy-Authenticate
o Proxy-Authorization o Proxy-Authorization
o TE o TE
o Trailers o Trailer
o Transfer-Encoding o Transfer-Encoding
o Upgrade o Upgrade
All other headers defined by HTTP/1.1 are end-to-end headers. All other headers defined by HTTP/1.1 are end-to-end headers.
Other hop-by-hop headers MUST be listed in a Connection header, Other hop-by-hop headers, if they are introduced either in HTTP/1.1
(Section 14.10) to be introduced into HTTP/1.1 (or later). or later versions of HTTP/1.x, MUST be listed in a Connection header
(Section 14.10).
13.5.2. Non-modifiable Headers 13.5.2. Non-modifiable Headers
Some features of the HTTP/1.1 protocol, such as Digest Some features of the HTTP/1.1 protocol, such as Digest
Authentication, depend on the value of certain end-to-end headers. A Authentication, depend on the value of certain end-to-end headers. A
transparent proxy SHOULD NOT modify an end-to-end header unless the transparent proxy SHOULD NOT modify an end-to-end header unless the
definition of that header requires or specifically allows that. definition of that header requires or specifically allows that.
A transparent proxy MUST NOT modify any of the following fields in a A transparent proxy MUST NOT modify any of the following fields in a
request or response, and it MUST NOT add any of these fields if not request or response, and it MUST NOT add any of these fields if not
skipping to change at page 105, line 11 skipping to change at page 110, line 11
is either the entity referred to by the Request-URI, or by the is either the entity referred to by the Request-URI, or by the
Location or Content-Location headers (if present). These methods Location or Content-Location headers (if present). These methods
are: are:
o PUT o PUT
o DELETE o DELETE
o POST o POST
In order to prevent denial of service attacks, an invalidation based An invalidation based on the URI in a Location or Content-Location
on the URI in a Location or Content-Location header MUST only be header MUST NOT be performed if the host part of that URI differs
performed if the host part is the same as in the Request-URI. from the host part in the Request-URI. This helps prevent denial of
service attacks.
A cache that passes through requests for methods it does not A cache that passes through requests for methods it does not
understand SHOULD invalidate any entities referred to by the Request- understand SHOULD invalidate any entities referred to by the Request-
URI. URI.
13.11. Write-Through Mandatory 13.11. Write-Through Mandatory
All methods that might be expected to cause modifications to the All methods that might be expected to cause modifications to the
origin server's resources MUST be written through to the origin origin server's resources MUST be written through to the origin
server. This currently includes all methods except for GET and HEAD. server. This currently includes all methods except for GET and HEAD.
skipping to change at page 105, line 37 skipping to change at page 110, line 38
prevent a proxy cache from sending a 100 (Continue) response before prevent a proxy cache from sending a 100 (Continue) response before
the inbound server has sent its final reply. the inbound server has sent its final reply.
The alternative (known as "write-back" or "copy-back" caching) is not The alternative (known as "write-back" or "copy-back" caching) is not
allowed in HTTP/1.1, due to the difficulty of providing consistent allowed in HTTP/1.1, due to the difficulty of providing consistent
updates and the problems arising from server, cache, or network updates and the problems arising from server, cache, or network
failure prior to write-back. failure prior to write-back.
13.12. Cache Replacement 13.12. Cache Replacement
If a new cacheable (see sections 14.9.2, 13.2.5, 13.2.6 and 13.8) If a new cacheable (see Sections 14.9.2, 13.2.5, 13.2.6 and 13.8)
response is received from a resource while any existing responses for response is received from a resource while any existing responses for
the same resource are cached, the cache SHOULD use the new response the same resource are cached, the cache SHOULD use the new response
to reply to the current request. It MAY insert it into cache storage to reply to the current request. It MAY insert it into cache storage
and MAY, if it meets all other requirements, use it to respond to any and MAY, if it meets all other requirements, use it to respond to any
future requests that would previously have caused the old response to future requests that would previously have caused the old response to
be returned. If it inserts the new response into cache storage the be returned. If it inserts the new response into cache storage the
rules in Section 13.5.3 apply. rules in Section 13.5.3 apply.
Note: a new response that has an older Date header value than Note: a new response that has an older Date header value than
existing cached responses is not cacheable. existing cached responses is not cacheable.
skipping to change at page 106, line 32 skipping to change at page 111, line 32
This is not to be construed to prohibit the history mechanism from This is not to be construed to prohibit the history mechanism from
telling the user that a view might be stale. telling the user that a view might be stale.
Note: if history list mechanisms unnecessarily prevent users from Note: if history list mechanisms unnecessarily prevent users from
viewing stale resources, this will tend to force service authors viewing stale resources, this will tend to force service authors
to avoid using HTTP expiration controls and cache controls when to avoid using HTTP expiration controls and cache controls when
they would otherwise like to. Service authors may consider it they would otherwise like to. Service authors may consider it
important that users not be presented with error messages or important that users not be presented with error messages or
warning messages when they use navigation controls (such as BACK) warning messages when they use navigation controls (such as BACK)
to view previously fetched resources. Even though sometimes such to view previously fetched resources. Even though sometimes such
resources ought not to cached, or ought to expire quickly, user resources ought not be cached, or ought to expire quickly, user
interface considerations may force service authors to resort to interface considerations may force service authors to resort to
other means of preventing caching (e.g. "once-only" URLs) in order other means of preventing caching (e.g. "once-only" URLs) in order
not to suffer the effects of improperly functioning history not to suffer the effects of improperly functioning history
mechanisms. mechanisms.
14. Header Field Definitions 14. Header Field Definitions
This section defines the syntax and semantics of all standard This section defines the syntax and semantics of all standard
HTTP/1.1 header fields. For entity-header fields, both sender and HTTP/1.1 header fields. For entity-header fields, both sender and
recipient refer to either the client or the server, depending on who recipient refer to either the client or the server, depending on who
skipping to change at page 114, line 12 skipping to change at page 119, line 12
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" [RFC2617]. 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
an Authorization field, it MUST NOT return the corresponding response an Authorization field, it MUST NOT return the corresponding response
as a reply to any other request, unless one of the following specific as a reply to any other request, unless one of the following specific
exceptions holds: exceptions holds:
skipping to change at page 124, line 45 skipping to change at page 129, line 45
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 An HTTP/1.1 client that does not support persistent connections MUST
include the "close" connection option in every message. include the "close" connection option in every request message.
An HTTP/1.1 server that does not support persistent connections MUST
include the "close" connection option in every response message that
does not have a 1xx (informational) status code.
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.
skipping to change at page 125, line 31 skipping to change at page 130, line 36
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 that lists the
(Section 14.11) that lists the non-identity content-coding(s) used. non-identity content-coding(s) used.
If the content-coding of an entity in a request message is not If the content-coding of an entity in a request message is not
acceptable to the origin server, the server SHOULD respond with a acceptable to the origin server, the server SHOULD respond with a
status code of 415 (Unsupported Media Type). status code of 415 (Unsupported Media Type).
If multiple encodings have been applied to an entity, the content If multiple encodings have been applied to an entity, the content
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.
skipping to change at page 128, line 7 skipping to change at page 133, line 10
Section 13.6. Section 13.6.
If the Content-Location is a relative URI, the relative URI is If the Content-Location is a relative URI, the relative URI is
interpreted relative to the Request-URI. interpreted relative to the Request-URI.
The meaning of the Content-Location header in PUT or POST requests is The meaning of the Content-Location header in PUT or POST requests is
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 [RFC1864], is an
an MD5 digest of the entity-body for the purpose of providing an end- MD5 digest of the entity-body for the purpose of providing an end-to-
to-end message integrity check (MIC) of the entity-body. (Note: a end message integrity check (MIC) of the entity-body. (Note: a MIC
MIC is good for detecting accidental modification of the entity-body is good for detecting accidental modification of the entity-body in
in transit, but is not proof against malicious attacks.) 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 [RFC1864]>
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 130, line 44 skipping to change at page 135, line 48
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 46 skipping to change at page 136, line 49
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 rfc1123-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.
skipping to change at page 132, line 25 skipping to change at page 137, line 29
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
recipient or gatewayed via a protocol which requires a Date. An HTTP recipient or gatewayed via a protocol which requires a Date. An HTTP
implementation without a clock MUST NOT cache responses without implementation without a clock MUST NOT cache responses without
revalidating them on every use. An HTTP cache, especially a shared revalidating them on every use. An HTTP cache, especially a shared
cache, SHOULD use a mechanism, such as NTP [28], to synchronize its cache, SHOULD use a mechanism, such as NTP [RFC1305], to synchronize
clock with a reliable external standard. its clock with a reliable external standard.
Clients SHOULD only send a Date header field in messages that include Clients SHOULD only send a Date header field in messages that include
an entity-body, as in the case of the PUT and POST requests, and even an entity-body, as in the case of the PUT and POST requests, and even
then it is optional. A client without a clock MUST NOT send a Date then it is optional. A client without a clock MUST NOT send a Date
header field in a request. header field in a request.
The HTTP-date sent in a Date header SHOULD NOT represent a date and The HTTP-date sent in a Date header SHOULD NOT represent a date and
time subsequent to the generation of the message. It SHOULD time subsequent to the generation of the message. It SHOULD
represent the best available approximation of the date and time of represent the best available approximation of the date and time of
message generation, unless the implementation has no means of message generation, unless the implementation has no means of
skipping to change at page 133, line 9 skipping to change at page 138, line 13
with the resource by a system or user with a reliable clock. It MAY with the resource by a system or user with a reliable clock. It MAY
assign an Expires value that is known, at or before server assign an Expires value that is known, at or before server
configuration time, to be in t