draft-ietf-httpbis-p3-payload-01.txt | draft-ietf-httpbis-p3-payload-02.txt | |||
---|---|---|---|---|
Network Working Group R. Fielding, Ed. | Network Working Group R. Fielding, Ed. | |||
Internet-Draft Day Software | Internet-Draft Day Software | |||
Obsoletes: 2616 (if approved) J. Gettys | Obsoletes: 2616 (if approved) J. Gettys | |||
Intended status: Standards Track One Laptop per Child | Intended status: Standards Track One Laptop per Child | |||
Expires: July 15, 2008 J. Mogul | Expires: August 27, 2008 J. Mogul | |||
HP | HP | |||
H. Frystyk | H. Frystyk | |||
Microsoft | Microsoft | |||
L. Masinter | L. Masinter | |||
Adobe Systems | Adobe Systems | |||
P. Leach | P. Leach | |||
Microsoft | Microsoft | |||
T. Berners-Lee | T. Berners-Lee | |||
W3C/MIT | W3C/MIT | |||
Y. Lafon, Ed. | Y. Lafon, Ed. | |||
W3C | W3C | |||
J. Reschke, Ed. | J. Reschke, Ed. | |||
greenbytes | greenbytes | |||
January 12, 2008 | February 24, 2008 | |||
HTTP/1.1, part 3: Message Payload and Content Negotiation | HTTP/1.1, part 3: Message Payload and Content Negotiation | |||
draft-ietf-httpbis-p3-payload-01 | draft-ietf-httpbis-p3-payload-02 | |||
Status of this Memo | Status of this Memo | |||
By submitting this Internet-Draft, each author represents that any | By submitting this Internet-Draft, each author represents that any | |||
applicable patent or other IPR claims of which he or she is aware | applicable patent or other IPR claims of which he or she is aware | |||
have been or will be disclosed, and any of which he or she becomes | have been or will be disclosed, and any of which he or she becomes | |||
aware will be disclosed, in accordance with Section 6 of BCP 79. | aware will be disclosed, in accordance with Section 6 of BCP 79. | |||
Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
Task Force (IETF), its areas, and its working groups. Note that | Task Force (IETF), its areas, and its working groups. Note that | |||
skipping to change at page 1, line 49 | skipping to change at page 1, line 49 | |||
and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
The list of current Internet-Drafts can be accessed at | The list of current Internet-Drafts can be accessed at | |||
http://www.ietf.org/ietf/1id-abstracts.txt. | http://www.ietf.org/ietf/1id-abstracts.txt. | |||
The list of Internet-Draft Shadow Directories can be accessed at | The list of Internet-Draft Shadow Directories can be accessed at | |||
http://www.ietf.org/shadow.html. | http://www.ietf.org/shadow.html. | |||
This Internet-Draft will expire on July 15, 2008. | This Internet-Draft will expire on August 27, 2008. | |||
Copyright Notice | Copyright Notice | |||
Copyright (C) The IETF Trust (2008). | Copyright (C) The IETF Trust (2008). | |||
Abstract | Abstract | |||
The Hypertext Transfer Protocol (HTTP) is an application-level | The Hypertext Transfer Protocol (HTTP) is an application-level | |||
protocol for distributed, collaborative, hypermedia information | protocol for distributed, collaborative, hypermedia information | |||
systems. HTTP has been in use by the World Wide Web global | systems. HTTP has been in use by the World Wide Web global | |||
skipping to change at page 3, line 9 | skipping to change at page 3, line 9 | |||
This draft incorporates those issue resolutions that were either | This draft incorporates those issue resolutions that were either | |||
collected in the original RFC2616 errata list | collected in the original RFC2616 errata list | |||
(<http://purl.org/NET/http-errata>), or which were agreed upon on the | (<http://purl.org/NET/http-errata>), or which were agreed upon on the | |||
mailing list between October 2006 and November 2007 (as published in | mailing list between October 2006 and November 2007 (as published in | |||
"draft-lafon-rfc2616bis-03"). | "draft-lafon-rfc2616bis-03"). | |||
Table of Contents | Table of Contents | |||
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 5 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 5 | |||
1.1. Requirements . . . . . . . . . . . . . . . . . . . . . . . 5 | 1.1. Requirements . . . . . . . . . . . . . . . . . . . . . . . 5 | |||
2. Protocol Parameters . . . . . . . . . . . . . . . . . . . . . 5 | 2. Notational Conventions and Generic Grammar . . . . . . . . . . 5 | |||
2.1. Character Sets . . . . . . . . . . . . . . . . . . . . . . 5 | 3. Protocol Parameters . . . . . . . . . . . . . . . . . . . . . 6 | |||
2.1.1. Missing Charset . . . . . . . . . . . . . . . . . . . 6 | 3.1. Character Sets . . . . . . . . . . . . . . . . . . . . . . 6 | |||
2.2. Content Codings . . . . . . . . . . . . . . . . . . . . . 7 | 3.1.1. Missing Charset . . . . . . . . . . . . . . . . . . . 7 | |||
2.3. Media Types . . . . . . . . . . . . . . . . . . . . . . . 8 | 3.2. Content Codings . . . . . . . . . . . . . . . . . . . . . 7 | |||
2.3.1. Canonicalization and Text Defaults . . . . . . . . . . 9 | 3.3. Media Types . . . . . . . . . . . . . . . . . . . . . . . 9 | |||
2.3.2. Multipart Types . . . . . . . . . . . . . . . . . . . 9 | 3.3.1. Canonicalization and Text Defaults . . . . . . . . . . 9 | |||
2.4. Quality Values . . . . . . . . . . . . . . . . . . . . . . 10 | 3.3.2. Multipart Types . . . . . . . . . . . . . . . . . . . 10 | |||
2.5. Language Tags . . . . . . . . . . . . . . . . . . . . . . 10 | 3.4. Quality Values . . . . . . . . . . . . . . . . . . . . . . 11 | |||
3. Entity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 | 3.5. Language Tags . . . . . . . . . . . . . . . . . . . . . . 11 | |||
3.1. Entity Header Fields . . . . . . . . . . . . . . . . . . . 11 | 4. Entity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 | |||
3.2. Entity Body . . . . . . . . . . . . . . . . . . . . . . . 12 | 4.1. Entity Header Fields . . . . . . . . . . . . . . . . . . . 12 | |||
3.2.1. Type . . . . . . . . . . . . . . . . . . . . . . . . . 12 | 4.2. Entity Body . . . . . . . . . . . . . . . . . . . . . . . 12 | |||
3.2.2. Entity Length . . . . . . . . . . . . . . . . . . . . 12 | 4.2.1. Type . . . . . . . . . . . . . . . . . . . . . . . . . 13 | |||
4. Content Negotiation . . . . . . . . . . . . . . . . . . . . . 13 | 4.2.2. Entity Length . . . . . . . . . . . . . . . . . . . . 13 | |||
4.1. Server-driven Negotiation . . . . . . . . . . . . . . . . 13 | 5. Content Negotiation . . . . . . . . . . . . . . . . . . . . . 13 | |||
4.2. Agent-driven Negotiation . . . . . . . . . . . . . . . . . 14 | 5.1. Server-driven Negotiation . . . . . . . . . . . . . . . . 14 | |||
4.3. Transparent Negotiation . . . . . . . . . . . . . . . . . 15 | 5.2. Agent-driven Negotiation . . . . . . . . . . . . . . . . . 15 | |||
5. Header Field Definitions . . . . . . . . . . . . . . . . . . . 15 | 5.3. Transparent Negotiation . . . . . . . . . . . . . . . . . 16 | |||
5.1. Accept . . . . . . . . . . . . . . . . . . . . . . . . . . 16 | 6. Header Field Definitions . . . . . . . . . . . . . . . . . . . 16 | |||
5.2. Accept-Charset . . . . . . . . . . . . . . . . . . . . . . 18 | 6.1. Accept . . . . . . . . . . . . . . . . . . . . . . . . . . 16 | |||
5.3. Accept-Encoding . . . . . . . . . . . . . . . . . . . . . 18 | 6.2. Accept-Charset . . . . . . . . . . . . . . . . . . . . . . 18 | |||
5.4. Accept-Language . . . . . . . . . . . . . . . . . . . . . 20 | 6.3. Accept-Encoding . . . . . . . . . . . . . . . . . . . . . 19 | |||
5.5. Content-Encoding . . . . . . . . . . . . . . . . . . . . . 21 | 6.4. Accept-Language . . . . . . . . . . . . . . . . . . . . . 20 | |||
5.6. Content-Language . . . . . . . . . . . . . . . . . . . . . 22 | 6.5. Content-Encoding . . . . . . . . . . . . . . . . . . . . . 22 | |||
5.7. Content-Location . . . . . . . . . . . . . . . . . . . . . 22 | 6.6. Content-Language . . . . . . . . . . . . . . . . . . . . . 22 | |||
5.8. Content-MD5 . . . . . . . . . . . . . . . . . . . . . . . 23 | 6.7. Content-Location . . . . . . . . . . . . . . . . . . . . . 23 | |||
5.9. Content-Type . . . . . . . . . . . . . . . . . . . . . . . 24 | 6.8. Content-MD5 . . . . . . . . . . . . . . . . . . . . . . . 24 | |||
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 25 | 6.9. Content-Type . . . . . . . . . . . . . . . . . . . . . . . 25 | |||
7. Security Considerations . . . . . . . . . . . . . . . . . . . 25 | 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 26 | |||
7.1. Privacy Issues Connected to Accept Headers . . . . . . . . 25 | 8. Security Considerations . . . . . . . . . . . . . . . . . . . 26 | |||
7.2. Content-Disposition Issues . . . . . . . . . . . . . . . . 26 | 8.1. Privacy Issues Connected to Accept Headers . . . . . . . . 26 | |||
8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 26 | 8.2. Content-Disposition Issues . . . . . . . . . . . . . . . . 27 | |||
9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 26 | 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 27 | |||
9.1. Normative References . . . . . . . . . . . . . . . . . . . 26 | 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 27 | |||
9.2. Informative References . . . . . . . . . . . . . . . . . . 28 | 10.1. Normative References . . . . . . . . . . . . . . . . . . . 27 | |||
10.2. Informative References . . . . . . . . . . . . . . . . . . 29 | ||||
Appendix A. Differences Between HTTP Entities and RFC 2045 | Appendix A. Differences Between HTTP Entities and RFC 2045 | |||
Entities . . . . . . . . . . . . . . . . . . . . . . 29 | Entities . . . . . . . . . . . . . . . . . . . . . . 30 | |||
A.1. MIME-Version . . . . . . . . . . . . . . . . . . . . . . . 29 | A.1. MIME-Version . . . . . . . . . . . . . . . . . . . . . . . 30 | |||
A.2. Conversion to Canonical Form . . . . . . . . . . . . . . . 30 | A.2. Conversion to Canonical Form . . . . . . . . . . . . . . . 30 | |||
A.3. Introduction of Content-Encoding . . . . . . . . . . . . . 30 | A.3. Introduction of Content-Encoding . . . . . . . . . . . . . 31 | |||
A.4. No Content-Transfer-Encoding . . . . . . . . . . . . . . . 30 | A.4. No Content-Transfer-Encoding . . . . . . . . . . . . . . . 31 | |||
A.5. Introduction of Transfer-Encoding . . . . . . . . . . . . 31 | A.5. Introduction of Transfer-Encoding . . . . . . . . . . . . 31 | |||
A.6. MHTML and Line Length Limitations . . . . . . . . . . . . 31 | A.6. MHTML and Line Length Limitations . . . . . . . . . . . . 32 | |||
Appendix B. Additional Features . . . . . . . . . . . . . . . . . 31 | Appendix B. Additional Features . . . . . . . . . . . . . . . . . 32 | |||
B.1. Content-Disposition . . . . . . . . . . . . . . . . . . . 31 | B.1. Content-Disposition . . . . . . . . . . . . . . . . . . . 32 | |||
Appendix C. Compatibility with Previous Versions . . . . . . . . 32 | Appendix C. Compatibility with Previous Versions . . . . . . . . 33 | |||
C.1. Changes from RFC 2068 . . . . . . . . . . . . . . . . . . 32 | C.1. Changes from RFC 2068 . . . . . . . . . . . . . . . . . . 33 | |||
C.2. Changes from RFC 2616 . . . . . . . . . . . . . . . . . . 33 | C.2. Changes from RFC 2616 . . . . . . . . . . . . . . . . . . 33 | |||
Appendix D. Change Log (to be removed by RFC Editor before | Appendix D. Change Log (to be removed by RFC Editor before | |||
publication) . . . . . . . . . . . . . . . . . . . . 33 | publication) . . . . . . . . . . . . . . . . . . . . 34 | |||
D.1. Since RFC2616 . . . . . . . . . . . . . . . . . . . . . . 33 | D.1. Since RFC2616 . . . . . . . . . . . . . . . . . . . . . . 34 | |||
D.2. Since draft-ietf-httpbis-p3-payload-00 . . . . . . . . . . 33 | D.2. Since draft-ietf-httpbis-p3-payload-00 . . . . . . . . . . 34 | |||
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 | D.3. Since draft-ietf-httpbis-p3-payload-01 . . . . . . . . . . 35 | |||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 36 | Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 | |||
Intellectual Property and Copyright Statements . . . . . . . . . . 39 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 37 | |||
Intellectual Property and Copyright Statements . . . . . . . . . . 40 | ||||
1. Introduction | 1. Introduction | |||
This document defines HTTP/1.1 message payloads (a.k.a., content), | This document defines HTTP/1.1 message payloads (a.k.a., content), | |||
the associated metadata header fields that define how the payload is | the associated metadata header fields that define how the payload is | |||
intended to be interpreted by a recipient, the request header fields | intended to be interpreted by a recipient, the request header fields | |||
that may influence content selection, and the various selection | that may influence content selection, and the various selection | |||
algorithms that are collectively referred to as HTTP content | algorithms that are collectively referred to as HTTP content | |||
negotiation. | negotiation. | |||
skipping to change at page 5, line 39 | skipping to change at page 5, line 39 | |||
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." | |||
2. Protocol Parameters | 2. Notational Conventions and Generic Grammar | |||
2.1. Character Sets | This specification uses the ABNF syntax defined in Section 2.1 of | |||
[Part1] and the core rules defined in Section 2.2 of [Part1]: | ||||
[[abnf.dep: ABNF syntax and basic rules will be adopted from RFC | ||||
5234, see <http://tools.ietf.org/wg/httpbis/trac/ticket/36>.]] | ||||
ALPHA = <ALPHA, defined in [Part1], Section 2.2> | ||||
DIGIT = <DIGIT, defined in [Part1], Section 2.2> | ||||
OCTET = <OCTET, defined in [Part1], Section 2.2> | ||||
quoted-string = <quoted-string, defined in [Part1], Section 2.2> | ||||
token = <token, defined in [Part1], Section 2.2> | ||||
The ABNF rules below are defined in other parts: | ||||
absoluteURI = <absoluteURI, defined in [Part1], Section 3.2.1> | ||||
Content-Length = <Content-Length, defined in [Part1], Section 8.2> | ||||
relativeURI = <relativeURI, defined in [Part1], Section 3.2.1> | ||||
message-header = <message-header, defined in [Part1], Section 4.2> | ||||
Allow = <Allow, defined in [Part2], Section 10.1> | ||||
Last-Modified = <Last-Modified, defined in [Part4], Section 7.6> | ||||
Content-Range = <Content-Range, defined in [Part5], Section 6.2> | ||||
Expires = <Expires, defined in [Part6], Section 16.3> | ||||
3. Protocol Parameters | ||||
3.1. Character Sets | ||||
HTTP uses the same definition of the term "character set" as that | HTTP uses the same definition of the term "character set" as that | |||
described for MIME: | described for MIME: | |||
The term "character set" is used in this document to refer to a | The term "character set" is used in this document to refer to a | |||
method used with one or more tables to convert a sequence of octets | method used with one or more tables to convert a sequence of octets | |||
into a sequence of characters. Note that unconditional conversion in | into a sequence of characters. Note that unconditional conversion in | |||
the other direction is not required, in that not all characters may | the other direction is not required, in that not all characters may | |||
be available in a given character set and a character set may provide | be available in a given character set and a character set may provide | |||
more than one sequence of octets to represent a particular character. | more than one sequence of octets to represent a particular character. | |||
skipping to change at page 6, line 39 | skipping to change at page 7, line 26 | |||
HTTP uses charset in two contexts: within an Accept-Charset request | HTTP uses charset in two contexts: within an Accept-Charset request | |||
header (in which the charset value is an unquoted token) and as the | 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 | value of a parameter in a Content-Type header (within a request or | |||
response), in which case the parameter value of the charset parameter | response), in which case the parameter value of the charset parameter | |||
may be quoted. | may be quoted. | |||
Implementors should be aware of IETF character set requirements | Implementors should be aware of IETF character set requirements | |||
[RFC3629] [RFC2277]. | [RFC3629] [RFC2277]. | |||
2.1.1. Missing Charset | 3.1.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 ([ISO-8859-1]) and | parameter even when the charset is ISO-8859-1 ([ISO-8859-1]) and | |||
SHOULD do so when it is known that it will not confuse the recipient. | SHOULD do so when 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 | |||
an explicit charset parameter. HTTP/1.1 recipients MUST respect the | an explicit charset parameter. HTTP/1.1 recipients MUST respect the | |||
charset label provided by the sender; and those user agents that have | charset label provided by the sender; and those user agents that have | |||
a provision to "guess" a charset MUST use the charset from the | a provision to "guess" a charset MUST use the charset from the | |||
content-type field if they support that charset, rather than the | content-type field if they support that charset, rather than the | |||
recipient's preference, when initially displaying a document. See | recipient's preference, when initially displaying a document. See | |||
Section 2.3.1. | Section 3.3.1. | |||
2.2. Content Codings | 3.2. Content Codings | |||
Content coding values indicate an encoding transformation that has | Content coding values indicate an encoding transformation that has | |||
been or can be applied to an entity. Content codings are primarily | been or can be applied to an entity. Content codings are primarily | |||
used to allow a document to be compressed or otherwise usefully | used to allow a document to be compressed or otherwise usefully | |||
transformed without losing the identity of its underlying media type | transformed without losing the identity of its underlying media type | |||
and without loss of information. Frequently, the entity is stored in | and without loss of information. Frequently, the entity is stored in | |||
coded form, transmitted directly, and only decoded by the recipient. | coded form, transmitted directly, and only decoded by the recipient. | |||
content-coding = token | content-coding = token | |||
All content-coding values are case-insensitive. HTTP/1.1 uses | All content-coding values are case-insensitive. HTTP/1.1 uses | |||
content-coding values in the Accept-Encoding (Section 5.3) and | content-coding values in the Accept-Encoding (Section 6.3) and | |||
Content-Encoding (Section 5.5) header fields. Although the value | Content-Encoding (Section 6.5) header fields. Although the value | |||
describes the content-coding, what is more important is that it | describes the content-coding, what is more important is that it | |||
indicates what decoding mechanism will be required to remove the | indicates what decoding mechanism will be required to remove the | |||
encoding. | encoding. | |||
The Internet Assigned Numbers Authority (IANA) acts as a registry for | The Internet Assigned Numbers Authority (IANA) acts as a registry for | |||
content-coding value tokens. Initially, the registry contains the | content-coding value tokens. Initially, the registry contains the | |||
following tokens: | following tokens: | |||
gzip | gzip | |||
skipping to change at page 8, line 18 | skipping to change at page 9, line 5 | |||
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. | |||
2.3. Media Types | 3.3. Media Types | |||
HTTP uses Internet Media Types [RFC2046] in the Content-Type | HTTP uses Internet Media Types [RFC2046] in the Content-Type | |||
(Section 5.9) and Accept (Section 5.1) header fields in order to | (Section 6.9) and Accept (Section 6.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. | pairs. | |||
parameter = attribute "=" value | parameter = attribute "=" value | |||
skipping to change at page 9, line 5 | skipping to change at page 9, line 39 | |||
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). The media type registration process is outlined in | Authority (IANA). The media type registration process is outlined in | |||
[RFC4288]. Use of non-registered media types is discouraged. | [RFC4288]. Use of non-registered media types is discouraged. | |||
2.3.1. Canonicalization and Text Defaults | 3.3.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 | |||
transport of text media with plain CR or LF alone representing a line | transport of text media with plain CR or LF alone representing a line | |||
break when it is done consistently for an entire entity-body. HTTP | break when it is done consistently for an entire entity-body. HTTP | |||
skipping to change at page 9, line 31 | skipping to change at page 10, line 16 | |||
sequences are defined by that character set to represent the | sequences are defined by that character set to represent the | |||
equivalent of CR and LF for line breaks. This flexibility regarding | equivalent of CR and LF for line breaks. This flexibility regarding | |||
line breaks applies only to text media in the entity-body; a bare CR | line breaks applies only to text media in the entity-body; a bare CR | |||
or LF MUST NOT be substituted for CRLF within any of the HTTP control | or LF MUST NOT be substituted for CRLF within any of the HTTP control | |||
structures (such as header fields and multipart boundaries). | structures (such as header fields and multipart boundaries). | |||
If an entity-body is encoded with a content-coding, the underlying | If an entity-body is encoded with a content-coding, the underlying | |||
data MUST be in a form defined above prior to being encoded. | data MUST be in a form defined above prior to being encoded. | |||
The "charset" parameter is used with some media types to define the | The "charset" parameter is used with some media types to define the | |||
character set (Section 2.1) of the data. When no explicit charset | character set (Section 3.1) of the data. When no explicit charset | |||
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 2.1.1 for compatibility problems. | Section 3.1.1 for compatibility problems. | |||
2.3.2. Multipart Types | 3.3.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 | types share a common syntax, as defined in Section 5.1.1 of | |||
[RFC2046], and MUST include a boundary parameter as part of the media | [RFC2046], and MUST include a boundary parameter as part of the media | |||
type 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 | |||
skipping to change at page 10, line 23 | skipping to change at page 11, line 9 | |||
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 [RFC2388]. | request method, as described in [RFC2388]. | |||
2.4. Quality Values | 3.4. Quality Values | |||
HTTP content negotiation (Section 4) uses short "floating point" | HTTP content negotiation (Section 5) uses short "floating point" | |||
numbers to indicate the relative importance ("weight") of various | numbers to indicate the relative importance ("weight") of various | |||
negotiable parameters. A weight is normalized to a real number in | negotiable parameters. A weight is normalized to a real number in | |||
the range 0 through 1, where 0 is the minimum and 1 the maximum | the range 0 through 1, where 0 is the minimum and 1 the maximum | |||
value. If a parameter has a quality value of 0, then content with | value. If a parameter has a quality value of 0, then content with | |||
this parameter is `not acceptable' for the client. HTTP/1.1 | this parameter is `not acceptable' for the client. HTTP/1.1 | |||
applications MUST NOT generate more than three digits after the | applications MUST NOT generate more than three digits after the | |||
decimal point. User configuration of these values SHOULD also be | decimal point. User configuration of these values SHOULD also be | |||
limited in this fashion. | limited in this fashion. | |||
qvalue = ( "0" [ "." 0*3DIGIT ] ) | qvalue = ( "0" [ "." 0*3DIGIT ] ) | |||
| ( "1" [ "." 0*3("0") ] ) | | ( "1" [ "." 0*3("0") ] ) | |||
"Quality values" is a misnomer, since these values merely represent | "Quality values" is a misnomer, since these values merely represent | |||
relative degradation in desired quality. | relative degradation in desired quality. | |||
2.5. Language Tags | 3.5. 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 [RFC1766]. In summary, a language tag is composed of 1 or | defined by [RFC1766]. In summary, a language tag is composed of 1 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 | |||
skipping to change at page 11, line 20 | skipping to change at page 12, line 6 | |||
insensitive. The name space of language tags is administered by the | insensitive. The name space of language tags is administered by the | |||
IANA. Example tags include: | IANA. Example tags include: | |||
en, en-US, en-cockney, i-cherokee, x-pig-latin | en, en-US, en-cockney, i-cherokee, x-pig-latin | |||
where any two-letter primary-tag is an ISO-639 language abbreviation | where any two-letter primary-tag is an ISO-639 language abbreviation | |||
and any two-letter initial subtag is an ISO-3166 country code. (The | and any two-letter initial subtag is an ISO-3166 country code. (The | |||
last three tags above are not registered tags; all but the last are | last three tags above are not registered tags; all but the last are | |||
examples of tags which could be registered in future.) | examples of tags which could be registered in future.) | |||
3. Entity | 4. Entity | |||
Request and Response messages MAY transfer an entity if not otherwise | Request and Response messages MAY transfer an entity if not otherwise | |||
restricted by the request method or response status code. An entity | restricted by the request method or response status code. An entity | |||
consists of entity-header fields and an entity-body, although some | consists of entity-header fields and an entity-body, although some | |||
responses will only include the entity-headers. | responses will only include the entity-headers. | |||
In this section, both sender and recipient refer to either the client | In this section, both sender and recipient refer to either the client | |||
or the server, depending on who sends and who receives the entity. | or the server, depending on who sends and who receives the entity. | |||
3.1. Entity Header Fields | 4.1. Entity Header Fields | |||
Entity-header fields define metainformation about the entity-body or, | Entity-header fields define metainformation about the entity-body or, | |||
if no body is present, about the resource identified by the request. | if no body is present, about the resource identified by the request. | |||
entity-header = Allow ; [Part2], Section 10.1 | entity-header = Allow ; [Part2], Section 10.1 | |||
| Content-Encoding ; Section 5.5 | | Content-Encoding ; Section 6.5 | |||
| Content-Language ; Section 5.6 | | Content-Language ; Section 6.6 | |||
| Content-Length ; [Part1], Section 8.2 | | Content-Length ; [Part1], Section 8.2 | |||
| Content-Location ; Section 5.7 | | Content-Location ; Section 6.7 | |||
| Content-MD5 ; Section 5.8 | | Content-MD5 ; Section 6.8 | |||
| Content-Range ; [Part5], Section 5.2 | | Content-Range ; [Part5], Section 6.2 | |||
| Content-Type ; Section 5.9 | | Content-Type ; Section 6.9 | |||
| Expires ; [Part6], Section 15.3 | | Expires ; [Part6], Section 16.3 | |||
| Last-Modified ; [Part4], Section 6.6 | | Last-Modified ; [Part4], Section 7.6 | |||
| extension-header | | extension-header | |||
extension-header = message-header | extension-header = message-header | |||
The extension-header mechanism allows additional entity-header fields | The extension-header mechanism allows additional entity-header fields | |||
to be defined without changing the protocol, but these fields cannot | to be defined without changing the protocol, but these fields cannot | |||
be assumed to be recognizable by the recipient. Unrecognized header | be assumed to be recognizable by the recipient. Unrecognized header | |||
fields SHOULD be ignored by the recipient and MUST be forwarded by | fields SHOULD be ignored by the recipient and MUST be forwarded by | |||
transparent proxies. | transparent proxies. | |||
3.2. Entity Body | 4.2. Entity Body | |||
The entity-body (if any) sent with an HTTP request or response is in | The entity-body (if any) sent with an HTTP request or response is in | |||
a format and encoding defined by the entity-header fields. | a format and encoding defined by the entity-header fields. | |||
entity-body = *OCTET | entity-body = *OCTET | |||
An entity-body is only present in a message when a message-body is | An entity-body is only present in a message when a message-body is | |||
present, as described in Section 4.3 of [Part1]. The entity-body is | present, as described in Section 4.3 of [Part1]. The entity-body is | |||
obtained from the message-body by decoding any Transfer-Encoding that | obtained from the message-body by decoding any Transfer-Encoding that | |||
might have been applied to ensure safe and proper transfer of the | might have been applied to ensure safe and proper transfer of the | |||
message. | message. | |||
3.2.1. Type | 4.2.1. Type | |||
When an entity-body is included with a message, the data type of that | When an entity-body is included with a message, the data type of that | |||
body is determined via the header fields Content-Type and Content- | body is determined via the header fields Content-Type and Content- | |||
Encoding. These define a two-layer, ordered encoding model: | Encoding. These define a two-layer, ordered encoding model: | |||
entity-body := Content-Encoding( Content-Type( data ) ) | entity-body := Content-Encoding( Content-Type( data ) ) | |||
Content-Type specifies the media type of the underlying data. | Content-Type specifies the media type of the underlying data. | |||
Content-Encoding may be used to indicate any additional content | Content-Encoding may be used to indicate any additional content | |||
codings applied to the data, usually for the purpose of data | codings applied to the data, usually for the purpose of data | |||
skipping to change at page 12, line 42 | skipping to change at page 13, line 29 | |||
no default encoding. | no default encoding. | |||
Any HTTP/1.1 message containing an entity-body SHOULD include a | Any HTTP/1.1 message containing an entity-body SHOULD include a | |||
Content-Type header field defining the media type of that body. If | Content-Type header field defining the media type of that body. If | |||
and only if the media type is not given by a Content-Type field, the | and only if the media type is not given by a Content-Type field, the | |||
recipient MAY attempt to guess the media type via inspection of its | recipient MAY attempt to guess the media type via inspection of its | |||
content and/or the name extension(s) of the URI used to identify the | content and/or the name extension(s) of the URI used to identify the | |||
resource. If the media type remains unknown, the recipient SHOULD | resource. If the media type remains unknown, the recipient SHOULD | |||
treat it as type "application/octet-stream". | treat it as type "application/octet-stream". | |||
3.2.2. Entity Length | 4.2.2. Entity Length | |||
The entity-length of a message is the length of the message-body | The entity-length of a message is the length of the message-body | |||
before any transfer-codings have been applied. Section 4.4 of | before any transfer-codings have been applied. Section 4.4 of | |||
[Part1] defines how the transfer-length of a message-body is | [Part1] defines how the transfer-length of a message-body is | |||
determined. | determined. | |||
4. Content Negotiation | 5. 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" -- | |||
the process of selecting the best representation for a given response | the process of selecting the best representation for a given response | |||
when there are multiple representations available. | when there are multiple representations available. | |||
skipping to change at page 13, line 33 | skipping to change at page 14, line 17 | |||
including error responses. | including error responses. | |||
There are two kinds of content negotiation which are possible in | There are two kinds of content negotiation which are possible in | |||
HTTP: server-driven and agent-driven negotiation. These two kinds of | HTTP: server-driven and agent-driven negotiation. These two kinds of | |||
negotiation are orthogonal and thus may be used separately or in | negotiation are orthogonal and thus may be used separately or in | |||
combination. One method of combination, referred to as transparent | combination. One method of combination, referred to as transparent | |||
negotiation, occurs when a cache uses the agent-driven negotiation | negotiation, occurs when a cache uses the agent-driven negotiation | |||
information provided by the origin server in order to provide server- | information provided by the origin server in order to provide server- | |||
driven negotiation for subsequent requests. | driven negotiation for subsequent requests. | |||
4.1. Server-driven Negotiation | 5.1. Server-driven Negotiation | |||
If the selection of the best representation for a response is made by | If the selection of the best representation for a response is made by | |||
an algorithm located at the server, it is called server-driven | an algorithm located at the server, it is called server-driven | |||
negotiation. Selection is based on the available representations of | negotiation. Selection is based on the available representations of | |||
the response (the dimensions over which it can vary; e.g. language, | the response (the dimensions over which it can vary; e.g. language, | |||
content-coding, etc.) and the contents of particular header fields in | content-coding, etc.) and the contents of particular header fields in | |||
the request message or on other information pertaining to the request | the request message or on other information pertaining to the request | |||
(such as the network address of the client). | (such as the network address of the client). | |||
Server-driven negotiation is advantageous when the algorithm for | Server-driven negotiation is advantageous when the algorithm for | |||
skipping to change at page 14, line 26 | skipping to change at page 15, line 10 | |||
violation of the user's privacy. | violation of the user's privacy. | |||
3. It complicates the implementation of an origin server and the | 3. It complicates the implementation of an origin server and the | |||
algorithms for generating responses to a request. | algorithms for generating responses to a request. | |||
4. It may limit a public cache's ability to use the same response | 4. It may limit a public cache's ability to use the same response | |||
for multiple user's requests. | for multiple user's requests. | |||
HTTP/1.1 includes the following request-header fields for enabling | HTTP/1.1 includes the following request-header fields for enabling | |||
server-driven negotiation through description of user agent | server-driven negotiation through description of user agent | |||
capabilities and user preferences: Accept (Section 5.1), Accept- | capabilities and user preferences: Accept (Section 6.1), Accept- | |||
Charset (Section 5.2), Accept-Encoding (Section 5.3), Accept-Language | Charset (Section 6.2), Accept-Encoding (Section 6.3), Accept-Language | |||
(Section 5.4), and User-Agent (Section 10.9 of [Part2]). However, an | (Section 6.4), and User-Agent (Section 10.9 of [Part2]). However, an | |||
origin server is not limited to these dimensions and MAY vary the | origin server is not limited to these dimensions and MAY vary the | |||
response based on any aspect of the request, including information | response based on any aspect of the request, including information | |||
outside the request-header fields or within extension header fields | outside the request-header fields or within extension header fields | |||
not defined by this specification. | not defined by this specification. | |||
The Vary header field (Section 15.5 of [Part6]) can be used to | The Vary header field (Section 16.5 of [Part6]) can be used to | |||
express the parameters the server uses to select a representation | express the parameters the server uses to select a representation | |||
that is subject to server-driven negotiation. | that is subject to server-driven negotiation. | |||
4.2. Agent-driven Negotiation | 5.2. Agent-driven Negotiation | |||
With agent-driven negotiation, selection of the best representation | With agent-driven negotiation, selection of the best representation | |||
for a response is performed by the user agent after receiving an | for a response is performed by the user agent after receiving an | |||
initial response from the origin server. Selection is based on a | initial response from the origin server. Selection is based on a | |||
list of the available representations of the response included within | list of the available representations of the response included within | |||
the header fields or entity-body of the initial response, with each | the header fields or entity-body of the initial response, with each | |||
representation identified by its own URI. Selection from among the | representation identified by its own URI. Selection from among the | |||
representations may be performed automatically (if the user agent is | representations may be performed automatically (if the user agent is | |||
capable of doing so) or manually by the user selecting from a | capable of doing so) or manually by the user selecting from a | |||
generated (possibly hypertext) menu. | generated (possibly hypertext) menu. | |||
skipping to change at page 15, line 20 | skipping to change at page 16, line 5 | |||
this specification does not define any mechanism for supporting | this specification does not define any mechanism for supporting | |||
automatic selection, though it also does not prevent any such | automatic selection, though it also does not prevent any such | |||
mechanism from being developed as an extension and used within | mechanism from being developed as an extension and used within | |||
HTTP/1.1. | HTTP/1.1. | |||
HTTP/1.1 defines the 300 (Multiple Choices) and 406 (Not Acceptable) | HTTP/1.1 defines the 300 (Multiple Choices) and 406 (Not Acceptable) | |||
status codes for enabling agent-driven negotiation when the server is | status codes for enabling agent-driven negotiation when the server is | |||
unwilling or unable to provide a varying response using server-driven | unwilling or unable to provide a varying response using server-driven | |||
negotiation. | negotiation. | |||
4.3. Transparent Negotiation | 5.3. Transparent Negotiation | |||
Transparent negotiation is a combination of both server-driven and | Transparent negotiation is a combination of both server-driven and | |||
agent-driven negotiation. When a cache is supplied with a form of | agent-driven negotiation. When a cache is supplied with a form of | |||
the list of available representations of the response (as in agent- | the list of available representations of the response (as in agent- | |||
driven negotiation) and the dimensions of variance are completely | driven negotiation) and the dimensions of variance are completely | |||
understood by the cache, then the cache becomes capable of performing | understood by the cache, then the cache becomes capable of performing | |||
server-driven negotiation on behalf of the origin server for | server-driven negotiation on behalf of the origin server for | |||
subsequent requests on that resource. | subsequent requests on that resource. | |||
Transparent negotiation has the advantage of distributing the | Transparent negotiation has the advantage of distributing the | |||
negotiation work that would otherwise be required of the origin | negotiation work that would otherwise be required of the origin | |||
server and also removing the second request delay of agent-driven | server and also removing the second request delay of agent-driven | |||
negotiation when the cache is able to correctly guess the right | negotiation when the cache is able to correctly guess the right | |||
response. | response. | |||
This specification does not define any mechanism for transparent | This specification does not define any mechanism for transparent | |||
negotiation, though it also does not prevent any such mechanism from | negotiation, though it also does not prevent any such mechanism from | |||
being developed as an extension that could be used within HTTP/1.1. | being developed as an extension that could be used within HTTP/1.1. | |||
5. Header Field Definitions | 6. Header Field Definitions | |||
This section defines the syntax and semantics of HTTP/1.1 header | This section defines the syntax and semantics of HTTP/1.1 header | |||
fields related to the payload of messages. | fields related to the payload of messages. | |||
For entity-header fields, both sender and recipient refer to either | For entity-header fields, both sender and recipient refer to either | |||
the client or the server, depending on who sends and who receives the | the client or the server, depending on who sends and who receives the | |||
entity. | entity. | |||
5.1. Accept | 6.1. Accept | |||
The Accept request-header field can be used to specify certain media | The Accept request-header field can be used to specify certain media | |||
types which are acceptable for the response. Accept headers can be | types which are acceptable for the response. Accept headers can be | |||
used to indicate that the request is specifically limited to a small | used to indicate that the request is specifically limited to a small | |||
set of desired types, as in the case of a request for an in-line | set of desired types, as in the case of a request for an in-line | |||
image. | image. | |||
Accept = "Accept" ":" | Accept = "Accept" ":" | |||
#( media-range [ accept-params ] ) | #( media-range [ accept-params ] ) | |||
skipping to change at page 16, line 33 | skipping to change at page 17, line 14 | |||
The asterisk "*" character is used to group media types into ranges, | The asterisk "*" character is used to group media types into ranges, | |||
with "*/*" indicating all media types and "type/*" indicating all | with "*/*" indicating all media types and "type/*" indicating all | |||
subtypes of that type. The media-range MAY include media type | subtypes of that type. The media-range MAY include media type | |||
parameters that are applicable to that range. | parameters that are applicable to that range. | |||
Each media-range MAY be followed by one or more accept-params, | Each media-range MAY be followed by one or more accept-params, | |||
beginning with the "q" parameter for indicating a relative quality | beginning with the "q" parameter for indicating a relative quality | |||
factor. The first "q" parameter (if any) separates the media-range | factor. The first "q" parameter (if any) separates the media-range | |||
parameter(s) from the accept-params. Quality factors allow the user | parameter(s) from the accept-params. Quality factors allow the user | |||
or user agent to indicate the relative degree of preference for that | or user agent to indicate the relative degree of preference for that | |||
media-range, using the qvalue scale from 0 to 1 (Section 2.4). The | media-range, using the qvalue scale from 0 to 1 (Section 3.4). The | |||
default value is q=1. | default value is q=1. | |||
Note: Use of the "q" parameter name to separate media type | Note: Use of the "q" parameter name to separate media type | |||
parameters from Accept extension parameters is due to historical | parameters from Accept extension parameters is due to historical | |||
practice. Although this prevents any media type parameter named | practice. Although this prevents any media type parameter named | |||
"q" from being used with a media range, such an event is believed | "q" from being used with a media range, such an event is believed | |||
to be unlikely given the lack of any "q" parameters in the IANA | to be unlikely given the lack of any "q" parameters in the IANA | |||
media type registry and the rare usage of any media type | media type registry and the rare usage of any media type | |||
parameters in Accept. Future media types are discouraged from | parameters in Accept. Future media types are discouraged from | |||
registering any parameter named "q". | registering any parameter named "q". | |||
skipping to change at page 18, line 5 | skipping to change at page 18, line 34 | |||
text/plain = 0.3 | text/plain = 0.3 | |||
image/jpeg = 0.5 | image/jpeg = 0.5 | |||
text/html;level=2 = 0.4 | text/html;level=2 = 0.4 | |||
text/html;level=3 = 0.7 | text/html;level=3 = 0.7 | |||
Note: A user agent might be provided with a default set of quality | Note: A user agent might be provided with a default set of quality | |||
values for certain media ranges. However, unless the user agent is a | values for certain media ranges. However, unless the user agent is a | |||
closed system which cannot interact with other rendering agents, this | closed system which cannot interact with other rendering agents, this | |||
default set ought to be configurable by the user. | default set ought to be configurable by the user. | |||
5.2. Accept-Charset | 6.2. Accept-Charset | |||
The Accept-Charset request-header field can be used to indicate what | The Accept-Charset request-header field can be used to indicate what | |||
character sets are acceptable for the response. This field allows | character sets are acceptable for the response. This field allows | |||
clients capable of understanding more comprehensive or special- | clients capable of understanding more comprehensive or special- | |||
purpose character sets to signal that capability to a server which is | purpose character sets to signal that capability to a server which is | |||
capable of representing documents in those character sets. | capable of representing documents in those character sets. | |||
Accept-Charset = "Accept-Charset" ":" | Accept-Charset = "Accept-Charset" ":" | |||
1#( ( charset | "*" ) [ ";" "q" "=" qvalue ] ) | 1#( ( charset | "*" ) [ ";" "q" "=" qvalue ] ) | |||
Character set values are described in Section 2.1. Each charset MAY | Character set values are described in Section 3.1. Each charset MAY | |||
be given an associated quality value which represents the user's | be given an associated quality value which represents the user's | |||
preference for that charset. The default value is q=1. An example | preference for that charset. The default value is q=1. An example | |||
is | is | |||
Accept-Charset: iso-8859-5, unicode-1-1;q=0.8 | Accept-Charset: iso-8859-5, unicode-1-1;q=0.8 | |||
The special value "*", if present in the Accept-Charset field, | The special value "*", if present in the Accept-Charset field, | |||
matches every character set (including ISO-8859-1) which is not | matches every character set (including ISO-8859-1) which is not | |||
mentioned elsewhere in the Accept-Charset field. If no "*" is | mentioned elsewhere in the Accept-Charset field. If no "*" is | |||
present in an Accept-Charset field, then all character sets not | present in an Accept-Charset field, then all character sets not | |||
explicitly mentioned get a quality value of 0, except for ISO-8859-1, | explicitly mentioned get a quality value of 0, except for ISO-8859-1, | |||
which gets a quality value of 1 if not explicitly mentioned. | which gets a quality value of 1 if not explicitly mentioned. | |||
If no Accept-Charset header is present, the default is that any | If no Accept-Charset header is present, the default is that any | |||
character set is acceptable. If an Accept-Charset header is present, | character set is acceptable. If an Accept-Charset header is present, | |||
and if the server cannot send a response which is acceptable | and if the server cannot send a response which is acceptable | |||
skipping to change at page 18, line 37 | skipping to change at page 19, line 18 | |||
explicitly mentioned get a quality value of 0, except for ISO-8859-1, | explicitly mentioned get a quality value of 0, except for ISO-8859-1, | |||
which gets a quality value of 1 if not explicitly mentioned. | which gets a quality value of 1 if not explicitly mentioned. | |||
If no Accept-Charset header is present, the default is that any | If no Accept-Charset header is present, the default is that any | |||
character set is acceptable. If an Accept-Charset header is present, | character set is acceptable. If an Accept-Charset header is present, | |||
and if the server cannot send a response which is acceptable | and if the server cannot send a response which is acceptable | |||
according to the Accept-Charset header, then the server SHOULD send | according to the Accept-Charset header, then the server SHOULD send | |||
an error response with the 406 (Not Acceptable) status code, though | an error response with the 406 (Not Acceptable) status code, though | |||
the sending of an unacceptable response is also allowed. | the sending of an unacceptable response is also allowed. | |||
5.3. Accept-Encoding | 6.3. Accept-Encoding | |||
The Accept-Encoding request-header field is similar to Accept, but | The Accept-Encoding request-header field is similar to Accept, but | |||
restricts the content-codings (Section 2.2) that are acceptable in | restricts the content-codings (Section 3.2) that are acceptable in | |||
the response. | the response. | |||
Accept-Encoding = "Accept-Encoding" ":" | Accept-Encoding = "Accept-Encoding" ":" | |||
#( codings [ ";" "q" "=" qvalue ] ) | #( codings [ ";" "q" "=" qvalue ] ) | |||
codings = ( content-coding | "*" ) | codings = ( content-coding | "*" ) | |||
Examples of its use are: | Examples of its use are: | |||
Accept-Encoding: compress, gzip | Accept-Encoding: compress, gzip | |||
Accept-Encoding: | Accept-Encoding: | |||
Accept-Encoding: * | Accept-Encoding: * | |||
Accept-Encoding: compress;q=0.5, gzip;q=1.0 | Accept-Encoding: compress;q=0.5, gzip;q=1.0 | |||
Accept-Encoding: gzip;q=1.0, identity; q=0.5, *;q=0 | Accept-Encoding: gzip;q=1.0, identity; q=0.5, *;q=0 | |||
A server tests whether a content-coding is acceptable, according to | A server tests whether a content-coding is acceptable, according to | |||
an Accept-Encoding field, using these rules: | an Accept-Encoding field, using these rules: | |||
1. If the content-coding is one of the content-codings listed in the | 1. If the content-coding is one of the content-codings listed in the | |||
Accept-Encoding field, then it is acceptable, unless it is | Accept-Encoding field, then it is acceptable, unless it is | |||
accompanied by a qvalue of 0. (As defined in Section 2.4, a | accompanied by a qvalue of 0. (As defined in Section 3.4, a | |||
qvalue of 0 means "not acceptable.") | qvalue of 0 means "not acceptable.") | |||
2. The special "*" symbol in an Accept-Encoding field matches any | 2. The special "*" symbol in an Accept-Encoding field matches any | |||
available content-coding not explicitly listed in the header | available content-coding not explicitly listed in the header | |||
field. | field. | |||
3. If multiple content-codings are acceptable, then the acceptable | 3. If multiple content-codings are acceptable, then the acceptable | |||
content-coding with the highest non-zero qvalue is preferred. | content-coding with the highest non-zero qvalue is preferred. | |||
4. The "identity" content-coding is always acceptable, unless | 4. The "identity" content-coding is always acceptable, unless | |||
skipping to change at page 20, line 5 | skipping to change at page 20, line 36 | |||
codings commonly understood by HTTP/1.0 clients (i.e., "gzip" and | codings commonly understood by HTTP/1.0 clients (i.e., "gzip" and | |||
"compress") are preferred; some older clients improperly display | "compress") are preferred; some older clients improperly display | |||
messages sent with other content-codings. The server might also | messages sent with other content-codings. The server might also | |||
make this decision based on information about the particular user- | make this decision based on information about the particular user- | |||
agent or client. | agent or client. | |||
Note: Most HTTP/1.0 applications do not recognize or obey qvalues | Note: Most HTTP/1.0 applications do not recognize or obey qvalues | |||
associated with content-codings. This means that qvalues will not | associated with content-codings. This means that qvalues will not | |||
work and are not permitted with x-gzip or x-compress. | work and are not permitted with x-gzip or x-compress. | |||
5.4. Accept-Language | 6.4. Accept-Language | |||
The Accept-Language request-header field is similar to Accept, but | The Accept-Language request-header field is similar to Accept, but | |||
restricts the set of natural languages that are preferred as a | restricts the set of natural languages that are preferred as a | |||
response to the request. Language tags are defined in Section 2.5. | response to the request. Language tags are defined in Section 3.5. | |||
Accept-Language = "Accept-Language" ":" | Accept-Language = "Accept-Language" ":" | |||
1#( language-range [ ";" "q" "=" qvalue ] ) | 1#( language-range [ ";" "q" "=" qvalue ] ) | |||
language-range = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) | "*" ) | language-range = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) | "*" ) | |||
Each language-range MAY be given an associated quality value which | Each language-range MAY be given an associated quality value which | |||
represents an estimate of the user's preference for the languages | represents an estimate of the user's preference for the languages | |||
specified by that range. The quality value defaults to "q=1". For | specified by that range. The quality value defaults to "q=1". For | |||
example, | example, | |||
skipping to change at page 20, line 49 | skipping to change at page 21, line 31 | |||
the field that matches the language-tag. If no language-range in the | the field that matches the language-tag. If no language-range in the | |||
field matches the tag, the language quality factor assigned is 0. If | field matches the tag, the language quality factor assigned is 0. If | |||
no Accept-Language header is present in the request, the server | no Accept-Language header is present in the request, the server | |||
SHOULD assume that all languages are equally acceptable. If an | SHOULD assume that all languages are equally acceptable. If an | |||
Accept-Language header is present, then all languages which are | Accept-Language header is present, then all languages which are | |||
assigned a quality factor greater than 0 are acceptable. | assigned a quality factor greater than 0 are acceptable. | |||
It might be contrary to the privacy expectations of the user to send | It might be contrary to the privacy expectations of the user to send | |||
an Accept-Language header with the complete linguistic preferences of | an Accept-Language header with the complete linguistic preferences of | |||
the user in every request. For a discussion of this issue, see | the user in every request. For a discussion of this issue, see | |||
Section 7.1. | Section 8.1. | |||
As intelligibility is highly dependent on the individual user, it is | As intelligibility is highly dependent on the individual user, it is | |||
recommended that client applications make the choice of linguistic | recommended that client applications make the choice of linguistic | |||
preference available to the user. If the choice is not made | preference available to the user. If the choice is not made | |||
available, then the Accept-Language header field MUST NOT be given in | available, then the Accept-Language header field MUST NOT be given in | |||
the request. | the request. | |||
Note: When making the choice of linguistic preference available to | Note: When making the choice of linguistic preference available to | |||
the user, we remind implementors of the fact that users are not | the user, we remind implementors of the fact that users are not | |||
familiar with the details of language matching as described above, | familiar with the details of language matching as described above, | |||
and should provide appropriate guidance. As an example, users | and should provide appropriate guidance. As an example, users | |||
might assume that on selecting "en-gb", they will be served any | might assume that on selecting "en-gb", they will be served any | |||
kind of English document if British English is not available. A | kind of English document if British English is not available. A | |||
user agent might suggest in such a case to add "en" to get the | user agent might suggest in such a case to add "en" to get the | |||
best matching behavior. | best matching behavior. | |||
5.5. Content-Encoding | 6.5. Content-Encoding | |||
The Content-Encoding entity-header field is used as a modifier to the | The Content-Encoding entity-header field is used as a modifier to the | |||
media-type. When present, its value indicates what additional | media-type. When present, its value indicates what additional | |||
content codings have been applied to the entity-body, and thus what | content codings have been applied to the entity-body, and thus what | |||
decoding mechanisms must be applied in order to obtain the media-type | decoding mechanisms must be applied in order to obtain the media-type | |||
referenced by the Content-Type header field. Content-Encoding is | referenced by the Content-Type header field. Content-Encoding is | |||
primarily used to allow a document to be compressed without losing | primarily used to allow a document to be compressed without losing | |||
the identity of its underlying media type. | the identity of its underlying media type. | |||
Content-Encoding = "Content-Encoding" ":" 1#content-coding | Content-Encoding = "Content-Encoding" ":" 1#content-coding | |||
Content codings are defined in Section 2.2. An example of its use is | Content codings are defined in Section 3.2. An example of its use is | |||
Content-Encoding: gzip | Content-Encoding: gzip | |||
The content-coding is a characteristic of the entity identified by | The content-coding is a characteristic of the entity identified by | |||
the Request-URI. Typically, the entity-body is stored with this | the Request-URI. Typically, the entity-body is stored with this | |||
encoding and is only decoded before rendering or analogous usage. | encoding and is only decoded before rendering or analogous usage. | |||
However, a non-transparent proxy MAY modify the content-coding if the | However, a non-transparent proxy MAY modify the content-coding if the | |||
new coding is known to be acceptable to the recipient, unless the | new coding is known to be acceptable to the recipient, unless the | |||
"no-transform" cache-control directive is present in the message. | "no-transform" cache-control directive is present in the message. | |||
If the content-coding of an entity is not "identity", then the | If the content-coding of an entity is not "identity", then the | |||
response MUST include a Content-Encoding entity-header (Section 5.5) | response MUST include a Content-Encoding entity-header (Section 6.5) | |||
that lists the non-identity content-coding(s) used. | that lists the 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. | |||
5.6. Content-Language | 6.6. Content-Language | |||
The Content-Language entity-header field describes the natural | The Content-Language entity-header field describes the natural | |||
language(s) of the intended audience for the enclosed entity. Note | language(s) of the intended audience for the enclosed entity. Note | |||
that this might not be equivalent to all the languages used within | that this might not be equivalent to all the languages used within | |||
the entity-body. | the entity-body. | |||
Content-Language = "Content-Language" ":" 1#language-tag | Content-Language = "Content-Language" ":" 1#language-tag | |||
Language tags are defined in Section 2.5. The primary purpose of | Language tags are defined in Section 3.5. The primary purpose of | |||
Content-Language is to allow a user to identify and differentiate | Content-Language is to allow a user to identify and differentiate | |||
entities according to the user's own preferred language. Thus, if | entities according to the user's own preferred language. Thus, if | |||
the body content is intended only for a Danish-literate audience, the | the body content is intended only for a Danish-literate audience, the | |||
appropriate field is | appropriate field is | |||
Content-Language: da | Content-Language: da | |||
If no Content-Language is specified, the default is that the content | If no Content-Language is specified, the default is that the content | |||
is intended for all language audiences. This might mean that the | is intended for all language audiences. This might mean that the | |||
sender does not consider it to be specific to any natural language, | sender does not consider it to be specific to any natural language, | |||
skipping to change at page 22, line 44 | skipping to change at page 23, line 31 | |||
However, just because multiple languages are present within an entity | However, just because multiple languages are present within an entity | |||
does not mean that it is intended for multiple linguistic audiences. | does not mean that it is intended for multiple linguistic audiences. | |||
An example would be a beginner's language primer, such as "A First | An example would be a beginner's language primer, such as "A First | |||
Lesson in Latin," which is clearly intended to be used by an English- | Lesson in Latin," which is clearly intended to be used by an English- | |||
literate audience. In this case, the Content-Language would properly | literate audience. In this case, the Content-Language would properly | |||
only include "en". | only include "en". | |||
Content-Language MAY be applied to any media type -- it is not | Content-Language MAY be applied to any media type -- it is not | |||
limited to textual documents. | limited to textual documents. | |||
5.7. Content-Location | 6.7. Content-Location | |||
The Content-Location entity-header field MAY be used to supply the | The Content-Location entity-header field MAY be used to supply the | |||
resource location for the entity enclosed in the message when that | resource location for the entity enclosed in the message when that | |||
entity is accessible from a location separate from the requested | entity is accessible from a location separate from the requested | |||
resource's URI. A server SHOULD provide a Content-Location for the | resource's URI. A server SHOULD provide a Content-Location for the | |||
variant corresponding to the response entity; especially in the case | variant corresponding to the response entity; especially in the case | |||
where a resource has multiple entities associated with it, and those | where a resource has multiple entities associated with it, and those | |||
entities actually have separate locations by which they might be | entities actually have separate locations by which they might be | |||
individually accessed, the server SHOULD provide a Content-Location | individually accessed, the server SHOULD provide a Content-Location | |||
for the particular variant which is returned. | for the particular variant which is returned. | |||
skipping to change at page 23, line 16 | skipping to change at page 24, line 4 | |||
Content-Location = "Content-Location" ":" | Content-Location = "Content-Location" ":" | |||
( absoluteURI | relativeURI ) | ( absoluteURI | relativeURI ) | |||
The value of Content-Location also defines the base URI for the | The value of Content-Location also defines the base URI for the | |||
entity. | entity. | |||
The Content-Location value is not a replacement for the original | The Content-Location value is not a replacement for the original | |||
requested URI; it is only a statement of the location of the resource | requested URI; it is only a statement of the location of the resource | |||
corresponding to this particular entity at the time of the request. | corresponding to this particular entity at the time of the request. | |||
Future requests MAY specify the Content-Location URI as the request- | Future requests MAY specify the Content-Location URI as the request- | |||
URI if the desire is to identify the source of that particular | URI if the desire is to identify the source of that particular | |||
entity. | entity. | |||
A cache cannot assume that an entity with a Content-Location | A cache cannot assume that an entity with a Content-Location | |||
different from the URI used to retrieve it can be used to respond to | different from the URI used to retrieve it can be used to respond to | |||
later requests on that Content-Location URI. However, the Content- | later requests on that Content-Location URI. However, the Content- | |||
Location can be used to differentiate between multiple entities | Location can be used to differentiate between multiple entities | |||
retrieved from a single requested resource, as described in Section 7 | retrieved from a single requested resource, as described in Section 8 | |||
of [Part6]. | of [Part6]. | |||
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. | |||
5.8. Content-MD5 | 6.8. Content-MD5 | |||
The Content-MD5 entity-header field, as defined in [RFC1864], is an | The Content-MD5 entity-header field, as defined in [RFC1864], is an | |||
MD5 digest of the entity-body for the purpose of providing an end-to- | MD5 digest of the entity-body for the purpose of providing an end-to- | |||
end message integrity check (MIC) of the entity-body. (Note: a MIC | end message integrity check (MIC) of the entity-body. (Note: a MIC | |||
is good for detecting accidental modification of the entity-body in | is good for detecting accidental modification of the entity-body 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 [RFC1864]> | md5-digest = <base64 of 128 bit MD5 digest as per [RFC1864]> | |||
skipping to change at page 24, line 47 | skipping to change at page 25, line 34 | |||
in which the application of Content-MD5 to HTTP entity-bodies | in which the application of Content-MD5 to HTTP entity-bodies | |||
differs from its application to MIME entity-bodies. One is that | differs from its application to MIME entity-bodies. One is that | |||
HTTP, unlike MIME, does not use Content-Transfer-Encoding, and | HTTP, unlike MIME, does not use Content-Transfer-Encoding, and | |||
does use Transfer-Encoding and Content-Encoding. Another is that | does use Transfer-Encoding and Content-Encoding. Another is that | |||
HTTP more frequently uses binary content types than MIME, so it is | HTTP more frequently uses binary content types than MIME, so it is | |||
worth noting that, in such cases, the byte order used to compute | worth noting that, in such cases, the byte order used to compute | |||
the digest is the transmission byte order defined for the type. | the digest is the transmission byte order defined for the type. | |||
Lastly, HTTP allows transmission of text types with any of several | Lastly, HTTP allows transmission of text types with any of several | |||
line break conventions and not just the canonical form using CRLF. | line break conventions and not just the canonical form using CRLF. | |||
5.9. Content-Type | 6.9. Content-Type | |||
The Content-Type entity-header field indicates the media type of the | The Content-Type entity-header field indicates the media type of the | |||
entity-body sent to the recipient or, in the case of the HEAD method, | entity-body sent to the recipient or, in the case of the HEAD method, | |||
the media type that would have been sent had the request been a GET. | the media type that would have been sent had the request been a GET. | |||
Content-Type = "Content-Type" ":" media-type | Content-Type = "Content-Type" ":" media-type | |||
Media types are defined in Section 2.3. An example of the field is | Media types are defined in Section 3.3. An example of the field is | |||
Content-Type: text/html; charset=ISO-8859-4 | Content-Type: text/html; charset=ISO-8859-4 | |||
Further discussion of methods for identifying the media type of an | Further discussion of methods for identifying the media type of an | |||
entity is provided in Section 3.2.1. | entity is provided in Section 4.2.1. | |||
6. IANA Considerations | 7. IANA Considerations | |||
TBD. | [[anchor1: TBD.]] | |||
7. Security Considerations | 8. Security Considerations | |||
This section is meant to inform application developers, information | This section is meant to inform application developers, information | |||
providers, and users of the security limitations in HTTP/1.1 as | providers, and users of the security limitations in HTTP/1.1 as | |||
described by this document. The discussion does not include | described by this document. The discussion does not include | |||
definitive solutions to the problems revealed, though it does make | definitive solutions to the problems revealed, though it does make | |||
some suggestions for reducing security risks. | some suggestions for reducing security risks. | |||
7.1. Privacy Issues Connected to Accept Headers | 8.1. Privacy Issues Connected to Accept Headers | |||
Accept request-headers can reveal information about the user to all | Accept request-headers can reveal information about the user to all | |||
servers which are accessed. The Accept-Language header in particular | servers which are accessed. The Accept-Language header in particular | |||
can reveal information the user would consider to be of a private | can reveal information the user would consider to be of a private | |||
nature, because the understanding of particular languages is often | nature, because the understanding of particular languages is often | |||
strongly correlated to the membership of a particular ethnic group. | strongly correlated to the membership of a particular ethnic group. | |||
User agents which offer the option to configure the contents of an | User agents which offer the option to configure the contents of an | |||
Accept-Language header to be sent in every request are strongly | Accept-Language header to be sent in every request are strongly | |||
encouraged to let the configuration process include a message which | encouraged to let the configuration process include a message which | |||
makes the user aware of the loss of privacy involved. | makes the user aware of the loss of privacy involved. | |||
skipping to change at page 26, line 14 | skipping to change at page 27, line 5 | |||
many users not behind a proxy, the network address of the host | many users not behind a proxy, the network address of the host | |||
running the user agent will also serve as a long-lived user | running the user agent will also serve as a long-lived user | |||
identifier. In environments where proxies are used to enhance | identifier. In environments where proxies are used to enhance | |||
privacy, user agents ought to be conservative in offering accept | privacy, user agents ought to be conservative in offering accept | |||
header configuration options to end users. As an extreme privacy | header configuration options to end users. As an extreme privacy | |||
measure, proxies could filter the accept headers in relayed requests. | measure, proxies could filter the accept headers in relayed requests. | |||
General purpose user agents which provide a high degree of header | General purpose user agents which provide a high degree of header | |||
configurability SHOULD warn users about the loss of privacy which can | configurability SHOULD warn users about the loss of privacy which can | |||
be involved. | be involved. | |||
7.2. Content-Disposition Issues | 8.2. Content-Disposition Issues | |||
[RFC1806], from which the often implemented Content-Disposition (see | [RFC1806], from which the often implemented Content-Disposition (see | |||
Appendix B.1) header in HTTP is derived, has a number of very serious | Appendix B.1) header in HTTP is derived, has a number of very serious | |||
security considerations. Content-Disposition is not part of the HTTP | security considerations. Content-Disposition is not part of the HTTP | |||
standard, but since it is widely implemented, we are documenting its | standard, but since it is widely implemented, we are documenting its | |||
use and risks for implementors. See [RFC2183] (which updates | use and risks for implementors. See [RFC2183] (which updates | |||
[RFC1806]) for details. | [RFC1806]) for details. | |||
8. Acknowledgments | 9. Acknowledgments | |||
9. References | 10. References | |||
9.1. Normative References | 10.1. Normative References | |||
[ISO-8859-1] | [ISO-8859-1] | |||
International Organization for Standardization, | International Organization for Standardization, | |||
"Information technology -- 8-bit single-byte coded graphic | "Information technology -- 8-bit single-byte coded graphic | |||
character sets -- Part 1: Latin alphabet No. 1", ISO/ | character sets -- Part 1: Latin alphabet No. 1", ISO/ | |||
IEC 8859-1:1998, 1998. | IEC 8859-1:1998, 1998. | |||
[Part1] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., | [Part1] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., | |||
Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed., | Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed., | |||
and J. Reschke, Ed., "HTTP/1.1, part 1: URIs, Connections, | and J. Reschke, Ed., "HTTP/1.1, part 1: URIs, Connections, | |||
and Message Parsing", draft-ietf-httpbis-p1-messaging-01 | and Message Parsing", draft-ietf-httpbis-p1-messaging-02 | |||
(work in progress), January 2008. | (work in progress), February 2008. | |||
[Part2] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., | [Part2] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., | |||
Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed., | Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed., | |||
and J. Reschke, Ed., "HTTP/1.1, part 2: Message | and J. Reschke, Ed., "HTTP/1.1, part 2: Message | |||
Semantics", draft-ietf-httpbis-p2-semantics-01 (work in | Semantics", draft-ietf-httpbis-p2-semantics-02 (work in | |||
progress), January 2008. | progress), February 2008. | |||
[Part4] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., | [Part4] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., | |||
Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed., | Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed., | |||
and J. Reschke, Ed., "HTTP/1.1, part 4: Conditional | and J. Reschke, Ed., "HTTP/1.1, part 4: Conditional | |||
Requests", draft-ietf-httpbis-p4-conditional-01 (work in | Requests", draft-ietf-httpbis-p4-conditional-02 (work in | |||
progress), January 2008. | progress), February 2008. | |||
[Part5] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., | [Part5] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., | |||
Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed., | Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed., | |||
and J. Reschke, Ed., "HTTP/1.1, part 5: Range Requests and | and J. Reschke, Ed., "HTTP/1.1, part 5: Range Requests and | |||
Partial Responses", draft-ietf-httpbis-p5-range-01 (work | Partial Responses", draft-ietf-httpbis-p5-range-02 (work | |||
in progress), January 2008. | in progress), February 2008. | |||
[Part6] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., | [Part6] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., | |||
Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed., | Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed., | |||
and J. Reschke, Ed., "HTTP/1.1, part 6: Caching", | and J. Reschke, Ed., "HTTP/1.1, part 6: Caching", | |||
draft-ietf-httpbis-p6-cache-01 (work in progress), | draft-ietf-httpbis-p6-cache-02 (work in progress), | |||
January 2008. | February 2008. | |||
[RFC1766] Alvestrand, H., "Tags for the Identification of | [RFC1766] Alvestrand, H., "Tags for the Identification of | |||
Languages", RFC 1766, March 1995. | Languages", RFC 1766, March 1995. | |||
[RFC1864] Myers, J. and M. Rose, "The Content-MD5 Header Field", | [RFC1864] Myers, J. and M. Rose, "The Content-MD5 Header Field", | |||
RFC 1864, October 1995. | RFC 1864, October 1995. | |||
[RFC1950] Deutsch, L. and J-L. Gailly, "ZLIB Compressed Data Format | [RFC1950] Deutsch, L. and J-L. Gailly, "ZLIB Compressed Data Format | |||
Specification version 3.3", RFC 1950, May 1996. | Specification version 3.3", RFC 1950, May 1996. | |||
skipping to change at page 28, line 16 | skipping to change at page 29, line 6 | |||
Extensions (MIME) Part One: Format of Internet Message | Extensions (MIME) Part One: Format of Internet Message | |||
Bodies", RFC 2045, November 1996. | Bodies", RFC 2045, November 1996. | |||
[RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail | [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail | |||
Extensions (MIME) Part Two: Media Types", RFC 2046, | Extensions (MIME) Part Two: Media Types", RFC 2046, | |||
November 1996. | November 1996. | |||
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
Requirement Levels", BCP 14, RFC 2119, March 1997. | Requirement Levels", BCP 14, RFC 2119, March 1997. | |||
[RFC4288] Freed, N. and J. Klensin, "Media Type Specifications and | 10.2. Informative References | |||
Registration Procedures", BCP 13, RFC 4288, December 2005. | ||||
9.2. Informative References | ||||
[RFC1806] Troost, R. and S. Dorner, "Communicating Presentation | [RFC1806] Troost, R. and S. Dorner, "Communicating Presentation | |||
Information in Internet Messages: The Content-Disposition | Information in Internet Messages: The Content-Disposition | |||
Header", RFC 1806, June 1995. | Header", RFC 1806, June 1995. | |||
[RFC1945] Berners-Lee, T., Fielding, R., and H. Nielsen, "Hypertext | [RFC1945] Berners-Lee, T., Fielding, R., and H. Nielsen, "Hypertext | |||
Transfer Protocol -- HTTP/1.0", RFC 1945, May 1996. | Transfer Protocol -- HTTP/1.0", RFC 1945, May 1996. | |||
[RFC2049] Freed, N. and N. Borenstein, "Multipurpose Internet Mail | [RFC2049] Freed, N. and N. Borenstein, "Multipurpose Internet Mail | |||
Extensions (MIME) Part Five: Conformance Criteria and | Extensions (MIME) Part Five: Conformance Criteria and | |||
skipping to change at page 29, line 15 | skipping to change at page 29, line 50 | |||
[RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., | [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., | |||
Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext | Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext | |||
Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. | Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. | |||
[RFC2822] Resnick, P., "Internet Message Format", RFC 2822, | [RFC2822] Resnick, P., "Internet Message Format", RFC 2822, | |||
April 2001. | April 2001. | |||
[RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO | [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO | |||
10646", RFC 3629, STD 63, November 2003. | 10646", RFC 3629, STD 63, November 2003. | |||
[RFC4288] Freed, N. and J. Klensin, "Media Type Specifications and | ||||
Registration Procedures", BCP 13, RFC 4288, December 2005. | ||||
Appendix A. Differences Between HTTP Entities and RFC 2045 Entities | Appendix A. Differences Between HTTP Entities and RFC 2045 Entities | |||
HTTP/1.1 uses many of the constructs defined for Internet Mail | HTTP/1.1 uses many of the constructs defined for Internet Mail | |||
([RFC2822]) and the Multipurpose Internet Mail Extensions (MIME | ([RFC2822]) and the Multipurpose Internet Mail Extensions (MIME | |||
[RFC2045]) to allow entities to be transmitted in an open variety of | [RFC2045]) to allow entities to be transmitted in an open variety of | |||
representations and with extensible mechanisms. However, RFC 2045 | representations and with extensible mechanisms. However, RFC 2045 | |||
discusses mail, and HTTP has a few features that are different from | discusses mail, and HTTP has a few features that are different from | |||
those described in RFC 2045. These differences were carefully chosen | those described in RFC 2045. These differences were carefully chosen | |||
to optimize performance over binary connections, to allow greater | to optimize performance over binary connections, to allow greater | |||
freedom in the use of new media types, to make date comparisons | freedom in the use of new media types, to make date comparisons | |||
skipping to change at page 30, line 9 | skipping to change at page 30, line 45 | |||
MIME-Version = "MIME-Version" ":" 1*DIGIT "." 1*DIGIT | MIME-Version = "MIME-Version" ":" 1*DIGIT "." 1*DIGIT | |||
MIME version "1.0" is the default for use in HTTP/1.1. However, | MIME version "1.0" is the default for use in HTTP/1.1. However, | |||
HTTP/1.1 message parsing and semantics are defined by this document | HTTP/1.1 message parsing and semantics are defined by this document | |||
and not the MIME specification. | and not the MIME specification. | |||
A.2. Conversion to Canonical Form | A.2. Conversion to Canonical Form | |||
[RFC2045] requires that an Internet mail entity be converted to | [RFC2045] requires that an Internet mail entity be converted to | |||
canonical form prior to being transferred, as described in Section 4 | canonical form prior to being transferred, as described in Section 4 | |||
of [RFC2049]. Section 2.3.1 of this document describes the forms | of [RFC2049]. Section 3.3.1 of this document describes the forms | |||
allowed for subtypes of the "text" media type when transmitted over | allowed for subtypes of the "text" media type when transmitted over | |||
HTTP. [RFC2046] requires that content with a type of "text" | HTTP. [RFC2046] requires that content with a type of "text" | |||
represent line breaks as CRLF and forbids the use of CR or LF outside | represent line breaks as CRLF and forbids the use of CR or LF outside | |||
of line break sequences. HTTP allows CRLF, bare CR, and bare LF to | of line break sequences. HTTP allows CRLF, bare CR, and bare LF to | |||
indicate a line break within text content when a message is | indicate a line break within text content when a message is | |||
transmitted over HTTP. | transmitted over HTTP. | |||
Where it is possible, a proxy or gateway from HTTP to a strict MIME | Where it is possible, a proxy or gateway from HTTP to a strict MIME | |||
environment SHOULD translate all line breaks within the text media | environment SHOULD translate all line breaks within the text media | |||
types described in Section 2.3.1 of this document to the RFC 2049 | types described in Section 3.3.1 of this document to the RFC 2049 | |||
canonical form of CRLF. Note, however, that this might be | canonical form of CRLF. Note, however, that this might be | |||
complicated by the presence of a Content-Encoding and by the fact | complicated by the presence of a Content-Encoding and by the fact | |||
that HTTP allows the use of some character sets which do not use | that HTTP allows the use of some character sets which do not use | |||
octets 13 and 10 to represent CR and LF, as is the case for some | octets 13 and 10 to represent CR and LF, as is the case for some | |||
multi-byte character sets. | multi-byte character sets. | |||
Implementors should note that conversion will break any cryptographic | Implementors should note that conversion will break any cryptographic | |||
checksums applied to the original content unless the original content | checksums applied to the original content unless the original content | |||
is already in canonical form. Therefore, the canonical form is | is already in canonical form. Therefore, the canonical form is | |||
recommended for any content that uses such checksums in HTTP. | recommended for any content that uses such checksums in HTTP. | |||
skipping to change at page 31, line 23 | skipping to change at page 32, line 13 | |||
to forwarding a message via a MIME-compliant protocol. | to forwarding a message via a MIME-compliant protocol. | |||
A.6. MHTML and Line Length Limitations | A.6. MHTML and Line Length Limitations | |||
HTTP implementations which share code with MHTML [RFC2557] | HTTP implementations which share code with MHTML [RFC2557] | |||
implementations need to be aware of MIME line length limitations. | implementations need to be aware of MIME line length limitations. | |||
Since HTTP does not have this limitation, HTTP does not fold long | Since HTTP does not have this limitation, HTTP does not fold long | |||
lines. MHTML messages being transported by HTTP follow all | lines. MHTML messages being transported by HTTP follow all | |||
conventions of MHTML, including line length limitations and folding, | conventions of MHTML, including line length limitations and folding, | |||
canonicalization, etc., since HTTP transports all message-bodies as | canonicalization, etc., since HTTP transports all message-bodies as | |||
payload (see Section 2.3.2) and does not interpret the content or any | payload (see Section 3.3.2) and does not interpret the content or any | |||
MIME header lines that might be contained therein. | MIME header lines that might be contained therein. | |||
Appendix B. Additional Features | Appendix B. Additional Features | |||
[RFC1945] and [RFC2068] document protocol elements used by some | [RFC1945] and [RFC2068] document protocol elements used by some | |||
existing HTTP implementations, but not consistently and correctly | existing HTTP implementations, but not consistently and correctly | |||
across most HTTP/1.1 applications. Implementors are advised to be | across most HTTP/1.1 applications. Implementors are advised to be | |||
aware of these features, but cannot rely upon their presence in, or | aware of these features, but cannot rely upon their presence in, or | |||
interoperability with, other HTTP/1.1 applications. Some of these | interoperability with, other HTTP/1.1 applications. Some of these | |||
describe proposed experimental features, and some describe features | describe proposed experimental features, and some describe features | |||
skipping to change at page 32, line 20 | skipping to change at page 33, line 4 | |||
disp-extension-token = token | disp-extension-token = token | |||
disp-extension-parm = token "=" ( token | quoted-string ) | disp-extension-parm = token "=" ( token | quoted-string ) | |||
An example is | An example is | |||
Content-Disposition: attachment; filename="fname.ext" | Content-Disposition: attachment; filename="fname.ext" | |||
The receiving user agent SHOULD NOT respect any directory path | The receiving user agent SHOULD NOT respect any directory path | |||
information present in the filename-parm parameter, which is the only | information present in the filename-parm parameter, which is the only | |||
parameter believed to apply to HTTP implementations at this time. | parameter believed to apply to HTTP implementations at this time. | |||
The filename SHOULD be treated as a terminal component only. | The filename SHOULD be treated as a terminal component only. | |||
If this header is used in a response with the application/ | If this header is used in a response with the application/ | |||
octet-stream content-type, the implied suggestion is that the user | octet-stream content-type, the implied suggestion is that the user | |||
agent should not display the response, but directly enter a `save | agent should not display the response, but directly enter a `save | |||
response as...' dialog. | response as...' dialog. | |||
See Section 7.2 for Content-Disposition security issues. | See Section 8.2 for Content-Disposition security issues. | |||
Appendix C. Compatibility with Previous Versions | Appendix C. Compatibility with Previous Versions | |||
C.1. Changes from RFC 2068 | C.1. Changes from RFC 2068 | |||
Transfer-coding and message lengths all interact in ways that | Transfer-coding and message lengths all interact in ways that | |||
required fixing exactly when chunked encoding is used (to allow for | required fixing exactly when chunked encoding is used (to allow for | |||
transfer encoding that may not be self delimiting); it was important | transfer encoding that may not be self delimiting); it was important | |||
to straighten out exactly how message lengths are computed. | to straighten out exactly how message lengths are computed. | |||
(Section 3.2.2, see also [Part1], [Part5] and [Part6]). | (Section 4.2.2, see also [Part1], [Part5] and [Part6]). | |||
Charset wildcarding is introduced to avoid explosion of character set | Charset wildcarding is introduced to avoid explosion of character set | |||
names in accept headers. (Section 5.2) | names in accept headers. (Section 6.2) | |||
Content-Base was deleted from the specification: it was not | Content-Base was deleted from the specification: it was not | |||
implemented widely, and there is no simple, safe way to introduce it | implemented widely, and there is no simple, safe way to introduce it | |||
without a robust extension mechanism. In addition, it is used in a | without a robust extension mechanism. In addition, it is used in a | |||
similar, but not identical fashion in MHTML [RFC2557]. | similar, but not identical fashion in MHTML [RFC2557]. | |||
A content-coding of "identity" was introduced, to solve problems | A content-coding of "identity" was introduced, to solve problems | |||
discovered in caching. (Section 2.2) | discovered in caching. (Section 3.2) | |||
Quality Values of zero should indicate that "I don't want something" | Quality Values of zero should indicate that "I don't want something" | |||
to allow clients to refuse a representation. (Section 2.4) | to allow clients to refuse a representation. (Section 3.4) | |||
The Alternates, Content-Version, Derived-From, Link, URI, Public and | The Alternates, Content-Version, Derived-From, Link, URI, Public and | |||
Content-Base header fields were defined in previous versions of this | Content-Base header fields were defined in previous versions of this | |||
specification, but not commonly implemented. See [RFC2068]. | specification, but not commonly implemented. See [RFC2068]. | |||
C.2. Changes from RFC 2616 | C.2. Changes from RFC 2616 | |||
Clarify contexts that charset is used in. (Section 2.1) | Clarify contexts that charset is used in. (Section 3.1) | |||
Remove reference to non-existant identity transfer-coding value | Remove reference to non-existant identity transfer-coding value | |||
tokens. (Appendix A.4) | tokens. (Appendix A.4) | |||
Appendix D. Change Log (to be removed by RFC Editor before publication) | Appendix D. Change Log (to be removed by RFC Editor before publication) | |||
D.1. Since RFC2616 | D.1. Since RFC2616 | |||
Extracted relevant partitions from [RFC2616]. | Extracted relevant partitions from [RFC2616]. | |||
skipping to change at page 33, line 45 | skipping to change at page 34, line 35 | |||
o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/25>: "Accept- | o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/25>: "Accept- | |||
Encoding BNF" | Encoding BNF" | |||
o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/35>: "Normative | o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/35>: "Normative | |||
and Informative references" | and Informative references" | |||
o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/46>: "RFC1700 | o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/46>: "RFC1700 | |||
references" | references" | |||
o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/55>: "Updating | ||||
to RFC4288" | ||||
o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/65>: | o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/65>: | |||
"Informative references" | "Informative references" | |||
o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/66>: | o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/66>: | |||
"ISO-8859-1 Reference" | "ISO-8859-1 Reference" | |||
o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/68>: "Encoding | o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/68>: "Encoding | |||
References Normative" | References Normative" | |||
o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/86>: "Normative | o <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/86>: "Normative | |||
up-to-date references" | up-to-date references" | |||
D.3. Since draft-ietf-httpbis-p3-payload-01 | ||||
Ongoing work on ABNF conversion | ||||
(<http://www3.tools.ietf.org/wg/httpbis/trac/ticket/36>): | ||||
o Add explicit references to BNF syntax and rules imported from | ||||
other parts of the specification. | ||||
Index | Index | |||
A | A | |||
Accept header 16 | Accept header 16 | |||
Accept-Charset header 18 | Accept-Charset header 18 | |||
Accept-Encoding header 18 | Accept-Encoding header 19 | |||
Accept-Language header 20 | Accept-Language header 20 | |||
Alternates header 33 | Alternates header 33 | |||
C | C | |||
compress 7 | compress 8 | |||
Content-Base header 33 | Content-Base header 33 | |||
Content-Disposition header 31 | Content-Disposition header 32 | |||
Content-Encoding header 21 | Content-Encoding header 22 | |||
Content-Language header 22 | Content-Language header 22 | |||
Content-Location header 22 | Content-Location header 23 | |||
Content-MD5 header 23 | Content-MD5 header 24 | |||
Content-Type header 24 | Content-Type header 25 | |||
Content-Version header 33 | Content-Version header 33 | |||
D | D | |||
deflate 7 | deflate 8 | |||
Derived-From header 33 | Derived-From header 33 | |||
G | G | |||
Grammar | Grammar | |||
Accept 16 | Accept 16 | |||
Accept-Charset 18 | Accept-Charset 18 | |||
Accept-Encoding 18 | Accept-Encoding 19 | |||
accept-extension 16 | accept-extension 16 | |||
Accept-Language 20 | Accept-Language 20 | |||
accept-params 16 | accept-params 16 | |||
attribute 8 | attribute 9 | |||
charset 6 | charset 7 | |||
codings 18 | codings 19 | |||
content-coding 7 | content-coding 7 | |||
content-disposition 32 | content-disposition 32 | |||
Content-Encoding 21 | Content-Encoding 22 | |||
Content-Language 22 | Content-Language 22 | |||
Content-Location 23 | Content-Location 23 | |||
Content-MD5 23 | Content-MD5 24 | |||
Content-Type 24 | Content-Type 25 | |||
disp-extension-parm 32 | disp-extension-parm 32 | |||
disp-extension-token 32 | disp-extension-token 32 | |||
disposition-parm 32 | disposition-parm 32 | |||
disposition-type 32 | disposition-type 32 | |||
entity-body 12 | entity-body 12 | |||
entity-header 11 | entity-header 12 | |||
extension-header 11 | extension-header 12 | |||
filename-parm 32 | filename-parm 32 | |||
language-range 20 | language-range 20 | |||
language-tag 11 | language-tag 11 | |||
md5-digest 23 | md5-digest 24 | |||
media-range 16 | media-range 16 | |||
media-type 8 | media-type 9 | |||
MIME-Version 29 | MIME-Version 30 | |||
parameter 8 | parameter 9 | |||
primary-tag 11 | primary-tag 11 | |||
qvalue 10 | qvalue 11 | |||
subtag 11 | subtag 11 | |||
subtype 8 | subtype 9 | |||
type 8 | type 9 | |||
value 8 | value 9 | |||
gzip 7 | gzip 8 | |||
H | H | |||
Headers | Headers | |||
Accept 16 | Accept 16 | |||
Accept-Charset 18 | Accept-Charset 18 | |||
Accept-Encoding 18 | Accept-Encoding 19 | |||
Accept-Language 20 | Accept-Language 20 | |||
Alternate 33 | Alternate 33 | |||
Content-Base 33 | Content-Base 33 | |||
Content-Disposition 31 | Content-Disposition 32 | |||
Content-Encoding 21 | Content-Encoding 22 | |||
Content-Language 22 | Content-Language 22 | |||
Content-Location 22 | Content-Location 23 | |||
Content-MD5 23 | Content-MD5 24 | |||
Content-Type 24 | Content-Type 25 | |||
Content-Version 33 | Content-Version 33 | |||
Derived-From 33 | Derived-From 33 | |||
Link 33 | Link 33 | |||
Public 33 | Public 33 | |||
URI 33 | URI 33 | |||
I | I | |||
identity 8 | identity 8 | |||
L | L | |||
Link header 33 | Link header 33 | |||
P | P | |||
Public header 33 | Public header 33 | |||
U | U | |||
URI header 33 | URI header 33 | |||
Authors' Addresses | Authors' Addresses | |||
End of changes. 108 change blocks. | ||||
180 lines changed or deleted | 223 lines changed or added | |||
This html diff was produced by rfcdiff 1.34. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |