1 | <?xml version="1.0" encoding="utf-8"?> |
---|
2 | <?xml-stylesheet type='text/xsl' href='../myxml2rfc.xslt'?> |
---|
3 | <!DOCTYPE rfc [ |
---|
4 | <!ENTITY MAY "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MAY</bcp14>"> |
---|
5 | <!ENTITY MUST "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST</bcp14>"> |
---|
6 | <!ENTITY MUST-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST NOT</bcp14>"> |
---|
7 | <!ENTITY OPTIONAL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>OPTIONAL</bcp14>"> |
---|
8 | <!ENTITY RECOMMENDED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>RECOMMENDED</bcp14>"> |
---|
9 | <!ENTITY REQUIRED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>REQUIRED</bcp14>"> |
---|
10 | <!ENTITY SHALL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL</bcp14>"> |
---|
11 | <!ENTITY SHALL-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL NOT</bcp14>"> |
---|
12 | <!ENTITY SHOULD "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD</bcp14>"> |
---|
13 | <!ENTITY SHOULD-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD NOT</bcp14>"> |
---|
14 | <!ENTITY ID-VERSION "latest"> |
---|
15 | <!ENTITY ID-MONTH "January"> |
---|
16 | <!ENTITY ID-YEAR "2008"> |
---|
17 | <!ENTITY caching-neg-resp "<xref target='Part6' x:rel='#caching.negotiated.responses' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
18 | <!ENTITY header-transfer-encoding "<xref target='Part1' x:rel='#header.transfer-encoding' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
19 | <!ENTITY header-allow "<xref target='Part2' x:rel='#header.allow' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
20 | <!ENTITY header-content-length "<xref target='Part1' x:rel='#header.content-length' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
21 | <!ENTITY header-content-range "<xref target='Part5' x:rel='#header.content-range' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
22 | <!ENTITY header-expires "<xref target='Part6' x:rel='#header.expires' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
23 | <!ENTITY header-last-modified "<xref target='Part4' x:rel='#header.last-modified' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
24 | <!ENTITY header-user-agent "<xref target='Part2' x:rel='#header.user-agent' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
25 | <!ENTITY header-vary "<xref target='Part6' x:rel='#header.vary' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
26 | <!ENTITY message-body "<xref target='Part1' x:rel='#message.body' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
27 | <!ENTITY message-length "<xref target='Part1' x:rel='#message.length' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
28 | <!ENTITY multipart-byteranges "<xref target='Part5' x:rel='#internet.media.type.multipart.byteranges' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
29 | ]> |
---|
30 | <?rfc toc="yes" ?> |
---|
31 | <?rfc symrefs="yes" ?> |
---|
32 | <?rfc sortrefs="yes" ?> |
---|
33 | <?rfc compact="yes"?> |
---|
34 | <?rfc subcompact="no" ?> |
---|
35 | <?rfc linkmailto="no" ?> |
---|
36 | <?rfc editing="no" ?> |
---|
37 | <?rfc-ext allow-markup-in-artwork="yes" ?> |
---|
38 | <?rfc-ext include-references-in-index="yes" ?> |
---|
39 | <rfc obsoletes="2068, 2616" category="std" |
---|
40 | ipr="full3978" docName="draft-ietf-httpbis-p3-payload-&ID-VERSION;" |
---|
41 | xmlns:x='http://purl.org/net/xml2rfc/ext' xmlns:ed="http://greenbytes.de/2002/rfcedit"> |
---|
42 | <front> |
---|
43 | |
---|
44 | <title abbrev="HTTP/1.1, Part 3">HTTP/1.1, part 3: Message Payload and Content Negotiation</title> |
---|
45 | |
---|
46 | <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor"> |
---|
47 | <organization abbrev="Day Software">Day Software</organization> |
---|
48 | <address> |
---|
49 | <postal> |
---|
50 | <street>23 Corporate Plaza DR, Suite 280</street> |
---|
51 | <city>Newport Beach</city> |
---|
52 | <region>CA</region> |
---|
53 | <code>92660</code> |
---|
54 | <country>USA</country> |
---|
55 | </postal> |
---|
56 | <phone>+1-949-706-5300</phone> |
---|
57 | <facsimile>+1-949-706-5305</facsimile> |
---|
58 | <email>fielding@gbiv.com</email> |
---|
59 | <uri>http://roy.gbiv.com/</uri> |
---|
60 | </address> |
---|
61 | </author> |
---|
62 | |
---|
63 | <author initials="J." surname="Gettys" fullname="Jim Gettys"> |
---|
64 | <organization>One Laptop per Child</organization> |
---|
65 | <address> |
---|
66 | <postal> |
---|
67 | <street>21 Oak Knoll Road</street> |
---|
68 | <city>Carlisle</city> |
---|
69 | <region>MA</region> |
---|
70 | <code>01741</code> |
---|
71 | <country>USA</country> |
---|
72 | </postal> |
---|
73 | <email>jg@laptop.org</email> |
---|
74 | <uri>http://www.laptop.org/</uri> |
---|
75 | </address> |
---|
76 | </author> |
---|
77 | |
---|
78 | <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul"> |
---|
79 | <organization abbrev="HP">Hewlett-Packard Company</organization> |
---|
80 | <address> |
---|
81 | <postal> |
---|
82 | <street>HP Labs, Large Scale Systems Group</street> |
---|
83 | <street>1501 Page Mill Road, MS 1177</street> |
---|
84 | <city>Palo Alto</city> |
---|
85 | <region>CA</region> |
---|
86 | <code>94304</code> |
---|
87 | <country>USA</country> |
---|
88 | </postal> |
---|
89 | <email>JeffMogul@acm.org</email> |
---|
90 | </address> |
---|
91 | </author> |
---|
92 | |
---|
93 | <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen"> |
---|
94 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
95 | <address> |
---|
96 | <postal> |
---|
97 | <street>1 Microsoft Way</street> |
---|
98 | <city>Redmond</city> |
---|
99 | <region>WA</region> |
---|
100 | <code>98052</code> |
---|
101 | <country>USA</country> |
---|
102 | </postal> |
---|
103 | <email>henrikn@microsoft.com</email> |
---|
104 | </address> |
---|
105 | </author> |
---|
106 | |
---|
107 | <author initials="L." surname="Masinter" fullname="Larry Masinter"> |
---|
108 | <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization> |
---|
109 | <address> |
---|
110 | <postal> |
---|
111 | <street>345 Park Ave</street> |
---|
112 | <city>San Jose</city> |
---|
113 | <region>CA</region> |
---|
114 | <code>95110</code> |
---|
115 | <country>USA</country> |
---|
116 | </postal> |
---|
117 | <email>LMM@acm.org</email> |
---|
118 | <uri>http://larry.masinter.net/</uri> |
---|
119 | </address> |
---|
120 | </author> |
---|
121 | |
---|
122 | <author initials="P." surname="Leach" fullname="Paul J. Leach"> |
---|
123 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
124 | <address> |
---|
125 | <postal> |
---|
126 | <street>1 Microsoft Way</street> |
---|
127 | <city>Redmond</city> |
---|
128 | <region>WA</region> |
---|
129 | <code>98052</code> |
---|
130 | </postal> |
---|
131 | <email>paulle@microsoft.com</email> |
---|
132 | </address> |
---|
133 | </author> |
---|
134 | |
---|
135 | <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee"> |
---|
136 | <organization abbrev="W3C/MIT">World Wide Web Consortium</organization> |
---|
137 | <address> |
---|
138 | <postal> |
---|
139 | <street>MIT Computer Science and Artificial Intelligence Laboratory</street> |
---|
140 | <street>The Stata Center, Building 32</street> |
---|
141 | <street>32 Vassar Street</street> |
---|
142 | <city>Cambridge</city> |
---|
143 | <region>MA</region> |
---|
144 | <code>02139</code> |
---|
145 | <country>USA</country> |
---|
146 | </postal> |
---|
147 | <email>timbl@w3.org</email> |
---|
148 | <uri>http://www.w3.org/People/Berners-Lee/</uri> |
---|
149 | </address> |
---|
150 | </author> |
---|
151 | |
---|
152 | <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor"> |
---|
153 | <organization abbrev="W3C">World Wide Web Consortium</organization> |
---|
154 | <address> |
---|
155 | <postal> |
---|
156 | <street>W3C / ERCIM</street> |
---|
157 | <street>2004, rte des Lucioles</street> |
---|
158 | <city>Sophia-Antipolis</city> |
---|
159 | <region>AM</region> |
---|
160 | <code>06902</code> |
---|
161 | <country>France</country> |
---|
162 | </postal> |
---|
163 | <email>ylafon@w3.org</email> |
---|
164 | <uri>http://www.raubacapeu.net/people/yves/</uri> |
---|
165 | </address> |
---|
166 | </author> |
---|
167 | |
---|
168 | <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor"> |
---|
169 | <organization abbrev="greenbytes">greenbytes GmbH</organization> |
---|
170 | <address> |
---|
171 | <postal> |
---|
172 | <street>Hafenweg 16</street> |
---|
173 | <city>Muenster</city><region>NW</region><code>48155</code> |
---|
174 | <country>Germany</country> |
---|
175 | </postal> |
---|
176 | <phone>+49 251 2807760</phone> |
---|
177 | <facsimile>+49 251 2807761</facsimile> |
---|
178 | <email>julian.reschke@greenbytes.de</email> |
---|
179 | <uri>http://greenbytes.de/tech/webdav/</uri> |
---|
180 | </address> |
---|
181 | </author> |
---|
182 | |
---|
183 | <date month="&ID-MONTH;" year="&ID-YEAR;"/> |
---|
184 | |
---|
185 | <abstract> |
---|
186 | <t> |
---|
187 | The Hypertext Transfer Protocol (HTTP) is an application-level |
---|
188 | protocol for distributed, collaborative, hypermedia information |
---|
189 | systems. HTTP has been in use by the World Wide Web global information |
---|
190 | initiative since 1990. This document is Part 3 of the seven-part specification |
---|
191 | that defines the protocol referred to as "HTTP/1.1" and, taken together, |
---|
192 | obsoletes RFC 2616. Part 3 defines HTTP message content, |
---|
193 | metadata, and content negotiation. |
---|
194 | </t> |
---|
195 | </abstract> |
---|
196 | |
---|
197 | <note title="Editorial Note (To be removed by RFC Editor)"> |
---|
198 | <t> |
---|
199 | Discussion of this draft should take place on the HTTPBIS working group |
---|
200 | mailing list (ietf-http-wg@w3.org). The current issues list is |
---|
201 | at <eref target="http://www.tools.ietf.org/wg/httpbis/trac/report/11"/> |
---|
202 | and related documents (including fancy diffs) can be found at |
---|
203 | <eref target="http://www.tools.ietf.org/wg/httpbis/"/>. |
---|
204 | </t> |
---|
205 | </note> |
---|
206 | </front> |
---|
207 | <middle> |
---|
208 | <section title="Introduction" anchor="introduction"> |
---|
209 | <t> |
---|
210 | This document will define aspects of HTTP related to the payload of |
---|
211 | messages (message content), including metadata and media types, along |
---|
212 | with HTTP content negotiation. Right now it only includes the extracted |
---|
213 | relevant sections of RFC 2616 without edit. |
---|
214 | </t> |
---|
215 | |
---|
216 | <section title="Requirements" anchor="intro.requirements"> |
---|
217 | <t> |
---|
218 | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", |
---|
219 | "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this |
---|
220 | document are to be interpreted as described in <xref target="RFC2119"/>. |
---|
221 | </t> |
---|
222 | <t> |
---|
223 | An implementation is not compliant if it fails to satisfy one or more |
---|
224 | of the &MUST; or &REQUIRED; level requirements for the protocols it |
---|
225 | implements. An implementation that satisfies all the &MUST; or &REQUIRED; |
---|
226 | level and all the &SHOULD; level requirements for its protocols is said |
---|
227 | to be "unconditionally compliant"; one that satisfies all the &MUST; |
---|
228 | level requirements but not all the &SHOULD; level requirements for its |
---|
229 | protocols is said to be "conditionally compliant." |
---|
230 | </t> |
---|
231 | </section> |
---|
232 | </section> |
---|
233 | |
---|
234 | <section title="Protocol Parameters" anchor="protocol.parameters"> |
---|
235 | |
---|
236 | <section title="Character Sets" anchor="character.sets"> |
---|
237 | <t> |
---|
238 | HTTP uses the same definition of the term "character set" as that |
---|
239 | described for MIME: |
---|
240 | </t> |
---|
241 | <t> |
---|
242 | The term "character set" is used in this document to refer to a |
---|
243 | method used with one or more tables to convert a sequence of octets |
---|
244 | into a sequence of characters. Note that unconditional conversion in |
---|
245 | the other direction is not required, in that not all characters may |
---|
246 | be available in a given character set and a character set may provide |
---|
247 | more than one sequence of octets to represent a particular character. |
---|
248 | This definition is intended to allow various kinds of character |
---|
249 | encoding, from simple single-table mappings such as US-ASCII to |
---|
250 | complex table switching methods such as those that use ISO-2022's |
---|
251 | techniques. However, the definition associated with a MIME character |
---|
252 | set name &MUST; fully specify the mapping to be performed from octets |
---|
253 | to characters. In particular, use of external profiling information |
---|
254 | to determine the exact mapping is not permitted. |
---|
255 | </t> |
---|
256 | <t><list><t> |
---|
257 | <x:h>Note:</x:h> This use of the term "character set" is more commonly |
---|
258 | referred to as a "character encoding." However, since HTTP and |
---|
259 | MIME share the same registry, it is important that the terminology |
---|
260 | also be shared. |
---|
261 | </t></list></t> |
---|
262 | <t> |
---|
263 | HTTP character sets are identified by case-insensitive tokens. The |
---|
264 | complete set of tokens is defined by the IANA Character Set registry |
---|
265 | (<eref target="http://www.iana.org/assignments/character-sets"/>). |
---|
266 | </t> |
---|
267 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="charset"/> |
---|
268 | charset = token |
---|
269 | </artwork></figure> |
---|
270 | <t> |
---|
271 | Although HTTP allows an arbitrary token to be used as a charset |
---|
272 | value, any token that has a predefined value within the IANA |
---|
273 | Character Set registry &MUST; represent the character set defined |
---|
274 | by that registry. Applications &SHOULD; limit their use of character |
---|
275 | sets to those defined by the IANA registry. |
---|
276 | </t> |
---|
277 | <t> |
---|
278 | HTTP uses charset in two contexts: within an Accept-Charset request |
---|
279 | header (in which the charset value is an unquoted token) and as the |
---|
280 | value of a parameter in a Content-Type header (within a request or |
---|
281 | response), in which case the parameter value of the charset parameter |
---|
282 | may be quoted. |
---|
283 | </t> |
---|
284 | <t> |
---|
285 | Implementors should be aware of IETF character set requirements <xref target="RFC2279"/> |
---|
286 | <xref target="RFC2277"/>. |
---|
287 | </t> |
---|
288 | |
---|
289 | <section title="Missing Charset" anchor="missing.charset"> |
---|
290 | <t> |
---|
291 | Some HTTP/1.0 software has interpreted a Content-Type header without |
---|
292 | charset parameter incorrectly to mean "recipient should guess." |
---|
293 | Senders wishing to defeat this behavior &MAY; include a charset |
---|
294 | parameter even when the charset is ISO-8859-1 (<xref target="ISO-8859-1"/>) and &SHOULD; do so when |
---|
295 | it is known that it will not confuse the recipient. |
---|
296 | </t> |
---|
297 | <t> |
---|
298 | Unfortunately, some older HTTP/1.0 clients did not deal properly with |
---|
299 | an explicit charset parameter. HTTP/1.1 recipients &MUST; respect the |
---|
300 | charset label provided by the sender; and those user agents that have |
---|
301 | a provision to "guess" a charset &MUST; use the charset from the |
---|
302 | content-type field if they support that charset, rather than the |
---|
303 | recipient's preference, when initially displaying a document. See |
---|
304 | <xref target="canonicalization.and.text.defaults"/>. |
---|
305 | </t> |
---|
306 | </section> |
---|
307 | </section> |
---|
308 | |
---|
309 | <section title="Content Codings" anchor="content.codings"> |
---|
310 | <t> |
---|
311 | Content coding values indicate an encoding transformation that has |
---|
312 | been or can be applied to an entity. Content codings are primarily |
---|
313 | used to allow a document to be compressed or otherwise usefully |
---|
314 | transformed without losing the identity of its underlying media type |
---|
315 | and without loss of information. Frequently, the entity is stored in |
---|
316 | coded form, transmitted directly, and only decoded by the recipient. |
---|
317 | </t> |
---|
318 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="content-coding"/> |
---|
319 | content-coding = token |
---|
320 | </artwork></figure> |
---|
321 | <t> |
---|
322 | All content-coding values are case-insensitive. HTTP/1.1 uses |
---|
323 | content-coding values in the Accept-Encoding (<xref target="header.accept-encoding"/>) and |
---|
324 | Content-Encoding (<xref target="header.content-encoding"/>) header fields. Although the value |
---|
325 | describes the content-coding, what is more important is that it |
---|
326 | indicates what decoding mechanism will be required to remove the |
---|
327 | encoding. |
---|
328 | </t> |
---|
329 | <t> |
---|
330 | The Internet Assigned Numbers Authority (IANA) acts as a registry for |
---|
331 | content-coding value tokens. Initially, the registry contains the |
---|
332 | following tokens: |
---|
333 | </t> |
---|
334 | <t> |
---|
335 | gzip<iref item="gzip"/> |
---|
336 | <list> |
---|
337 | <t> |
---|
338 | An encoding format produced by the file compression program |
---|
339 | "gzip" (GNU zip) as described in <xref target="RFC1952"/>. This format is a |
---|
340 | Lempel-Ziv coding (LZ77) with a 32 bit CRC. |
---|
341 | </t> |
---|
342 | </list> |
---|
343 | </t> |
---|
344 | <t> |
---|
345 | compress<iref item="compress"/> |
---|
346 | <list><t> |
---|
347 | The encoding format produced by the common UNIX file compression |
---|
348 | program "compress". This format is an adaptive Lempel-Ziv-Welch |
---|
349 | coding (LZW). |
---|
350 | </t><t> |
---|
351 | Use of program names for the identification of encoding formats |
---|
352 | is not desirable and is discouraged for future encodings. Their |
---|
353 | use here is representative of historical practice, not good |
---|
354 | design. For compatibility with previous implementations of HTTP, |
---|
355 | applications &SHOULD; consider "x-gzip" and "x-compress" to be |
---|
356 | equivalent to "gzip" and "compress" respectively. |
---|
357 | </t></list> |
---|
358 | </t> |
---|
359 | <t> |
---|
360 | deflate<iref item="deflate"/> |
---|
361 | <list><t> |
---|
362 | The "zlib" format defined in <xref target="RFC1950"/> in combination with |
---|
363 | the "deflate" compression mechanism described in <xref target="RFC1951"/>. |
---|
364 | </t></list> |
---|
365 | </t> |
---|
366 | <t> |
---|
367 | identity<iref item="identity"/> |
---|
368 | <list><t> |
---|
369 | The default (identity) encoding; the use of no transformation |
---|
370 | whatsoever. This content-coding is used only in the Accept-Encoding |
---|
371 | header, and &SHOULD-NOT; be used in the Content-Encoding |
---|
372 | header. |
---|
373 | </t></list> |
---|
374 | </t> |
---|
375 | <t> |
---|
376 | New content-coding value tokens &SHOULD; be registered; to allow |
---|
377 | interoperability between clients and servers, specifications of the |
---|
378 | content coding algorithms needed to implement a new value &SHOULD; be |
---|
379 | publicly available and adequate for independent implementation, and |
---|
380 | conform to the purpose of content coding defined in this section. |
---|
381 | </t> |
---|
382 | </section> |
---|
383 | |
---|
384 | <section title="Media Types" anchor="media.types"> |
---|
385 | <t> |
---|
386 | HTTP uses Internet Media Types <xref target="RFC4288"/> in the Content-Type (<xref target="header.content-type"/>) |
---|
387 | and Accept (<xref target="header.accept"/>) header fields in order to provide |
---|
388 | open and extensible data typing and type negotiation. |
---|
389 | </t> |
---|
390 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="media-type"/><iref primary="true" item="Grammar" subitem="type"/><iref primary="true" item="Grammar" subitem="subtype"/> |
---|
391 | media-type = type "/" subtype *( ";" parameter ) |
---|
392 | type = token |
---|
393 | subtype = token |
---|
394 | </artwork></figure> |
---|
395 | <t> |
---|
396 | Parameters &MAY; follow the type/subtype in the form of attribute/value |
---|
397 | pairs. |
---|
398 | </t> |
---|
399 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="parameter"/><iref primary="true" item="Grammar" subitem="attribute"/><iref primary="true" item="Grammar" subitem="value"/> |
---|
400 | parameter = attribute "=" value |
---|
401 | attribute = token |
---|
402 | value = token | quoted-string |
---|
403 | </artwork></figure> |
---|
404 | <t> |
---|
405 | The type, subtype, and parameter attribute names are case-insensitive. |
---|
406 | Parameter values might or might not be case-sensitive, |
---|
407 | depending on the semantics of the parameter name. Linear white space |
---|
408 | (LWS) &MUST-NOT; be used between the type and subtype, nor between an |
---|
409 | attribute and its value. The presence or absence of a parameter might |
---|
410 | be significant to the processing of a media-type, depending on its |
---|
411 | definition within the media type registry. |
---|
412 | </t> |
---|
413 | <t> |
---|
414 | Note that some older HTTP applications do not recognize media type |
---|
415 | parameters. When sending data to older HTTP applications, |
---|
416 | implementations &SHOULD; only use media type parameters when they are |
---|
417 | required by that type/subtype definition. |
---|
418 | </t> |
---|
419 | <t> |
---|
420 | Media-type values are registered with the Internet Assigned Number |
---|
421 | Authority (IANA). The media type registration process is |
---|
422 | outlined in <xref target="RFC4288"/>. Use of non-registered media types is |
---|
423 | discouraged. |
---|
424 | </t> |
---|
425 | |
---|
426 | <section title="Canonicalization and Text Defaults" anchor="canonicalization.and.text.defaults"> |
---|
427 | <t> |
---|
428 | Internet media types are registered with a canonical form. An |
---|
429 | entity-body transferred via HTTP messages &MUST; be represented in the |
---|
430 | appropriate canonical form prior to its transmission except for |
---|
431 | "text" types, as defined in the next paragraph. |
---|
432 | </t> |
---|
433 | <t> |
---|
434 | When in canonical form, media subtypes of the "text" type use CRLF as |
---|
435 | the text line break. HTTP relaxes this requirement and allows the |
---|
436 | transport of text media with plain CR or LF alone representing a line |
---|
437 | break when it is done consistently for an entire entity-body. HTTP |
---|
438 | applications &MUST; accept CRLF, bare CR, and bare LF as being |
---|
439 | representative of a line break in text media received via HTTP. In |
---|
440 | addition, if the text is represented in a character set that does not |
---|
441 | use octets 13 and 10 for CR and LF respectively, as is the case for |
---|
442 | some multi-byte character sets, HTTP allows the use of whatever octet |
---|
443 | sequences are defined by that character set to represent the |
---|
444 | equivalent of CR and LF for line breaks. This flexibility regarding |
---|
445 | line breaks applies only to text media in the entity-body; a bare CR |
---|
446 | or LF &MUST-NOT; be substituted for CRLF within any of the HTTP control |
---|
447 | structures (such as header fields and multipart boundaries). |
---|
448 | </t> |
---|
449 | <t> |
---|
450 | If an entity-body is encoded with a content-coding, the underlying |
---|
451 | data &MUST; be in a form defined above prior to being encoded. |
---|
452 | </t> |
---|
453 | <t> |
---|
454 | The "charset" parameter is used with some media types to define the |
---|
455 | character set (<xref target="character.sets"/>) of the data. When no explicit charset |
---|
456 | parameter is provided by the sender, media subtypes of the "text" |
---|
457 | type are defined to have a default charset value of "ISO-8859-1" when |
---|
458 | received via HTTP. Data in character sets other than "ISO-8859-1" or |
---|
459 | its subsets &MUST; be labeled with an appropriate charset value. See |
---|
460 | <xref target="missing.charset"/> for compatibility problems. |
---|
461 | </t> |
---|
462 | </section> |
---|
463 | |
---|
464 | <section title="Multipart Types" anchor="multipart.types"> |
---|
465 | <t> |
---|
466 | MIME provides for a number of "multipart" types -- encapsulations of |
---|
467 | one or more entities within a single message-body. All multipart |
---|
468 | types share a common syntax, as defined in <xref target="RFC2046" x:sec="5.1.1" x:fmt="of"/>, |
---|
469 | and &MUST; include a boundary parameter as part of the media type |
---|
470 | value. The message body is itself a protocol element and &MUST; |
---|
471 | therefore use only CRLF to represent line breaks between body-parts. |
---|
472 | Unlike in RFC 2046, the epilogue of any multipart message &MUST; be |
---|
473 | empty; HTTP applications &MUST-NOT; transmit the epilogue (even if the |
---|
474 | original multipart contains an epilogue). These restrictions exist in |
---|
475 | order to preserve the self-delimiting nature of a multipart message-body, |
---|
476 | wherein the "end" of the message-body is indicated by the |
---|
477 | ending multipart boundary. |
---|
478 | </t> |
---|
479 | <t> |
---|
480 | In general, HTTP treats a multipart message-body no differently than |
---|
481 | any other media type: strictly as payload. The one exception is the |
---|
482 | "multipart/byteranges" type (&multipart-byteranges;) when it appears in a 206 |
---|
483 | (Partial Content) response. |
---|
484 | <!-- jre: re-insert removed text pointing to caching? --> |
---|
485 | In all |
---|
486 | other cases, an HTTP user agent &SHOULD; follow the same or similar |
---|
487 | behavior as a MIME user agent would upon receipt of a multipart type. |
---|
488 | The MIME header fields within each body-part of a multipart message-body |
---|
489 | do not have any significance to HTTP beyond that defined by |
---|
490 | their MIME semantics. |
---|
491 | </t> |
---|
492 | <t> |
---|
493 | In general, an HTTP user agent &SHOULD; follow the same or similar |
---|
494 | behavior as a MIME user agent would upon receipt of a multipart type. |
---|
495 | If an application receives an unrecognized multipart subtype, the |
---|
496 | application &MUST; treat it as being equivalent to "multipart/mixed". |
---|
497 | </t> |
---|
498 | <t><list><t> |
---|
499 | <x:h>Note:</x:h> The "multipart/form-data" type has been specifically defined |
---|
500 | for carrying form data suitable for processing via the POST |
---|
501 | request method, as described in <xref target="RFC1867"/>. |
---|
502 | </t></list></t> |
---|
503 | </section> |
---|
504 | </section> |
---|
505 | |
---|
506 | <section title="Quality Values" anchor="quality.values"> |
---|
507 | <t> |
---|
508 | HTTP content negotiation (<xref target="content.negotiation"/>) uses short "floating point" |
---|
509 | numbers to indicate the relative importance ("weight") of various |
---|
510 | negotiable parameters. A weight is normalized to a real number in |
---|
511 | the range 0 through 1, where 0 is the minimum and 1 the maximum |
---|
512 | value. If a parameter has a quality value of 0, then content with |
---|
513 | this parameter is `not acceptable' for the client. HTTP/1.1 |
---|
514 | applications &MUST-NOT; generate more than three digits after the |
---|
515 | decimal point. User configuration of these values &SHOULD; also be |
---|
516 | limited in this fashion. |
---|
517 | </t> |
---|
518 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="qvalue"/> |
---|
519 | qvalue = ( "0" [ "." 0*3DIGIT ] ) |
---|
520 | | ( "1" [ "." 0*3("0") ] ) |
---|
521 | </artwork></figure> |
---|
522 | <t> |
---|
523 | "Quality values" is a misnomer, since these values merely represent |
---|
524 | relative degradation in desired quality. |
---|
525 | </t> |
---|
526 | </section> |
---|
527 | |
---|
528 | <section title="Language Tags" anchor="language.tags"> |
---|
529 | <t> |
---|
530 | A language tag identifies a natural language spoken, written, or |
---|
531 | otherwise conveyed by human beings for communication of information |
---|
532 | to other human beings. Computer languages are explicitly excluded. |
---|
533 | HTTP uses language tags within the Accept-Language and Content-Language |
---|
534 | fields. |
---|
535 | </t> |
---|
536 | <t> |
---|
537 | The syntax and registry of HTTP language tags is the same as that |
---|
538 | defined by <xref target="RFC1766"/>. In summary, a language tag is composed of 1 |
---|
539 | or more parts: A primary language tag and a possibly empty series of |
---|
540 | subtags: |
---|
541 | </t> |
---|
542 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="language-tag"/><iref primary="true" item="Grammar" subitem="primary-tag"/><iref primary="true" item="Grammar" subitem="subtag"/> |
---|
543 | language-tag = primary-tag *( "-" subtag ) |
---|
544 | primary-tag = 1*8ALPHA |
---|
545 | subtag = 1*8ALPHA |
---|
546 | </artwork></figure> |
---|
547 | <t> |
---|
548 | White space is not allowed within the tag and all tags are case-insensitive. |
---|
549 | The name space of language tags is administered by the |
---|
550 | IANA. Example tags include: |
---|
551 | </t> |
---|
552 | <figure><artwork type="example"> |
---|
553 | en, en-US, en-cockney, i-cherokee, x-pig-latin |
---|
554 | </artwork></figure> |
---|
555 | <t> |
---|
556 | where any two-letter primary-tag is an ISO-639 language abbreviation |
---|
557 | and any two-letter initial subtag is an ISO-3166 country code. (The |
---|
558 | last three tags above are not registered tags; all but the last are |
---|
559 | examples of tags which could be registered in future.) |
---|
560 | </t> |
---|
561 | </section> |
---|
562 | </section> |
---|
563 | |
---|
564 | <section title="Entity" anchor="entity"> |
---|
565 | <t> |
---|
566 | Request and Response messages &MAY; transfer an entity if not otherwise |
---|
567 | restricted by the request method or response status code. An entity |
---|
568 | consists of entity-header fields and an entity-body, although some |
---|
569 | responses will only include the entity-headers. |
---|
570 | </t> |
---|
571 | <t> |
---|
572 | In this section, both sender and recipient refer to either the client |
---|
573 | or the server, depending on who sends and who receives the entity. |
---|
574 | </t> |
---|
575 | |
---|
576 | <section title="Entity Header Fields" anchor="entity.header.fields"> |
---|
577 | <t> |
---|
578 | Entity-header fields define metainformation about the entity-body or, |
---|
579 | if no body is present, about the resource identified by the request. |
---|
580 | Some of this metainformation is &OPTIONAL;; some might be &REQUIRED; by |
---|
581 | portions of this specification. |
---|
582 | </t> |
---|
583 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="entity-header"/><iref primary="true" item="Grammar" subitem="extension-header"/> |
---|
584 | entity-header = Allow ; &header-allow; |
---|
585 | | Content-Encoding ; <xref target="header.content-encoding"/> |
---|
586 | | Content-Language ; <xref target="header.content-language"/> |
---|
587 | | Content-Length ; &header-content-length; |
---|
588 | | Content-Location ; <xref target="header.content-location"/> |
---|
589 | | Content-MD5 ; <xref target="header.content-md5"/> |
---|
590 | | Content-Range ; &header-content-range; |
---|
591 | | Content-Type ; <xref target="header.content-type"/> |
---|
592 | | Expires ; &header-expires; |
---|
593 | | Last-Modified ; &header-last-modified; |
---|
594 | | extension-header |
---|
595 | |
---|
596 | extension-header = message-header |
---|
597 | </artwork></figure> |
---|
598 | <t> |
---|
599 | The extension-header mechanism allows additional entity-header fields |
---|
600 | to be defined without changing the protocol, but these fields cannot |
---|
601 | be assumed to be recognizable by the recipient. Unrecognized header |
---|
602 | fields &SHOULD; be ignored by the recipient and &MUST; be forwarded by |
---|
603 | transparent proxies. |
---|
604 | </t> |
---|
605 | </section> |
---|
606 | |
---|
607 | <section title="Entity Body" anchor="entity.body"> |
---|
608 | <t> |
---|
609 | The entity-body (if any) sent with an HTTP request or response is in |
---|
610 | a format and encoding defined by the entity-header fields. |
---|
611 | </t> |
---|
612 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="entity-body"/> |
---|
613 | entity-body = *OCTET |
---|
614 | </artwork></figure> |
---|
615 | <t> |
---|
616 | An entity-body is only present in a message when a message-body is |
---|
617 | present, as described in &message-body;. The entity-body is obtained |
---|
618 | from the message-body by decoding any Transfer-Encoding that might |
---|
619 | have been applied to ensure safe and proper transfer of the message. |
---|
620 | </t> |
---|
621 | |
---|
622 | <section title="Type" anchor="type"> |
---|
623 | <t> |
---|
624 | When an entity-body is included with a message, the data type of that |
---|
625 | body is determined via the header fields Content-Type and Content-Encoding. |
---|
626 | These define a two-layer, ordered encoding model: |
---|
627 | </t> |
---|
628 | <figure><artwork type="example"> |
---|
629 | entity-body := Content-Encoding( Content-Type( data ) ) |
---|
630 | </artwork></figure> |
---|
631 | <t> |
---|
632 | Content-Type specifies the media type of the underlying data. |
---|
633 | Content-Encoding may be used to indicate any additional content |
---|
634 | codings applied to the data, usually for the purpose of data |
---|
635 | compression, that are a property of the requested resource. There is |
---|
636 | no default encoding. |
---|
637 | </t> |
---|
638 | <t> |
---|
639 | Any HTTP/1.1 message containing an entity-body &SHOULD; include a |
---|
640 | Content-Type header field defining the media type of that body. If |
---|
641 | and only if the media type is not given by a Content-Type field, the |
---|
642 | recipient &MAY; attempt to guess the media type via inspection of its |
---|
643 | content and/or the name extension(s) of the URI used to identify the |
---|
644 | resource. If the media type remains unknown, the recipient &SHOULD; |
---|
645 | treat it as type "application/octet-stream". |
---|
646 | </t> |
---|
647 | </section> |
---|
648 | |
---|
649 | <section title="Entity Length" anchor="entity.length"> |
---|
650 | <t> |
---|
651 | The entity-length of a message is the length of the message-body |
---|
652 | before any transfer-codings have been applied. &message-length; defines |
---|
653 | how the transfer-length of a message-body is determined. |
---|
654 | </t> |
---|
655 | </section> |
---|
656 | </section> |
---|
657 | </section> |
---|
658 | |
---|
659 | <section title="Content Negotiation" anchor="content.negotiation"> |
---|
660 | <t> |
---|
661 | Most HTTP responses include an entity which contains information for |
---|
662 | interpretation by a human user. Naturally, it is desirable to supply |
---|
663 | the user with the "best available" entity corresponding to the |
---|
664 | request. Unfortunately for servers and caches, not all users have the |
---|
665 | same preferences for what is "best," and not all user agents are |
---|
666 | equally capable of rendering all entity types. For that reason, HTTP |
---|
667 | has provisions for several mechanisms for "content negotiation" -- |
---|
668 | the process of selecting the best representation for a given response |
---|
669 | when there are multiple representations available. |
---|
670 | <list><t> |
---|
671 | <x:h>Note:</x:h> This is not called "format negotiation" because the |
---|
672 | alternate representations may be of the same media type, but use |
---|
673 | different capabilities of that type, be in different languages, |
---|
674 | etc. |
---|
675 | </t></list> |
---|
676 | </t> |
---|
677 | <t> |
---|
678 | Any response containing an entity-body &MAY; be subject to negotiation, |
---|
679 | including error responses. |
---|
680 | </t> |
---|
681 | <t> |
---|
682 | There are two kinds of content negotiation which are possible in |
---|
683 | HTTP: server-driven and agent-driven negotiation. These two kinds of |
---|
684 | negotiation are orthogonal and thus may be used separately or in |
---|
685 | combination. One method of combination, referred to as transparent |
---|
686 | negotiation, occurs when a cache uses the agent-driven negotiation |
---|
687 | information provided by the origin server in order to provide |
---|
688 | server-driven negotiation for subsequent requests. |
---|
689 | </t> |
---|
690 | |
---|
691 | <section title="Server-driven Negotiation" anchor="server-driven.negotiation"> |
---|
692 | <t> |
---|
693 | If the selection of the best representation for a response is made by |
---|
694 | an algorithm located at the server, it is called server-driven |
---|
695 | negotiation. Selection is based on the available representations of |
---|
696 | the response (the dimensions over which it can vary; e.g. language, |
---|
697 | content-coding, etc.) and the contents of particular header fields in |
---|
698 | the request message or on other information pertaining to the request |
---|
699 | (such as the network address of the client). |
---|
700 | </t> |
---|
701 | <t> |
---|
702 | Server-driven negotiation is advantageous when the algorithm for |
---|
703 | selecting from among the available representations is difficult to |
---|
704 | describe to the user agent, or when the server desires to send its |
---|
705 | "best guess" to the client along with the first response (hoping to |
---|
706 | avoid the round-trip delay of a subsequent request if the "best |
---|
707 | guess" is good enough for the user). In order to improve the server's |
---|
708 | guess, the user agent &MAY; include request header fields (Accept, |
---|
709 | Accept-Language, Accept-Encoding, etc.) which describe its |
---|
710 | preferences for such a response. |
---|
711 | </t> |
---|
712 | <t> |
---|
713 | Server-driven negotiation has disadvantages: |
---|
714 | <list style="numbers"> |
---|
715 | <t> |
---|
716 | It is impossible for the server to accurately determine what |
---|
717 | might be "best" for any given user, since that would require |
---|
718 | complete knowledge of both the capabilities of the user agent |
---|
719 | and the intended use for the response (e.g., does the user want |
---|
720 | to view it on screen or print it on paper?). |
---|
721 | </t> |
---|
722 | <t> |
---|
723 | Having the user agent describe its capabilities in every |
---|
724 | request can be both very inefficient (given that only a small |
---|
725 | percentage of responses have multiple representations) and a |
---|
726 | potential violation of the user's privacy. |
---|
727 | </t> |
---|
728 | <t> |
---|
729 | It complicates the implementation of an origin server and the |
---|
730 | algorithms for generating responses to a request. |
---|
731 | </t> |
---|
732 | <t> |
---|
733 | It may limit a public cache's ability to use the same response |
---|
734 | for multiple user's requests. |
---|
735 | </t> |
---|
736 | </list> |
---|
737 | </t> |
---|
738 | <t> |
---|
739 | HTTP/1.1 includes the following request-header fields for enabling |
---|
740 | server-driven negotiation through description of user agent |
---|
741 | capabilities and user preferences: Accept (<xref target="header.accept"/>), Accept-Charset |
---|
742 | (<xref target="header.accept-charset"/>), Accept-Encoding (<xref target="header.accept-encoding"/>), Accept-Language |
---|
743 | (<xref target="header.accept-language"/>), and User-Agent (&header-user-agent;). However, an |
---|
744 | origin server is not limited to these dimensions and &MAY; vary the |
---|
745 | response based on any aspect of the request, including information |
---|
746 | outside the request-header fields or within extension header fields |
---|
747 | not defined by this specification. |
---|
748 | </t> |
---|
749 | <t> |
---|
750 | The Vary header field (&header-vary;) can be used to express the parameters the |
---|
751 | server uses to select a representation that is subject to server-driven |
---|
752 | negotiation. |
---|
753 | </t> |
---|
754 | </section> |
---|
755 | |
---|
756 | <section title="Agent-driven Negotiation" anchor="agent-driven.negotiation"> |
---|
757 | <t> |
---|
758 | With agent-driven negotiation, selection of the best representation |
---|
759 | for a response is performed by the user agent after receiving an |
---|
760 | initial response from the origin server. Selection is based on a list |
---|
761 | of the available representations of the response included within the |
---|
762 | header fields or entity-body of the initial response, with each |
---|
763 | representation identified by its own URI. Selection from among the |
---|
764 | representations may be performed automatically (if the user agent is |
---|
765 | capable of doing so) or manually by the user selecting from a |
---|
766 | generated (possibly hypertext) menu. |
---|
767 | </t> |
---|
768 | <t> |
---|
769 | Agent-driven negotiation is advantageous when the response would vary |
---|
770 | over commonly-used dimensions (such as type, language, or encoding), |
---|
771 | when the origin server is unable to determine a user agent's |
---|
772 | capabilities from examining the request, and generally when public |
---|
773 | caches are used to distribute server load and reduce network usage. |
---|
774 | </t> |
---|
775 | <t> |
---|
776 | Agent-driven negotiation suffers from the disadvantage of needing a |
---|
777 | second request to obtain the best alternate representation. This |
---|
778 | second request is only efficient when caching is used. In addition, |
---|
779 | this specification does not define any mechanism for supporting |
---|
780 | automatic selection, though it also does not prevent any such |
---|
781 | mechanism from being developed as an extension and used within |
---|
782 | HTTP/1.1. |
---|
783 | </t> |
---|
784 | <t> |
---|
785 | HTTP/1.1 defines the 300 (Multiple Choices) and 406 (Not Acceptable) |
---|
786 | status codes for enabling agent-driven negotiation when the server is |
---|
787 | unwilling or unable to provide a varying response using server-driven |
---|
788 | negotiation. |
---|
789 | </t> |
---|
790 | </section> |
---|
791 | |
---|
792 | <section title="Transparent Negotiation" anchor="transparent.negotiation"> |
---|
793 | <t> |
---|
794 | Transparent negotiation is a combination of both server-driven and |
---|
795 | agent-driven negotiation. When a cache is supplied with a form of the |
---|
796 | list of available representations of the response (as in agent-driven |
---|
797 | negotiation) and the dimensions of variance are completely understood |
---|
798 | by the cache, then the cache becomes capable of performing server-driven |
---|
799 | negotiation on behalf of the origin server for subsequent |
---|
800 | requests on that resource. |
---|
801 | </t> |
---|
802 | <t> |
---|
803 | Transparent negotiation has the advantage of distributing the |
---|
804 | negotiation work that would otherwise be required of the origin |
---|
805 | server and also removing the second request delay of agent-driven |
---|
806 | negotiation when the cache is able to correctly guess the right |
---|
807 | response. |
---|
808 | </t> |
---|
809 | <t> |
---|
810 | This specification does not define any mechanism for transparent |
---|
811 | negotiation, though it also does not prevent any such mechanism from |
---|
812 | being developed as an extension that could be used within HTTP/1.1. |
---|
813 | </t> |
---|
814 | </section> |
---|
815 | </section> |
---|
816 | |
---|
817 | <section title="Header Field Definitions" anchor="header.fields"> |
---|
818 | <t> |
---|
819 | This section defines the syntax and semantics of HTTP/1.1 header fields |
---|
820 | related to the payload of messages. |
---|
821 | </t> |
---|
822 | <t> |
---|
823 | For entity-header fields, both sender and recipient refer to either the |
---|
824 | client or the server, depending on who sends and who receives the entity. |
---|
825 | </t> |
---|
826 | |
---|
827 | <section title="Accept" anchor="header.accept"> |
---|
828 | <iref primary="true" item="Accept header" x:for-anchor=""/> |
---|
829 | <iref primary="true" item="Headers" subitem="Accept" x:for-anchor=""/> |
---|
830 | <t> |
---|
831 | The Accept request-header field can be used to specify certain media |
---|
832 | types which are acceptable for the response. Accept headers can be |
---|
833 | used to indicate that the request is specifically limited to a small |
---|
834 | set of desired types, as in the case of a request for an in-line |
---|
835 | image. |
---|
836 | </t> |
---|
837 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Accept"/><iref primary="true" item="Grammar" subitem="media-range"/><iref primary="true" item="Grammar" subitem="accept-params"/><iref primary="true" item="Grammar" subitem="accept-extension"/> |
---|
838 | Accept = "Accept" ":" |
---|
839 | #( media-range [ accept-params ] ) |
---|
840 | |
---|
841 | media-range = ( "*/*" |
---|
842 | | ( type "/" "*" ) |
---|
843 | | ( type "/" subtype ) |
---|
844 | ) *( ";" parameter ) |
---|
845 | accept-params = ";" "q" "=" qvalue *( accept-extension ) |
---|
846 | accept-extension = ";" token [ "=" ( token | quoted-string ) ] |
---|
847 | </artwork></figure> |
---|
848 | <t> |
---|
849 | The asterisk "*" character is used to group media types into ranges, |
---|
850 | with "*/*" indicating all media types and "type/*" indicating all |
---|
851 | subtypes of that type. The media-range &MAY; include media type |
---|
852 | parameters that are applicable to that range. |
---|
853 | </t> |
---|
854 | <t> |
---|
855 | Each media-range &MAY; be followed by one or more accept-params, |
---|
856 | beginning with the "q" parameter for indicating a relative quality |
---|
857 | factor. The first "q" parameter (if any) separates the media-range |
---|
858 | parameter(s) from the accept-params. Quality factors allow the user |
---|
859 | or user agent to indicate the relative degree of preference for that |
---|
860 | media-range, using the qvalue scale from 0 to 1 (<xref target="quality.values"/>). The |
---|
861 | default value is q=1. |
---|
862 | <list><t> |
---|
863 | <x:h>Note:</x:h> Use of the "q" parameter name to separate media type |
---|
864 | parameters from Accept extension parameters is due to historical |
---|
865 | practice. Although this prevents any media type parameter named |
---|
866 | "q" from being used with a media range, such an event is believed |
---|
867 | to be unlikely given the lack of any "q" parameters in the IANA |
---|
868 | media type registry and the rare usage of any media type |
---|
869 | parameters in Accept. Future media types are discouraged from |
---|
870 | registering any parameter named "q". |
---|
871 | </t></list> |
---|
872 | </t> |
---|
873 | <t> |
---|
874 | The example |
---|
875 | </t> |
---|
876 | <figure><artwork type="example"> |
---|
877 | Accept: audio/*; q=0.2, audio/basic |
---|
878 | </artwork></figure> |
---|
879 | <t> |
---|
880 | &SHOULD; be interpreted as "I prefer audio/basic, but send me any audio |
---|
881 | type if it is the best available after an 80% mark-down in quality." |
---|
882 | </t> |
---|
883 | <t> |
---|
884 | If no Accept header field is present, then it is assumed that the |
---|
885 | client accepts all media types. If an Accept header field is present, |
---|
886 | and if the server cannot send a response which is acceptable |
---|
887 | according to the combined Accept field value, then the server &SHOULD; |
---|
888 | send a 406 (not acceptable) response. |
---|
889 | </t> |
---|
890 | <t> |
---|
891 | A more elaborate example is |
---|
892 | </t> |
---|
893 | <figure><artwork type="example"> |
---|
894 | Accept: text/plain; q=0.5, text/html, |
---|
895 | text/x-dvi; q=0.8, text/x-c |
---|
896 | </artwork></figure> |
---|
897 | <t> |
---|
898 | Verbally, this would be interpreted as "text/html and text/x-c are |
---|
899 | the preferred media types, but if they do not exist, then send the |
---|
900 | text/x-dvi entity, and if that does not exist, send the text/plain |
---|
901 | entity." |
---|
902 | </t> |
---|
903 | <t> |
---|
904 | Media ranges can be overridden by more specific media ranges or |
---|
905 | specific media types. If more than one media range applies to a given |
---|
906 | type, the most specific reference has precedence. For example, |
---|
907 | </t> |
---|
908 | <figure><artwork type="example"> |
---|
909 | Accept: text/*, text/html, text/html;level=1, */* |
---|
910 | </artwork></figure> |
---|
911 | <t> |
---|
912 | have the following precedence: |
---|
913 | </t> |
---|
914 | <figure><artwork type="example"> |
---|
915 | 1) text/html;level=1 |
---|
916 | 2) text/html |
---|
917 | 3) text/* |
---|
918 | 4) */* |
---|
919 | </artwork></figure> |
---|
920 | <t> |
---|
921 | The media type quality factor associated with a given type is |
---|
922 | determined by finding the media range with the highest precedence |
---|
923 | which matches that type. For example, |
---|
924 | </t> |
---|
925 | <figure><artwork type="example"> |
---|
926 | Accept: text/*;q=0.3, text/html;q=0.7, text/html;level=1, |
---|
927 | text/html;level=2;q=0.4, */*;q=0.5 |
---|
928 | </artwork></figure> |
---|
929 | <t> |
---|
930 | would cause the following values to be associated: |
---|
931 | </t> |
---|
932 | <figure><artwork type="example"> |
---|
933 | text/html;level=1 = 1 |
---|
934 | text/html = 0.7 |
---|
935 | text/plain = 0.3 |
---|
936 | image/jpeg = 0.5 |
---|
937 | text/html;level=2 = 0.4 |
---|
938 | text/html;level=3 = 0.7 |
---|
939 | </artwork></figure> |
---|
940 | <t> |
---|
941 | <x:h>Note:</x:h> A user agent might be provided with a default set of quality |
---|
942 | values for certain media ranges. However, unless the user agent is |
---|
943 | a closed system which cannot interact with other rendering agents, |
---|
944 | this default set ought to be configurable by the user. |
---|
945 | </t> |
---|
946 | </section> |
---|
947 | |
---|
948 | <section title="Accept-Charset" anchor="header.accept-charset"> |
---|
949 | <iref primary="true" item="Accept-Charset header" x:for-anchor=""/> |
---|
950 | <iref primary="true" item="Headers" subitem="Accept-Charset" x:for-anchor=""/> |
---|
951 | <t> |
---|
952 | The Accept-Charset request-header field can be used to indicate what |
---|
953 | character sets are acceptable for the response. This field allows |
---|
954 | clients capable of understanding more comprehensive or special-purpose |
---|
955 | character sets to signal that capability to a server which is |
---|
956 | capable of representing documents in those character sets. |
---|
957 | </t> |
---|
958 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Accept-Charset"/> |
---|
959 | Accept-Charset = "Accept-Charset" ":" |
---|
960 | 1#( ( charset | "*" )[ ";" "q" "=" qvalue ] ) |
---|
961 | </artwork></figure> |
---|
962 | <t> |
---|
963 | Character set values are described in <xref target="character.sets"/>. Each charset &MAY; |
---|
964 | be given an associated quality value which represents the user's |
---|
965 | preference for that charset. The default value is q=1. An example is |
---|
966 | </t> |
---|
967 | <figure><artwork type="example"> |
---|
968 | Accept-Charset: iso-8859-5, unicode-1-1;q=0.8 |
---|
969 | </artwork></figure> |
---|
970 | <t> |
---|
971 | The special value "*", if present in the Accept-Charset field, |
---|
972 | matches every character set (including ISO-8859-1) which is not |
---|
973 | mentioned elsewhere in the Accept-Charset field. If no "*" is present |
---|
974 | in an Accept-Charset field, then all character sets not explicitly |
---|
975 | mentioned get a quality value of 0, except for ISO-8859-1, which gets |
---|
976 | a quality value of 1 if not explicitly mentioned. |
---|
977 | </t> |
---|
978 | <t> |
---|
979 | If no Accept-Charset header is present, the default is that any |
---|
980 | character set is acceptable. If an Accept-Charset header is present, |
---|
981 | and if the server cannot send a response which is acceptable |
---|
982 | according to the Accept-Charset header, then the server &SHOULD; send |
---|
983 | an error response with the 406 (not acceptable) status code, though |
---|
984 | the sending of an unacceptable response is also allowed. |
---|
985 | </t> |
---|
986 | </section> |
---|
987 | |
---|
988 | <section title="Accept-Encoding" anchor="header.accept-encoding"> |
---|
989 | <iref primary="true" item="Accept-Encoding header" x:for-anchor=""/> |
---|
990 | <iref primary="true" item="Headers" subitem="Accept-Encoding" x:for-anchor=""/> |
---|
991 | <t> |
---|
992 | The Accept-Encoding request-header field is similar to Accept, but |
---|
993 | restricts the content-codings (<xref target="content.codings"/>) that are acceptable in |
---|
994 | the response. |
---|
995 | </t> |
---|
996 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Accept-Encoding"/><iref primary="true" item="Grammar" subitem="codings"/> |
---|
997 | Accept-Encoding = "Accept-Encoding" ":" |
---|
998 | #( codings [ ";" "q" "=" qvalue ] ) |
---|
999 | codings = ( content-coding | "*" ) |
---|
1000 | </artwork></figure> |
---|
1001 | <t> |
---|
1002 | Examples of its use are: |
---|
1003 | </t> |
---|
1004 | <figure><artwork type="example"> |
---|
1005 | Accept-Encoding: compress, gzip |
---|
1006 | Accept-Encoding: |
---|
1007 | Accept-Encoding: * |
---|
1008 | Accept-Encoding: compress;q=0.5, gzip;q=1.0 |
---|
1009 | Accept-Encoding: gzip;q=1.0, identity; q=0.5, *;q=0 |
---|
1010 | </artwork></figure> |
---|
1011 | <t> |
---|
1012 | A server tests whether a content-coding is acceptable, according to |
---|
1013 | an Accept-Encoding field, using these rules: |
---|
1014 | <list style="numbers"> |
---|
1015 | <t>If the content-coding is one of the content-codings listed in |
---|
1016 | the Accept-Encoding field, then it is acceptable, unless it is |
---|
1017 | accompanied by a qvalue of 0. (As defined in <xref target="quality.values"/>, a |
---|
1018 | qvalue of 0 means "not acceptable.")</t> |
---|
1019 | |
---|
1020 | <t>The special "*" symbol in an Accept-Encoding field matches any |
---|
1021 | available content-coding not explicitly listed in the header |
---|
1022 | field.</t> |
---|
1023 | |
---|
1024 | <t>If multiple content-codings are acceptable, then the acceptable |
---|
1025 | content-coding with the highest non-zero qvalue is preferred.</t> |
---|
1026 | |
---|
1027 | <t>The "identity" content-coding is always acceptable, unless |
---|
1028 | specifically refused because the Accept-Encoding field includes |
---|
1029 | "identity;q=0", or because the field includes "*;q=0" and does |
---|
1030 | not explicitly include the "identity" content-coding. If the |
---|
1031 | Accept-Encoding field-value is empty, then only the "identity" |
---|
1032 | encoding is acceptable.</t> |
---|
1033 | </list> |
---|
1034 | </t> |
---|
1035 | <t> |
---|
1036 | If an Accept-Encoding field is present in a request, and if the |
---|
1037 | server cannot send a response which is acceptable according to the |
---|
1038 | Accept-Encoding header, then the server &SHOULD; send an error response |
---|
1039 | with the 406 (Not Acceptable) status code. |
---|
1040 | </t> |
---|
1041 | <t> |
---|
1042 | If no Accept-Encoding field is present in a request, the server &MAY; |
---|
1043 | assume that the client will accept any content coding. In this case, |
---|
1044 | if "identity" is one of the available content-codings, then the |
---|
1045 | server &SHOULD; use the "identity" content-coding, unless it has |
---|
1046 | additional information that a different content-coding is meaningful |
---|
1047 | to the client. |
---|
1048 | <list><t> |
---|
1049 | <x:h>Note:</x:h> If the request does not include an Accept-Encoding field, |
---|
1050 | and if the "identity" content-coding is unavailable, then |
---|
1051 | content-codings commonly understood by HTTP/1.0 clients (i.e., |
---|
1052 | "gzip" and "compress") are preferred; some older clients |
---|
1053 | improperly display messages sent with other content-codings. The |
---|
1054 | server might also make this decision based on information about |
---|
1055 | the particular user-agent or client. |
---|
1056 | </t><t> |
---|
1057 | <x:h>Note:</x:h> Most HTTP/1.0 applications do not recognize or obey qvalues |
---|
1058 | associated with content-codings. This means that qvalues will not |
---|
1059 | work and are not permitted with x-gzip or x-compress. |
---|
1060 | </t></list> |
---|
1061 | </t> |
---|
1062 | </section> |
---|
1063 | |
---|
1064 | <section title="Accept-Language" anchor="header.accept-language"> |
---|
1065 | <iref primary="true" item="Accept-Language header" x:for-anchor=""/> |
---|
1066 | <iref primary="true" item="Headers" subitem="Accept-Language" x:for-anchor=""/> |
---|
1067 | <t> |
---|
1068 | The Accept-Language request-header field is similar to Accept, but |
---|
1069 | restricts the set of natural languages that are preferred as a |
---|
1070 | response to the request. Language tags are defined in <xref target="language.tags"/>. |
---|
1071 | </t> |
---|
1072 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Accept-Language"/><iref primary="true" item="Grammar" subitem="language-range"/> |
---|
1073 | Accept-Language = "Accept-Language" ":" |
---|
1074 | 1#( language-range [ ";" "q" "=" qvalue ] ) |
---|
1075 | language-range = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) | "*" ) |
---|
1076 | </artwork></figure> |
---|
1077 | <t> |
---|
1078 | Each language-range &MAY; be given an associated quality value which |
---|
1079 | represents an estimate of the user's preference for the languages |
---|
1080 | specified by that range. The quality value defaults to "q=1". For |
---|
1081 | example, |
---|
1082 | </t> |
---|
1083 | <figure><artwork type="example"> |
---|
1084 | Accept-Language: da, en-gb;q=0.8, en;q=0.7 |
---|
1085 | </artwork></figure> |
---|
1086 | <t> |
---|
1087 | would mean: "I prefer Danish, but will accept British English and |
---|
1088 | other types of English." A language-range matches a language-tag if |
---|
1089 | it exactly equals the tag, or if it exactly equals a prefix of the |
---|
1090 | tag such that the first tag character following the prefix is "-". |
---|
1091 | The special range "*", if present in the Accept-Language field, |
---|
1092 | matches every tag not matched by any other range present in the |
---|
1093 | Accept-Language field. |
---|
1094 | <list><t> |
---|
1095 | <x:h>Note:</x:h> This use of a prefix matching rule does not imply that |
---|
1096 | language tags are assigned to languages in such a way that it is |
---|
1097 | always true that if a user understands a language with a certain |
---|
1098 | tag, then this user will also understand all languages with tags |
---|
1099 | for which this tag is a prefix. The prefix rule simply allows the |
---|
1100 | use of prefix tags if this is the case. |
---|
1101 | </t></list> |
---|
1102 | </t> |
---|
1103 | <t> |
---|
1104 | The language quality factor assigned to a language-tag by the |
---|
1105 | Accept-Language field is the quality value of the longest language-range |
---|
1106 | in the field that matches the language-tag. If no language-range |
---|
1107 | in the field matches the tag, the language quality factor |
---|
1108 | assigned is 0. If no Accept-Language header is present in the |
---|
1109 | request, the server |
---|
1110 | &SHOULD; assume that all languages are equally acceptable. If an |
---|
1111 | Accept-Language header is present, then all languages which are |
---|
1112 | assigned a quality factor greater than 0 are acceptable. |
---|
1113 | </t> |
---|
1114 | <t> |
---|
1115 | It might be contrary to the privacy expectations of the user to send |
---|
1116 | an Accept-Language header with the complete linguistic preferences of |
---|
1117 | the user in every request. For a discussion of this issue, see |
---|
1118 | <xref target="privacy.issues.connected.to.accept.headers"/>. |
---|
1119 | </t> |
---|
1120 | <t> |
---|
1121 | As intelligibility is highly dependent on the individual user, it is |
---|
1122 | recommended that client applications make the choice of linguistic |
---|
1123 | preference available to the user. If the choice is not made |
---|
1124 | available, then the Accept-Language header field &MUST-NOT; be given in |
---|
1125 | the request. |
---|
1126 | <list><t> |
---|
1127 | <x:h>Note:</x:h> When making the choice of linguistic preference available to |
---|
1128 | the user, we remind implementors of the fact that users are not |
---|
1129 | familiar with the details of language matching as described above, |
---|
1130 | and should provide appropriate guidance. As an example, users |
---|
1131 | might assume that on selecting "en-gb", they will be served any |
---|
1132 | kind of English document if British English is not available. A |
---|
1133 | user agent might suggest in such a case to add "en" to get the |
---|
1134 | best matching behavior. |
---|
1135 | </t></list> |
---|
1136 | </t> |
---|
1137 | </section> |
---|
1138 | |
---|
1139 | <section title="Content-Encoding" anchor="header.content-encoding"> |
---|
1140 | <iref primary="true" item="Content-Encoding header" x:for-anchor=""/> |
---|
1141 | <iref primary="true" item="Headers" subitem="Content-Encoding" x:for-anchor=""/> |
---|
1142 | <t> |
---|
1143 | The Content-Encoding entity-header field is used as a modifier to the |
---|
1144 | media-type. When present, its value indicates what additional content |
---|
1145 | codings have been applied to the entity-body, and thus what decoding |
---|
1146 | mechanisms must be applied in order to obtain the media-type |
---|
1147 | referenced by the Content-Type header field. Content-Encoding is |
---|
1148 | primarily used to allow a document to be compressed without losing |
---|
1149 | the identity of its underlying media type. |
---|
1150 | </t> |
---|
1151 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Content-Encoding"/> |
---|
1152 | Content-Encoding = "Content-Encoding" ":" 1#content-coding |
---|
1153 | </artwork></figure> |
---|
1154 | <t> |
---|
1155 | Content codings are defined in <xref target="content.codings"/>. An example of its use is |
---|
1156 | </t> |
---|
1157 | <figure><artwork type="example"> |
---|
1158 | Content-Encoding: gzip |
---|
1159 | </artwork></figure> |
---|
1160 | <t> |
---|
1161 | The content-coding is a characteristic of the entity identified by |
---|
1162 | the Request-URI. Typically, the entity-body is stored with this |
---|
1163 | encoding and is only decoded before rendering or analogous usage. |
---|
1164 | However, a non-transparent proxy &MAY; modify the content-coding if the |
---|
1165 | new coding is known to be acceptable to the recipient, unless the |
---|
1166 | "no-transform" cache-control directive is present in the message. |
---|
1167 | </t> |
---|
1168 | <t> |
---|
1169 | If the content-coding of an entity is not "identity", then the |
---|
1170 | response &MUST; include a Content-Encoding entity-header (<xref target="header.content-encoding"/>) |
---|
1171 | that lists the non-identity content-coding(s) used. |
---|
1172 | </t> |
---|
1173 | <t> |
---|
1174 | If the content-coding of an entity in a request message is not |
---|
1175 | acceptable to the origin server, the server &SHOULD; respond with a |
---|
1176 | status code of 415 (Unsupported Media Type). |
---|
1177 | </t> |
---|
1178 | <t> |
---|
1179 | If multiple encodings have been applied to an entity, the content |
---|
1180 | codings &MUST; be listed in the order in which they were applied. |
---|
1181 | Additional information about the encoding parameters &MAY; be provided |
---|
1182 | by other entity-header fields not defined by this specification. |
---|
1183 | </t> |
---|
1184 | </section> |
---|
1185 | |
---|
1186 | <section title="Content-Language" anchor="header.content-language"> |
---|
1187 | <iref primary="true" item="Content-Language header" x:for-anchor=""/> |
---|
1188 | <iref primary="true" item="Headers" subitem="Content-Language" x:for-anchor=""/> |
---|
1189 | <t> |
---|
1190 | The Content-Language entity-header field describes the natural |
---|
1191 | language(s) of the intended audience for the enclosed entity. Note |
---|
1192 | that this might not be equivalent to all the languages used within |
---|
1193 | the entity-body. |
---|
1194 | </t> |
---|
1195 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Content-Language"/> |
---|
1196 | Content-Language = "Content-Language" ":" 1#language-tag |
---|
1197 | </artwork></figure> |
---|
1198 | <t> |
---|
1199 | Language tags are defined in <xref target="language.tags"/>. The primary purpose of |
---|
1200 | Content-Language is to allow a user to identify and differentiate |
---|
1201 | entities according to the user's own preferred language. Thus, if the |
---|
1202 | body content is intended only for a Danish-literate audience, the |
---|
1203 | appropriate field is |
---|
1204 | </t> |
---|
1205 | <figure><artwork type="example"> |
---|
1206 | Content-Language: da |
---|
1207 | </artwork></figure> |
---|
1208 | <t> |
---|
1209 | If no Content-Language is specified, the default is that the content |
---|
1210 | is intended for all language audiences. This might mean that the |
---|
1211 | sender does not consider it to be specific to any natural language, |
---|
1212 | or that the sender does not know for which language it is intended. |
---|
1213 | </t> |
---|
1214 | <t> |
---|
1215 | Multiple languages &MAY; be listed for content that is intended for |
---|
1216 | multiple audiences. For example, a rendition of the "Treaty of |
---|
1217 | Waitangi," presented simultaneously in the original Maori and English |
---|
1218 | versions, would call for |
---|
1219 | </t> |
---|
1220 | <figure><artwork type="example"> |
---|
1221 | Content-Language: mi, en |
---|
1222 | </artwork></figure> |
---|
1223 | <t> |
---|
1224 | However, just because multiple languages are present within an entity |
---|
1225 | does not mean that it is intended for multiple linguistic audiences. |
---|
1226 | An example would be a beginner's language primer, such as "A First |
---|
1227 | Lesson in Latin," which is clearly intended to be used by an |
---|
1228 | English-literate audience. In this case, the Content-Language would |
---|
1229 | properly only include "en". |
---|
1230 | </t> |
---|
1231 | <t> |
---|
1232 | Content-Language &MAY; be applied to any media type -- it is not |
---|
1233 | limited to textual documents. |
---|
1234 | </t> |
---|
1235 | </section> |
---|
1236 | |
---|
1237 | <section title="Content-Location" anchor="header.content-location"> |
---|
1238 | <iref primary="true" item="Content-Location header" x:for-anchor=""/> |
---|
1239 | <iref primary="true" item="Headers" subitem="Content-Location" x:for-anchor=""/> |
---|
1240 | <t> |
---|
1241 | The Content-Location entity-header field &MAY; be used to supply the |
---|
1242 | resource location for the entity enclosed in the message when that |
---|
1243 | entity is accessible from a location separate from the requested |
---|
1244 | resource's URI. A server &SHOULD; provide a Content-Location for the |
---|
1245 | variant corresponding to the response entity; especially in the case |
---|
1246 | where a resource has multiple entities associated with it, and those |
---|
1247 | entities actually have separate locations by which they might be |
---|
1248 | individually accessed, the server &SHOULD; provide a Content-Location |
---|
1249 | for the particular variant which is returned. |
---|
1250 | </t> |
---|
1251 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Content-Location"/> |
---|
1252 | Content-Location = "Content-Location" ":" |
---|
1253 | ( absoluteURI | relativeURI ) |
---|
1254 | </artwork></figure> |
---|
1255 | <t> |
---|
1256 | The value of Content-Location also defines the base URI for the |
---|
1257 | entity. |
---|
1258 | </t> |
---|
1259 | <t> |
---|
1260 | The Content-Location value is not a replacement for the original |
---|
1261 | requested URI; it is only a statement of the location of the resource |
---|
1262 | corresponding to this particular entity at the time of the request. |
---|
1263 | Future requests &MAY; specify the Content-Location URI as the request-URI |
---|
1264 | if the desire is to identify the source of that particular |
---|
1265 | entity. |
---|
1266 | </t> |
---|
1267 | <t> |
---|
1268 | A cache cannot assume that an entity with a Content-Location |
---|
1269 | different from the URI used to retrieve it can be used to respond to |
---|
1270 | later requests on that Content-Location URI. However, the Content-Location |
---|
1271 | can be used to differentiate between multiple entities |
---|
1272 | retrieved from a single requested resource, as described in &caching-neg-resp;. |
---|
1273 | </t> |
---|
1274 | <t> |
---|
1275 | If the Content-Location is a relative URI, the relative URI is |
---|
1276 | interpreted relative to the Request-URI. |
---|
1277 | </t> |
---|
1278 | <t> |
---|
1279 | The meaning of the Content-Location header in PUT or POST requests is |
---|
1280 | undefined; servers are free to ignore it in those cases. |
---|
1281 | </t> |
---|
1282 | </section> |
---|
1283 | |
---|
1284 | <section title="Content-MD5" anchor="header.content-md5"> |
---|
1285 | <iref primary="true" item="Content-MD5 header" x:for-anchor=""/> |
---|
1286 | <iref primary="true" item="Headers" subitem="Content-MD5" x:for-anchor=""/> |
---|
1287 | <t> |
---|
1288 | The Content-MD5 entity-header field, as defined in <xref target="RFC1864"/>, is |
---|
1289 | an MD5 digest of the entity-body for the purpose of providing an |
---|
1290 | end-to-end message integrity check (MIC) of the entity-body. (Note: a |
---|
1291 | MIC is good for detecting accidental modification of the entity-body |
---|
1292 | in transit, but is not proof against malicious attacks.) |
---|
1293 | </t> |
---|
1294 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Content-MD5"/><iref primary="true" item="Grammar" subitem="md5-digest"/> |
---|
1295 | Content-MD5 = "Content-MD5" ":" md5-digest |
---|
1296 | md5-digest = <base64 of 128 bit MD5 digest as per <xref target="RFC1864"/>> |
---|
1297 | </artwork></figure> |
---|
1298 | <t> |
---|
1299 | The Content-MD5 header field &MAY; be generated by an origin server or |
---|
1300 | client to function as an integrity check of the entity-body. Only |
---|
1301 | origin servers or clients &MAY; generate the Content-MD5 header field; |
---|
1302 | proxies and gateways &MUST-NOT; generate it, as this would defeat its |
---|
1303 | value as an end-to-end integrity check. Any recipient of the entity-body, |
---|
1304 | including gateways and proxies, &MAY; check that the digest value |
---|
1305 | in this header field matches that of the entity-body as received. |
---|
1306 | </t> |
---|
1307 | <t> |
---|
1308 | The MD5 digest is computed based on the content of the entity-body, |
---|
1309 | including any content-coding that has been applied, but not including |
---|
1310 | any transfer-encoding applied to the message-body. If the message is |
---|
1311 | received with a transfer-encoding, that encoding &MUST; be removed |
---|
1312 | prior to checking the Content-MD5 value against the received entity. |
---|
1313 | </t> |
---|
1314 | <t> |
---|
1315 | This has the result that the digest is computed on the octets of the |
---|
1316 | entity-body exactly as, and in the order that, they would be sent if |
---|
1317 | no transfer-encoding were being applied. |
---|
1318 | </t> |
---|
1319 | <t> |
---|
1320 | HTTP extends RFC 1864 to permit the digest to be computed for MIME |
---|
1321 | composite media-types (e.g., multipart/* and message/rfc822), but |
---|
1322 | this does not change how the digest is computed as defined in the |
---|
1323 | preceding paragraph. |
---|
1324 | </t> |
---|
1325 | <t> |
---|
1326 | There are several consequences of this. The entity-body for composite |
---|
1327 | types &MAY; contain many body-parts, each with its own MIME and HTTP |
---|
1328 | headers (including Content-MD5, Content-Transfer-Encoding, and |
---|
1329 | Content-Encoding headers). If a body-part has a Content-Transfer-Encoding |
---|
1330 | or Content-Encoding header, it is assumed that the content |
---|
1331 | of the body-part has had the encoding applied, and the body-part is |
---|
1332 | included in the Content-MD5 digest as is -- i.e., after the |
---|
1333 | application. The Transfer-Encoding header field is not allowed within |
---|
1334 | body-parts. |
---|
1335 | </t> |
---|
1336 | <t> |
---|
1337 | Conversion of all line breaks to CRLF &MUST-NOT; be done before |
---|
1338 | computing or checking the digest: the line break convention used in |
---|
1339 | the text actually transmitted &MUST; be left unaltered when computing |
---|
1340 | the digest. |
---|
1341 | <list><t> |
---|
1342 | <x:h>Note:</x:h> while the definition of Content-MD5 is exactly the same for |
---|
1343 | HTTP as in RFC 1864 for MIME entity-bodies, there are several ways |
---|
1344 | in which the application of Content-MD5 to HTTP entity-bodies |
---|
1345 | differs from its application to MIME entity-bodies. One is that |
---|
1346 | HTTP, unlike MIME, does not use Content-Transfer-Encoding, and |
---|
1347 | does use Transfer-Encoding and Content-Encoding. Another is that |
---|
1348 | HTTP more frequently uses binary content types than MIME, so it is |
---|
1349 | worth noting that, in such cases, the byte order used to compute |
---|
1350 | the digest is the transmission byte order defined for the type. |
---|
1351 | Lastly, HTTP allows transmission of text types with any of several |
---|
1352 | line break conventions and not just the canonical form using CRLF. |
---|
1353 | </t></list> |
---|
1354 | </t> |
---|
1355 | </section> |
---|
1356 | |
---|
1357 | <section title="Content-Type" anchor="header.content-type"> |
---|
1358 | <iref primary="true" item="Content-Type header" x:for-anchor=""/> |
---|
1359 | <iref primary="true" item="Headers" subitem="Content-Type" x:for-anchor=""/> |
---|
1360 | <t> |
---|
1361 | The Content-Type entity-header field indicates the media type of the |
---|
1362 | entity-body sent to the recipient or, in the case of the HEAD method, |
---|
1363 | the media type that would have been sent had the request been a GET. |
---|
1364 | </t> |
---|
1365 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Content-Type"/> |
---|
1366 | Content-Type = "Content-Type" ":" media-type |
---|
1367 | </artwork></figure> |
---|
1368 | <t> |
---|
1369 | Media types are defined in <xref target="media.types"/>. An example of the field is |
---|
1370 | </t> |
---|
1371 | <figure><artwork type="example"> |
---|
1372 | Content-Type: text/html; charset=ISO-8859-4 |
---|
1373 | </artwork></figure> |
---|
1374 | <t> |
---|
1375 | Further discussion of methods for identifying the media type of an |
---|
1376 | entity is provided in <xref target="type"/>. |
---|
1377 | </t> |
---|
1378 | </section> |
---|
1379 | |
---|
1380 | </section> |
---|
1381 | |
---|
1382 | <section title="IANA Considerations" anchor="IANA.considerations"> |
---|
1383 | <t> |
---|
1384 | TBD. |
---|
1385 | </t> |
---|
1386 | </section> |
---|
1387 | |
---|
1388 | <section title="Security Considerations" anchor="security.considerations"> |
---|
1389 | <t> |
---|
1390 | This section is meant to inform application developers, information |
---|
1391 | providers, and users of the security limitations in HTTP/1.1 as |
---|
1392 | described by this document. The discussion does not include |
---|
1393 | definitive solutions to the problems revealed, though it does make |
---|
1394 | some suggestions for reducing security risks. |
---|
1395 | </t> |
---|
1396 | |
---|
1397 | <section title="Privacy Issues Connected to Accept Headers" anchor="privacy.issues.connected.to.accept.headers"> |
---|
1398 | <t> |
---|
1399 | Accept request-headers can reveal information about the user to all |
---|
1400 | servers which are accessed. The Accept-Language header in particular |
---|
1401 | can reveal information the user would consider to be of a private |
---|
1402 | nature, because the understanding of particular languages is often |
---|
1403 | strongly correlated to the membership of a particular ethnic group. |
---|
1404 | User agents which offer the option to configure the contents of an |
---|
1405 | Accept-Language header to be sent in every request are strongly |
---|
1406 | encouraged to let the configuration process include a message which |
---|
1407 | makes the user aware of the loss of privacy involved. |
---|
1408 | </t> |
---|
1409 | <t> |
---|
1410 | An approach that limits the loss of privacy would be for a user agent |
---|
1411 | to omit the sending of Accept-Language headers by default, and to ask |
---|
1412 | the user whether or not to start sending Accept-Language headers to a |
---|
1413 | server if it detects, by looking for any Vary response-header fields |
---|
1414 | generated by the server, that such sending could improve the quality |
---|
1415 | of service. |
---|
1416 | </t> |
---|
1417 | <t> |
---|
1418 | Elaborate user-customized accept header fields sent in every request, |
---|
1419 | in particular if these include quality values, can be used by servers |
---|
1420 | as relatively reliable and long-lived user identifiers. Such user |
---|
1421 | identifiers would allow content providers to do click-trail tracking, |
---|
1422 | and would allow collaborating content providers to match cross-server |
---|
1423 | click-trails or form submissions of individual users. Note that for |
---|
1424 | many users not behind a proxy, the network address of the host |
---|
1425 | running the user agent will also serve as a long-lived user |
---|
1426 | identifier. In environments where proxies are used to enhance |
---|
1427 | privacy, user agents ought to be conservative in offering accept |
---|
1428 | header configuration options to end users. As an extreme privacy |
---|
1429 | measure, proxies could filter the accept headers in relayed requests. |
---|
1430 | General purpose user agents which provide a high degree of header |
---|
1431 | configurability &SHOULD; warn users about the loss of privacy which can |
---|
1432 | be involved. |
---|
1433 | </t> |
---|
1434 | </section> |
---|
1435 | |
---|
1436 | <section title="Content-Disposition Issues" anchor="content-disposition.issues"> |
---|
1437 | <t> |
---|
1438 | <xref target="RFC1806"/>, from which the often implemented Content-Disposition |
---|
1439 | (see <xref target="content-disposition"/>) header in HTTP is derived, has a number of very |
---|
1440 | serious security considerations. Content-Disposition is not part of |
---|
1441 | the HTTP standard, but since it is widely implemented, we are |
---|
1442 | documenting its use and risks for implementors. See <xref target="RFC2183"/> |
---|
1443 | (which updates <xref target="RFC1806"/>) for details. |
---|
1444 | </t> |
---|
1445 | </section> |
---|
1446 | |
---|
1447 | </section> |
---|
1448 | |
---|
1449 | <section title="Acknowledgments" anchor="ack"> |
---|
1450 | </section> |
---|
1451 | </middle> |
---|
1452 | <back> |
---|
1453 | |
---|
1454 | <references title="Normative References"> |
---|
1455 | |
---|
1456 | <reference anchor="ISO-8859-1"> |
---|
1457 | <front> |
---|
1458 | <title> |
---|
1459 | Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1 |
---|
1460 | </title> |
---|
1461 | <author> |
---|
1462 | <organization>International Organization for Standardization</organization> |
---|
1463 | </author> |
---|
1464 | <date year="1998"/> |
---|
1465 | </front> |
---|
1466 | <seriesInfo name="ISO/IEC" value="8859-1:1998"/> |
---|
1467 | </reference> |
---|
1468 | |
---|
1469 | <reference anchor="Part1"> |
---|
1470 | <front> |
---|
1471 | <title abbrev="HTTP/1.1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title> |
---|
1472 | <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor"> |
---|
1473 | <organization abbrev="Day Software">Day Software</organization> |
---|
1474 | <address><email>fielding@gbiv.com</email></address> |
---|
1475 | </author> |
---|
1476 | <author initials="J." surname="Gettys" fullname="Jim Gettys"> |
---|
1477 | <organization>One Laptop per Child</organization> |
---|
1478 | <address><email>jg@laptop.org</email></address> |
---|
1479 | </author> |
---|
1480 | <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul"> |
---|
1481 | <organization abbrev="HP">Hewlett-Packard Company</organization> |
---|
1482 | <address><email>JeffMogul@acm.org</email></address> |
---|
1483 | </author> |
---|
1484 | <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen"> |
---|
1485 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
1486 | <address><email>henrikn@microsoft.com</email></address> |
---|
1487 | </author> |
---|
1488 | <author initials="L." surname="Masinter" fullname="Larry Masinter"> |
---|
1489 | <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization> |
---|
1490 | <address><email>LMM@acm.org</email></address> |
---|
1491 | </author> |
---|
1492 | <author initials="P." surname="Leach" fullname="Paul J. Leach"> |
---|
1493 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
1494 | <address><email>paulle@microsoft.com</email></address> |
---|
1495 | </author> |
---|
1496 | <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee"> |
---|
1497 | <organization abbrev="W3C/MIT">World Wide Web Consortium</organization> |
---|
1498 | <address><email>timbl@w3.org</email></address> |
---|
1499 | </author> |
---|
1500 | <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor"> |
---|
1501 | <organization abbrev="W3C">World Wide Web Consortium</organization> |
---|
1502 | <address><email>ylafon@w3.org</email></address> |
---|
1503 | </author> |
---|
1504 | <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor"> |
---|
1505 | <organization abbrev="greenbytes">greenbytes GmbH</organization> |
---|
1506 | <address><email>julian.reschke@greenbytes.de</email></address> |
---|
1507 | </author> |
---|
1508 | <date month="&ID-MONTH;" year="&ID-YEAR;"/> |
---|
1509 | </front> |
---|
1510 | <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;"/> |
---|
1511 | <x:source href="p1-messaging.xml" basename="p1-messaging"/> |
---|
1512 | </reference> |
---|
1513 | |
---|
1514 | <reference anchor="Part2"> |
---|
1515 | <front> |
---|
1516 | <title abbrev="HTTP/1.1">HTTP/1.1, part 2: Message Semantics</title> |
---|
1517 | <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor"> |
---|
1518 | <organization abbrev="Day Software">Day Software</organization> |
---|
1519 | <address><email>fielding@gbiv.com</email></address> |
---|
1520 | </author> |
---|
1521 | <author initials="J." surname="Gettys" fullname="Jim Gettys"> |
---|
1522 | <organization>One Laptop per Child</organization> |
---|
1523 | <address><email>jg@laptop.org</email></address> |
---|
1524 | </author> |
---|
1525 | <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul"> |
---|
1526 | <organization abbrev="HP">Hewlett-Packard Company</organization> |
---|
1527 | <address><email>JeffMogul@acm.org</email></address> |
---|
1528 | </author> |
---|
1529 | <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen"> |
---|
1530 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
1531 | <address><email>henrikn@microsoft.com</email></address> |
---|
1532 | </author> |
---|
1533 | <author initials="L." surname="Masinter" fullname="Larry Masinter"> |
---|
1534 | <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization> |
---|
1535 | <address><email>LMM@acm.org</email></address> |
---|
1536 | </author> |
---|
1537 | <author initials="P." surname="Leach" fullname="Paul J. Leach"> |
---|
1538 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
1539 | <address><email>paulle@microsoft.com</email></address> |
---|
1540 | </author> |
---|
1541 | <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee"> |
---|
1542 | <organization abbrev="W3C/MIT">World Wide Web Consortium</organization> |
---|
1543 | <address><email>timbl@w3.org</email></address> |
---|
1544 | </author> |
---|
1545 | <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor"> |
---|
1546 | <organization abbrev="W3C">World Wide Web Consortium</organization> |
---|
1547 | <address><email>ylafon@w3.org</email></address> |
---|
1548 | </author> |
---|
1549 | <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor"> |
---|
1550 | <organization abbrev="greenbytes">greenbytes GmbH</organization> |
---|
1551 | <address><email>julian.reschke@greenbytes.de</email></address> |
---|
1552 | </author> |
---|
1553 | <date month="&ID-MONTH;" year="&ID-YEAR;"/> |
---|
1554 | </front> |
---|
1555 | <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-&ID-VERSION;"/> |
---|
1556 | <x:source href="p2-semantics.xml" basename="p2-semantics"/> |
---|
1557 | </reference> |
---|
1558 | |
---|
1559 | <reference anchor="Part4"> |
---|
1560 | <front> |
---|
1561 | <title abbrev="HTTP/1.1">HTTP/1.1, part 4: Conditional Requests</title> |
---|
1562 | <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor"> |
---|
1563 | <organization abbrev="Day Software">Day Software</organization> |
---|
1564 | <address><email>fielding@gbiv.com</email></address> |
---|
1565 | </author> |
---|
1566 | <author initials="J." surname="Gettys" fullname="Jim Gettys"> |
---|
1567 | <organization>One Laptop per Child</organization> |
---|
1568 | <address><email>jg@laptop.org</email></address> |
---|
1569 | </author> |
---|
1570 | <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul"> |
---|
1571 | <organization abbrev="HP">Hewlett-Packard Company</organization> |
---|
1572 | <address><email>JeffMogul@acm.org</email></address> |
---|
1573 | </author> |
---|
1574 | <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen"> |
---|
1575 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
1576 | <address><email>henrikn@microsoft.com</email></address> |
---|
1577 | </author> |
---|
1578 | <author initials="L." surname="Masinter" fullname="Larry Masinter"> |
---|
1579 | <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization> |
---|
1580 | <address><email>LMM@acm.org</email></address> |
---|
1581 | </author> |
---|
1582 | <author initials="P." surname="Leach" fullname="Paul J. Leach"> |
---|
1583 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
1584 | <address><email>paulle@microsoft.com</email></address> |
---|
1585 | </author> |
---|
1586 | <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee"> |
---|
1587 | <organization abbrev="W3C/MIT">World Wide Web Consortium</organization> |
---|
1588 | <address><email>timbl@w3.org</email></address> |
---|
1589 | </author> |
---|
1590 | <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor"> |
---|
1591 | <organization abbrev="W3C">World Wide Web Consortium</organization> |
---|
1592 | <address><email>ylafon@w3.org</email></address> |
---|
1593 | </author> |
---|
1594 | <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor"> |
---|
1595 | <organization abbrev="greenbytes">greenbytes GmbH</organization> |
---|
1596 | <address><email>julian.reschke@greenbytes.de</email></address> |
---|
1597 | </author> |
---|
1598 | <date month="&ID-MONTH;" year="&ID-YEAR;"/> |
---|
1599 | </front> |
---|
1600 | <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p4-conditional-&ID-VERSION;"/> |
---|
1601 | <x:source href="p4-conditional.xml" basename="p4-conditional"/> |
---|
1602 | </reference> |
---|
1603 | |
---|
1604 | <reference anchor="Part5"> |
---|
1605 | <front> |
---|
1606 | <title abbrev="HTTP/1.1">HTTP/1.1, part 5: Range Requests and Partial Responses</title> |
---|
1607 | <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor"> |
---|
1608 | <organization abbrev="Day Software">Day Software</organization> |
---|
1609 | <address><email>fielding@gbiv.com</email></address> |
---|
1610 | </author> |
---|
1611 | <author initials="J." surname="Gettys" fullname="Jim Gettys"> |
---|
1612 | <organization>One Laptop per Child</organization> |
---|
1613 | <address><email>jg@laptop.org</email></address> |
---|
1614 | </author> |
---|
1615 | <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul"> |
---|
1616 | <organization abbrev="HP">Hewlett-Packard Company</organization> |
---|
1617 | <address><email>JeffMogul@acm.org</email></address> |
---|
1618 | </author> |
---|
1619 | <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen"> |
---|
1620 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
1621 | <address><email>henrikn@microsoft.com</email></address> |
---|
1622 | </author> |
---|
1623 | <author initials="L." surname="Masinter" fullname="Larry Masinter"> |
---|
1624 | <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization> |
---|
1625 | <address><email>LMM@acm.org</email></address> |
---|
1626 | </author> |
---|
1627 | <author initials="P." surname="Leach" fullname="Paul J. Leach"> |
---|
1628 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
1629 | <address><email>paulle@microsoft.com</email></address> |
---|
1630 | </author> |
---|
1631 | <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee"> |
---|
1632 | <organization abbrev="W3C/MIT">World Wide Web Consortium</organization> |
---|
1633 | <address><email>timbl@w3.org</email></address> |
---|
1634 | </author> |
---|
1635 | <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor"> |
---|
1636 | <organization abbrev="W3C">World Wide Web Consortium</organization> |
---|
1637 | <address><email>ylafon@w3.org</email></address> |
---|
1638 | </author> |
---|
1639 | <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor"> |
---|
1640 | <organization abbrev="greenbytes">greenbytes GmbH</organization> |
---|
1641 | <address><email>julian.reschke@greenbytes.de</email></address> |
---|
1642 | </author> |
---|
1643 | <date month="&ID-MONTH;" year="&ID-YEAR;"/> |
---|
1644 | </front> |
---|
1645 | <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-&ID-VERSION;"/> |
---|
1646 | <x:source href="p5-range.xml" basename="p5-range"/> |
---|
1647 | </reference> |
---|
1648 | |
---|
1649 | <reference anchor="Part6"> |
---|
1650 | <front> |
---|
1651 | <title abbrev="HTTP/1.1">HTTP/1.1, part 6: Caching</title> |
---|
1652 | <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor"> |
---|
1653 | <organization abbrev="Day Software">Day Software</organization> |
---|
1654 | <address><email>fielding@gbiv.com</email></address> |
---|
1655 | </author> |
---|
1656 | <author initials="J." surname="Gettys" fullname="Jim Gettys"> |
---|
1657 | <organization>One Laptop per Child</organization> |
---|
1658 | <address><email>jg@laptop.org</email></address> |
---|
1659 | </author> |
---|
1660 | <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul"> |
---|
1661 | <organization abbrev="HP">Hewlett-Packard Company</organization> |
---|
1662 | <address><email>JeffMogul@acm.org</email></address> |
---|
1663 | </author> |
---|
1664 | <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen"> |
---|
1665 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
1666 | <address><email>henrikn@microsoft.com</email></address> |
---|
1667 | </author> |
---|
1668 | <author initials="L." surname="Masinter" fullname="Larry Masinter"> |
---|
1669 | <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization> |
---|
1670 | <address><email>LMM@acm.org</email></address> |
---|
1671 | </author> |
---|
1672 | <author initials="P." surname="Leach" fullname="Paul J. Leach"> |
---|
1673 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
1674 | <address><email>paulle@microsoft.com</email></address> |
---|
1675 | </author> |
---|
1676 | <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee"> |
---|
1677 | <organization abbrev="W3C/MIT">World Wide Web Consortium</organization> |
---|
1678 | <address><email>timbl@w3.org</email></address> |
---|
1679 | </author> |
---|
1680 | <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor"> |
---|
1681 | <organization abbrev="W3C">World Wide Web Consortium</organization> |
---|
1682 | <address><email>ylafon@w3.org</email></address> |
---|
1683 | </author> |
---|
1684 | <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor"> |
---|
1685 | <organization abbrev="greenbytes">greenbytes GmbH</organization> |
---|
1686 | <address><email>julian.reschke@greenbytes.de</email></address> |
---|
1687 | </author> |
---|
1688 | <date month="&ID-MONTH;" year="&ID-YEAR;"/> |
---|
1689 | </front> |
---|
1690 | <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-&ID-VERSION;"/> |
---|
1691 | <x:source href="p6-cache.xml" basename="p6-cache"/> |
---|
1692 | </reference> |
---|
1693 | |
---|
1694 | <reference anchor="RFC1950"> |
---|
1695 | <front> |
---|
1696 | <title>ZLIB Compressed Data Format Specification version 3.3</title> |
---|
1697 | <author initials="L.P." surname="Deutsch" fullname="L. Peter Deutsch"> |
---|
1698 | <organization>Aladdin Enterprises</organization> |
---|
1699 | <address><email>ghost@aladdin.com</email></address> |
---|
1700 | </author> |
---|
1701 | <author initials="J-L." surname="Gailly" fullname="Jean-Loup Gailly"> |
---|
1702 | <organization/> |
---|
1703 | </author> |
---|
1704 | <date month="May" year="1996"/> |
---|
1705 | </front> |
---|
1706 | <seriesInfo name="RFC" value="1950"/> |
---|
1707 | <annotation> |
---|
1708 | RFC1950 is an Informational RFC, thus it may be less stable than |
---|
1709 | this specification. On the other hand, this downward reference was |
---|
1710 | present since <xref target="RFC2068"/> (published in 1997), therefore it is unlikely |
---|
1711 | to cause problems in practice. |
---|
1712 | </annotation> |
---|
1713 | </reference> |
---|
1714 | |
---|
1715 | <reference anchor="RFC1951"> |
---|
1716 | <front> |
---|
1717 | <title>DEFLATE Compressed Data Format Specification version 1.3</title> |
---|
1718 | <author initials="P." surname="Deutsch" fullname="L. Peter Deutsch"> |
---|
1719 | <organization>Aladdin Enterprises</organization> |
---|
1720 | <address><email>ghost@aladdin.com</email></address> |
---|
1721 | </author> |
---|
1722 | <date month="May" year="1996"/> |
---|
1723 | </front> |
---|
1724 | <seriesInfo name="RFC" value="1951"/> |
---|
1725 | <annotation> |
---|
1726 | RFC1951 is an Informational RFC, thus it may be less stable than |
---|
1727 | this specification. On the other hand, this downward reference was |
---|
1728 | present since <xref target="RFC2068"/> (published in 1997), therefore it is unlikely |
---|
1729 | to cause problems in practice. |
---|
1730 | </annotation> |
---|
1731 | </reference> |
---|
1732 | |
---|
1733 | <reference anchor="RFC1952"> |
---|
1734 | <front> |
---|
1735 | <title>GZIP file format specification version 4.3</title> |
---|
1736 | <author initials="P." surname="Deutsch" fullname="L. Peter Deutsch"> |
---|
1737 | <organization>Aladdin Enterprises</organization> |
---|
1738 | <address><email>ghost@aladdin.com</email></address> |
---|
1739 | </author> |
---|
1740 | <author initials="J-L." surname="Gailly" fullname="Jean-Loup Gailly"> |
---|
1741 | <organization/> |
---|
1742 | <address><email>gzip@prep.ai.mit.edu</email></address> |
---|
1743 | </author> |
---|
1744 | <author initials="M." surname="Adler" fullname="Mark Adler"> |
---|
1745 | <organization/> |
---|
1746 | <address><email>madler@alumni.caltech.edu</email></address> |
---|
1747 | </author> |
---|
1748 | <author initials="L.P." surname="Deutsch" fullname="L. Peter Deutsch"> |
---|
1749 | <organization/> |
---|
1750 | <address><email>ghost@aladdin.com</email></address> |
---|
1751 | </author> |
---|
1752 | <author initials="G." surname="Randers-Pehrson" fullname="Glenn Randers-Pehrson"> |
---|
1753 | <organization/> |
---|
1754 | <address><email>randeg@alumni.rpi.edu</email></address> |
---|
1755 | </author> |
---|
1756 | <date month="May" year="1996"/> |
---|
1757 | </front> |
---|
1758 | <seriesInfo name="RFC" value="1952"/> |
---|
1759 | <annotation> |
---|
1760 | RFC1952 is an Informational RFC, thus it may be less stable than |
---|
1761 | this specification. On the other hand, this downward reference was |
---|
1762 | present since <xref target="RFC2068"/> (published in 1997), therefore it is unlikely |
---|
1763 | to cause problems in practice. |
---|
1764 | </annotation> |
---|
1765 | </reference> |
---|
1766 | |
---|
1767 | <reference anchor="RFC2119"> |
---|
1768 | <front> |
---|
1769 | <title>Key words for use in RFCs to Indicate Requirement Levels</title> |
---|
1770 | <author initials="S." surname="Bradner" fullname="Scott Bradner"> |
---|
1771 | <organization>Harvard University</organization> |
---|
1772 | <address><email>sob@harvard.edu</email></address> |
---|
1773 | </author> |
---|
1774 | <date month="March" year="1997"/> |
---|
1775 | </front> |
---|
1776 | <seriesInfo name="BCP" value="14"/> |
---|
1777 | <seriesInfo name="RFC" value="2119"/> |
---|
1778 | </reference> |
---|
1779 | |
---|
1780 | </references> |
---|
1781 | |
---|
1782 | <references title="Informative References"> |
---|
1783 | |
---|
1784 | <reference anchor="RFC2068"> |
---|
1785 | <front> |
---|
1786 | <title abbrev="HTTP/1.1">Hypertext Transfer Protocol -- HTTP/1.1</title> |
---|
1787 | <author initials="R." surname="Fielding" fullname="Roy T. Fielding"> |
---|
1788 | <organization>University of California, Irvine, Department of Information and Computer Science</organization> |
---|
1789 | <address><email>fielding@ics.uci.edu</email></address> |
---|
1790 | </author> |
---|
1791 | <author initials="J." surname="Gettys" fullname="Jim Gettys"> |
---|
1792 | <organization>MIT Laboratory for Computer Science</organization> |
---|
1793 | <address><email>jg@w3.org</email></address> |
---|
1794 | </author> |
---|
1795 | <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul"> |
---|
1796 | <organization>Digital Equipment Corporation, Western Research Laboratory</organization> |
---|
1797 | <address><email>mogul@wrl.dec.com</email></address> |
---|
1798 | </author> |
---|
1799 | <author initials="H." surname="Nielsen" fullname="Henrik Frystyk Nielsen"> |
---|
1800 | <organization>MIT Laboratory for Computer Science</organization> |
---|
1801 | <address><email>frystyk@w3.org</email></address> |
---|
1802 | </author> |
---|
1803 | <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee"> |
---|
1804 | <organization>MIT Laboratory for Computer Science</organization> |
---|
1805 | <address><email>timbl@w3.org</email></address> |
---|
1806 | </author> |
---|
1807 | <date month="January" year="1997"/> |
---|
1808 | </front> |
---|
1809 | <seriesInfo name="RFC" value="2068"/> |
---|
1810 | </reference> |
---|
1811 | |
---|
1812 | <reference anchor="RFC2616"> |
---|
1813 | <front> |
---|
1814 | <title>Hypertext Transfer Protocol -- HTTP/1.1</title> |
---|
1815 | <author initials="R." surname="Fielding" fullname="R. Fielding"> |
---|
1816 | <organization>University of California, Irvine</organization> |
---|
1817 | <address><email>fielding@ics.uci.edu</email></address> |
---|
1818 | </author> |
---|
1819 | <author initials="J." surname="Gettys" fullname="J. Gettys"> |
---|
1820 | <organization>W3C</organization> |
---|
1821 | <address><email>jg@w3.org</email></address> |
---|
1822 | </author> |
---|
1823 | <author initials="J." surname="Mogul" fullname="J. Mogul"> |
---|
1824 | <organization>Compaq Computer Corporation</organization> |
---|
1825 | <address><email>mogul@wrl.dec.com</email></address> |
---|
1826 | </author> |
---|
1827 | <author initials="H." surname="Frystyk" fullname="H. Frystyk"> |
---|
1828 | <organization>MIT Laboratory for Computer Science</organization> |
---|
1829 | <address><email>frystyk@w3.org</email></address> |
---|
1830 | </author> |
---|
1831 | <author initials="L." surname="Masinter" fullname="L. Masinter"> |
---|
1832 | <organization>Xerox Corporation</organization> |
---|
1833 | <address><email>masinter@parc.xerox.com</email></address> |
---|
1834 | </author> |
---|
1835 | <author initials="P." surname="Leach" fullname="P. Leach"> |
---|
1836 | <organization>Microsoft Corporation</organization> |
---|
1837 | <address><email>paulle@microsoft.com</email></address> |
---|
1838 | </author> |
---|
1839 | <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee"> |
---|
1840 | <organization>W3C</organization> |
---|
1841 | <address><email>timbl@w3.org</email></address> |
---|
1842 | </author> |
---|
1843 | <date month="June" year="1999"/> |
---|
1844 | </front> |
---|
1845 | <seriesInfo name="RFC" value="2616"/> |
---|
1846 | </reference> |
---|
1847 | |
---|
1848 | </references> |
---|
1849 | |
---|
1850 | <references title="References (to be categorized)"> |
---|
1851 | |
---|
1852 | <reference anchor="RFC1766"> |
---|
1853 | <front> |
---|
1854 | <title abbrev="Language Tag">Tags for the Identification of Languages</title> |
---|
1855 | <author initials="H." surname="Alvestrand" fullname="Harald Tveit Alvestrand"> |
---|
1856 | <organization>UNINETT</organization> |
---|
1857 | <address><email>Harald.T.Alvestrand@uninett.no</email></address> |
---|
1858 | </author> |
---|
1859 | <date month="March" year="1995"/> |
---|
1860 | </front> |
---|
1861 | <seriesInfo name="RFC" value="1766"/> |
---|
1862 | </reference> |
---|
1863 | |
---|
1864 | <reference anchor="RFC2045"> |
---|
1865 | <front> |
---|
1866 | <title abbrev="Internet Message Bodies">Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</title> |
---|
1867 | <author initials="N." surname="Freed" fullname="Ned Freed"> |
---|
1868 | <organization>Innosoft International, Inc.</organization> |
---|
1869 | <address><email>ned@innosoft.com</email></address> |
---|
1870 | </author> |
---|
1871 | <author initials="N.S." surname="Borenstein" fullname="Nathaniel S. Borenstein"> |
---|
1872 | <organization>First Virtual Holdings</organization> |
---|
1873 | <address><email>nsb@nsb.fv.com</email></address> |
---|
1874 | </author> |
---|
1875 | <date month="November" year="1996"/> |
---|
1876 | </front> |
---|
1877 | <seriesInfo name="RFC" value="2045"/> |
---|
1878 | </reference> |
---|
1879 | |
---|
1880 | <reference anchor="RFC822"> |
---|
1881 | <front> |
---|
1882 | <title abbrev="Standard for ARPA Internet Text Messages">Standard for the format of ARPA Internet text messages</title> |
---|
1883 | <author initials="D.H." surname="Crocker" fullname="David H. Crocker"> |
---|
1884 | <organization>University of Delaware, Dept. of Electrical Engineering</organization> |
---|
1885 | <address><email>DCrocker@UDel-Relay</email></address> |
---|
1886 | </author> |
---|
1887 | <date month="August" day="13" year="1982"/> |
---|
1888 | </front> |
---|
1889 | <seriesInfo name="STD" value="11"/> |
---|
1890 | <seriesInfo name="RFC" value="822"/> |
---|
1891 | </reference> |
---|
1892 | |
---|
1893 | <reference anchor="RFC1867"> |
---|
1894 | <front> |
---|
1895 | <title>Form-based File Upload in HTML</title> |
---|
1896 | <author initials="L." surname="Masinter" fullname="Larry Masinter"> |
---|
1897 | <organization>Xerox Palo Alto Research Center</organization> |
---|
1898 | <address><email>masinter@parc.xerox.com</email></address> |
---|
1899 | </author> |
---|
1900 | <author initials="E." surname="Nebel" fullname="Ernesto Nebel"> |
---|
1901 | <organization>XSoft, Xerox Corporation</organization> |
---|
1902 | <address><email>nebel@xsoft.sd.xerox.com</email></address> |
---|
1903 | </author> |
---|
1904 | <date month="November" year="1995"/> |
---|
1905 | </front> |
---|
1906 | <seriesInfo name="RFC" value="1867"/> |
---|
1907 | </reference> |
---|
1908 | |
---|
1909 | <reference anchor="RFC4288"> |
---|
1910 | <front> |
---|
1911 | <title>Media Type Specifications and Registration Procedures</title> |
---|
1912 | <author initials="N." surname="Freed" fullname="N. Freed"> |
---|
1913 | <organization>Sun Microsystems</organization> |
---|
1914 | <address> |
---|
1915 | <email>ned.freed@mrochek.com</email> |
---|
1916 | </address> |
---|
1917 | </author> |
---|
1918 | <author initials="J." surname="Klensin" fullname="J. Klensin"> |
---|
1919 | <organization/> |
---|
1920 | <address> |
---|
1921 | <email>klensin+ietf@jck.com</email> |
---|
1922 | </address> |
---|
1923 | </author> |
---|
1924 | <date year="2005" month="December"/> |
---|
1925 | </front> |
---|
1926 | <seriesInfo name="BCP" value="13"/> |
---|
1927 | <seriesInfo name="RFC" value="4288"/> |
---|
1928 | </reference> |
---|
1929 | |
---|
1930 | <reference anchor="RFC1864"> |
---|
1931 | <front> |
---|
1932 | <title abbrev="Content-MD5 Header Field">The Content-MD5 Header Field</title> |
---|
1933 | <author initials="J." surname="Myers" fullname="John G. Myers"> |
---|
1934 | <organization>Carnegie Mellon University</organization> |
---|
1935 | <address><email>jgm+@cmu.edu</email></address> |
---|
1936 | </author> |
---|
1937 | <author initials="M." surname="Rose" fullname="Marshall T. Rose"> |
---|
1938 | <organization>Dover Beach Consulting, Inc.</organization> |
---|
1939 | <address><email>mrose@dbc.mtview.ca.us</email></address> |
---|
1940 | </author> |
---|
1941 | <date month="October" year="1995"/> |
---|
1942 | </front> |
---|
1943 | <seriesInfo name="RFC" value="1864"/> |
---|
1944 | </reference> |
---|
1945 | |
---|
1946 | <reference anchor="RFC1806"> |
---|
1947 | <front> |
---|
1948 | <title abbrev="Content-Disposition">Communicating Presentation Information in Internet Messages: The Content-Disposition Header</title> |
---|
1949 | <author initials="R." surname="Troost" fullname="Rens Troost"> |
---|
1950 | <organization>New Century Systems</organization> |
---|
1951 | <address><email>rens@century.com</email></address> |
---|
1952 | </author> |
---|
1953 | <author initials="S." surname="Dorner" fullname="Steve Dorner"> |
---|
1954 | <organization>QUALCOMM Incorporated</organization> |
---|
1955 | <address><email>sdorner@qualcomm.com</email></address> |
---|
1956 | </author> |
---|
1957 | <date month="June" year="1995"/> |
---|
1958 | </front> |
---|
1959 | <seriesInfo name="RFC" value="1806"/> |
---|
1960 | </reference> |
---|
1961 | |
---|
1962 | <reference anchor="RFC1945"> |
---|
1963 | <front> |
---|
1964 | <title abbrev="HTTP/1.0">Hypertext Transfer Protocol -- HTTP/1.0</title> |
---|
1965 | <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee"> |
---|
1966 | <organization>MIT, Laboratory for Computer Science</organization> |
---|
1967 | <address><email>timbl@w3.org</email></address> |
---|
1968 | </author> |
---|
1969 | <author initials="R.T." surname="Fielding" fullname="Roy T. Fielding"> |
---|
1970 | <organization>University of California, Irvine, Department of Information and Computer Science</organization> |
---|
1971 | <address><email>fielding@ics.uci.edu</email></address> |
---|
1972 | </author> |
---|
1973 | <author initials="H.F." surname="Nielsen" fullname="Henrik Frystyk Nielsen"> |
---|
1974 | <organization>W3 Consortium, MIT Laboratory for Computer Science</organization> |
---|
1975 | <address><email>frystyk@w3.org</email></address> |
---|
1976 | </author> |
---|
1977 | <date month="May" year="1996"/> |
---|
1978 | </front> |
---|
1979 | <seriesInfo name="RFC" value="1945"/> |
---|
1980 | </reference> |
---|
1981 | |
---|
1982 | <reference anchor="RFC2076"> |
---|
1983 | <front> |
---|
1984 | <title abbrev="Internet Message Headers">Common Internet Message Headers</title> |
---|
1985 | <author initials="J." surname="Palme" fullname="Jacob Palme"> |
---|
1986 | <organization>Stockholm University/KTH</organization> |
---|
1987 | <address><email>jpalme@dsv.su.se</email></address> |
---|
1988 | </author> |
---|
1989 | <date month="February" year="1997"/> |
---|
1990 | </front> |
---|
1991 | <seriesInfo name="RFC" value="2076"/> |
---|
1992 | </reference> |
---|
1993 | |
---|
1994 | <reference anchor="RFC2279"> |
---|
1995 | <front> |
---|
1996 | <title abbrev="UTF-8">UTF-8, a transformation format of ISO 10646</title> |
---|
1997 | <author initials="F." surname="Yergeau" fullname="Francois Yergeau"> |
---|
1998 | <organization>Alis Technologies</organization> |
---|
1999 | <address> |
---|
2000 | <postal> |
---|
2001 | <street>100, boul. Alexis-Nihon</street> |
---|
2002 | <street>Suite 600</street> |
---|
2003 | <city>Montreal</city> |
---|
2004 | <region>Quebec</region> |
---|
2005 | <code>H4M 2P2</code> |
---|
2006 | <country>CA</country></postal> |
---|
2007 | <phone>+1 514 747 2547</phone> |
---|
2008 | <facsimile>+1 514 747 2561</facsimile> |
---|
2009 | <email>fyergeau@alis.com</email></address></author> |
---|
2010 | <date month="January" year="1998"/> |
---|
2011 | <abstract> |
---|
2012 | <t>ISO/IEC 10646-1 defines a multi-octet character set called the Universal Character Set (UCS) which encompasses most of the world's writing systems. Multi-octet characters, however, are not compatible with many current applications and protocols, and this has led to the development of a few so-called UCS transformation formats (UTF), each with different characteristics. UTF-8, the object of this memo, has the characteristic of preserving the full US-ASCII range, providing compatibility with file systems, parsers and other software that rely on US-ASCII values but are transparent to other values. This memo updates and replaces RFC 2044, in particular addressing the question of versions of the relevant standards.</t></abstract></front> |
---|
2013 | <seriesInfo name="RFC" value="2279"/> |
---|
2014 | </reference> |
---|
2015 | |
---|
2016 | <reference anchor="RFC2046"> |
---|
2017 | <front> |
---|
2018 | <title abbrev="Media Types">Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types</title> |
---|
2019 | <author initials="N." surname="Freed" fullname="Ned Freed"> |
---|
2020 | <organization>Innosoft International, Inc.</organization> |
---|
2021 | <address><email>ned@innosoft.com</email></address> |
---|
2022 | </author> |
---|
2023 | <author initials="N." surname="Borenstein" fullname="Nathaniel S. Borenstein"> |
---|
2024 | <organization>First Virtual Holdings</organization> |
---|
2025 | <address><email>nsb@nsb.fv.com</email></address> |
---|
2026 | </author> |
---|
2027 | <date month="November" year="1996"/> |
---|
2028 | </front> |
---|
2029 | <seriesInfo name="RFC" value="2046"/> |
---|
2030 | </reference> |
---|
2031 | |
---|
2032 | <reference anchor="RFC2277"> |
---|
2033 | <front> |
---|
2034 | <title abbrev="Charset Policy">IETF Policy on Character Sets and Languages</title> |
---|
2035 | <author initials="H.T." surname="Alvestrand" fullname="Harald Tveit Alvestrand"> |
---|
2036 | <organization>UNINETT</organization> |
---|
2037 | <address> |
---|
2038 | <postal> |
---|
2039 | <street>P.O.Box 6883 Elgeseter</street> |
---|
2040 | <street>N-7002 TRONDHEIM</street> |
---|
2041 | <country>NORWAY</country></postal> |
---|
2042 | <phone>+47 73 59 70 94</phone> |
---|
2043 | <email>Harald.T.Alvestrand@uninett.no</email></address></author> |
---|
2044 | <date month="January" year="1998"/> |
---|
2045 | <area>Applications</area> |
---|
2046 | <keyword>Internet Engineering Task Force</keyword> |
---|
2047 | <keyword>character encoding</keyword></front> |
---|
2048 | <seriesInfo name="BCP" value="18"/> |
---|
2049 | <seriesInfo name="RFC" value="2277"/> |
---|
2050 | </reference> |
---|
2051 | |
---|
2052 | <reference anchor="RFC2110"> |
---|
2053 | <front> |
---|
2054 | <title abbrev="MHTML">MIME E-mail Encapsulation of Aggregate Documents, such as HTML (MHTML)</title> |
---|
2055 | <author initials="J." surname="Palme" fullname="Jacob Palme"> |
---|
2056 | <organization>Stockholm University and KTH</organization> |
---|
2057 | <address> |
---|
2058 | <postal> |
---|
2059 | <street>Electrum 230</street> |
---|
2060 | <street>S-164 40 Kista</street> |
---|
2061 | <country>Sweden</country></postal> |
---|
2062 | <phone>+46-8-16 16 67</phone> |
---|
2063 | <facsimile>+46-8-783 08 29</facsimile> |
---|
2064 | <email>jpalme@dsv.su.se</email></address></author> |
---|
2065 | <author initials="A." surname="Hopmann" fullname="Alex Hopmann"> |
---|
2066 | <organization>Microsoft Corporation</organization> |
---|
2067 | <address> |
---|
2068 | <postal> |
---|
2069 | <street>3590 North First Street</street> |
---|
2070 | <street>Suite 300</street> |
---|
2071 | <street>San Jose</street> |
---|
2072 | <street>CA 95134</street> |
---|
2073 | <street>Working group chairman:</street></postal> |
---|
2074 | <email>alexhop@microsoft.com</email></address></author> |
---|
2075 | <date month="March" year="1997"/> |
---|
2076 | <area>Applications</area> |
---|
2077 | <keyword>encapsulate</keyword> |
---|
2078 | <keyword>hypertext markup language</keyword> |
---|
2079 | <keyword>mail</keyword> |
---|
2080 | <keyword>multipurpose internet mail extensions</keyword> |
---|
2081 | </front> |
---|
2082 | <seriesInfo name="RFC" value="2110"/> |
---|
2083 | </reference> |
---|
2084 | |
---|
2085 | <reference anchor="RFC2049"> |
---|
2086 | <front> |
---|
2087 | <title abbrev="MIME Conformance">Multipurpose Internet Mail Extensions (MIME) Part Five: Conformance Criteria and Examples</title> |
---|
2088 | <author initials="N." surname="Freed" fullname="Ned Freed"> |
---|
2089 | <organization>Innosoft International, Inc.</organization> |
---|
2090 | <address><email>ned@innosoft.com</email></address> |
---|
2091 | </author> |
---|
2092 | <author initials="N.S." surname="Borenstein" fullname="Nathaniel S. Borenstein"> |
---|
2093 | <organization>First Virtual Holdings</organization> |
---|
2094 | <address><email>nsb@nsb.fv.com</email></address> |
---|
2095 | </author> |
---|
2096 | <date month="November" year="1996"/> |
---|
2097 | </front> |
---|
2098 | <seriesInfo name="RFC" value="2049"/> |
---|
2099 | </reference> |
---|
2100 | |
---|
2101 | <reference anchor="RFC2183"> |
---|
2102 | <front> |
---|
2103 | <title abbrev="Content-Disposition">Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field</title> |
---|
2104 | <author initials="R." surname="Troost" fullname="Rens Troost"> |
---|
2105 | <organization>New Century Systems</organization> |
---|
2106 | <address><email>rens@century.com</email></address> |
---|
2107 | </author> |
---|
2108 | <author initials="S." surname="Dorner" fullname="Steve Dorner"> |
---|
2109 | <organization>QUALCOMM Incorporated</organization> |
---|
2110 | <address><email>sdorner@qualcomm.com</email></address> |
---|
2111 | </author> |
---|
2112 | <author initials="K." surname="Moore" fullname="Keith Moore"> |
---|
2113 | <organization>Department of Computer Science</organization> |
---|
2114 | <address><email>moore@cs.utk.edu</email></address> |
---|
2115 | </author> |
---|
2116 | <date month="August" year="1997"/> |
---|
2117 | </front> |
---|
2118 | <seriesInfo name="RFC" value="2183"/> |
---|
2119 | </reference> |
---|
2120 | |
---|
2121 | </references> |
---|
2122 | |
---|
2123 | <section title="Differences Between HTTP Entities and RFC 2045 Entities" anchor="differences.between.http.entities.and.rfc.2045.entities"> |
---|
2124 | <t> |
---|
2125 | HTTP/1.1 uses many of the constructs defined for Internet Mail (<xref target="RFC822"/>) and the Multipurpose Internet Mail Extensions (MIME <xref target="RFC2045"/>) to |
---|
2126 | allow entities to be transmitted in an open variety of |
---|
2127 | representations and with extensible mechanisms. However, RFC 2045 |
---|
2128 | discusses mail, and HTTP has a few features that are different from |
---|
2129 | those described in RFC 2045. These differences were carefully chosen |
---|
2130 | to optimize performance over binary connections, to allow greater |
---|
2131 | freedom in the use of new media types, to make date comparisons |
---|
2132 | easier, and to acknowledge the practice of some early HTTP servers |
---|
2133 | and clients. |
---|
2134 | </t> |
---|
2135 | <t> |
---|
2136 | This appendix describes specific areas where HTTP differs from RFC |
---|
2137 | 2045. Proxies and gateways to strict MIME environments &SHOULD; be |
---|
2138 | aware of these differences and provide the appropriate conversions |
---|
2139 | where necessary. Proxies and gateways from MIME environments to HTTP |
---|
2140 | also need to be aware of the differences because some conversions |
---|
2141 | might be required. |
---|
2142 | </t> |
---|
2143 | <section title="MIME-Version" anchor="mime-version"> |
---|
2144 | <t> |
---|
2145 | HTTP is not a MIME-compliant protocol. However, HTTP/1.1 messages &MAY; |
---|
2146 | include a single MIME-Version general-header field to indicate what |
---|
2147 | version of the MIME protocol was used to construct the message. Use |
---|
2148 | of the MIME-Version header field indicates that the message is in |
---|
2149 | full compliance with the MIME protocol (as defined in <xref target="RFC2045"/>). |
---|
2150 | Proxies/gateways are responsible for ensuring full compliance (where |
---|
2151 | possible) when exporting HTTP messages to strict MIME environments. |
---|
2152 | </t> |
---|
2153 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="MIME-Version"/> |
---|
2154 | MIME-Version = "MIME-Version" ":" 1*DIGIT "." 1*DIGIT |
---|
2155 | </artwork></figure> |
---|
2156 | <t> |
---|
2157 | MIME version "1.0" is the default for use in HTTP/1.1. However, |
---|
2158 | HTTP/1.1 message parsing and semantics are defined by this document |
---|
2159 | and not the MIME specification. |
---|
2160 | </t> |
---|
2161 | </section> |
---|
2162 | |
---|
2163 | <section title="Conversion to Canonical Form" anchor="conversion.to.canonical.form"> |
---|
2164 | <t> |
---|
2165 | <xref target="RFC2045"/> requires that an Internet mail entity be converted to |
---|
2166 | canonical form prior to being transferred, as described in <xref target="RFC2049" x:fmt="of" x:sec="4"/>. |
---|
2167 | <xref target="canonicalization.and.text.defaults"/> of this document describes the forms |
---|
2168 | allowed for subtypes of the "text" media type when transmitted over |
---|
2169 | HTTP. <xref target="RFC2046"/> requires that content with a type of "text" represent |
---|
2170 | line breaks as CRLF and forbids the use of CR or LF outside of line |
---|
2171 | break sequences. HTTP allows CRLF, bare CR, and bare LF to indicate a |
---|
2172 | line break within text content when a message is transmitted over |
---|
2173 | HTTP. |
---|
2174 | </t> |
---|
2175 | <t> |
---|
2176 | Where it is possible, a proxy or gateway from HTTP to a strict MIME |
---|
2177 | environment &SHOULD; translate all line breaks within the text media |
---|
2178 | types described in <xref target="canonicalization.and.text.defaults"/> of this document to the RFC 2049 |
---|
2179 | canonical form of CRLF. Note, however, that this might be complicated |
---|
2180 | by the presence of a Content-Encoding and by the fact that HTTP |
---|
2181 | allows the use of some character sets which do not use octets 13 and |
---|
2182 | 10 to represent CR and LF, as is the case for some multi-byte |
---|
2183 | character sets. |
---|
2184 | </t> |
---|
2185 | <t> |
---|
2186 | Implementors should note that conversion will break any cryptographic |
---|
2187 | checksums applied to the original content unless the original content |
---|
2188 | is already in canonical form. Therefore, the canonical form is |
---|
2189 | recommended for any content that uses such checksums in HTTP. |
---|
2190 | </t> |
---|
2191 | </section> |
---|
2192 | |
---|
2193 | <section title="Introduction of Content-Encoding" anchor="introduction.of.content-encoding"> |
---|
2194 | <t> |
---|
2195 | RFC 2045 does not include any concept equivalent to HTTP/1.1's |
---|
2196 | Content-Encoding header field. Since this acts as a modifier on the |
---|
2197 | media type, proxies and gateways from HTTP to MIME-compliant |
---|
2198 | protocols &MUST; either change the value of the Content-Type header |
---|
2199 | field or decode the entity-body before forwarding the message. (Some |
---|
2200 | experimental applications of Content-Type for Internet mail have used |
---|
2201 | a media-type parameter of ";conversions=<content-coding>" to perform |
---|
2202 | a function equivalent to Content-Encoding. However, this parameter is |
---|
2203 | not part of RFC 2045). |
---|
2204 | </t> |
---|
2205 | </section> |
---|
2206 | |
---|
2207 | <section title="No Content-Transfer-Encoding" anchor="no.content-transfer-encoding"> |
---|
2208 | <t> |
---|
2209 | HTTP does not use the Content-Transfer-Encoding field of RFC |
---|
2210 | 2045. Proxies and gateways from MIME-compliant protocols to HTTP &MUST; |
---|
2211 | remove any Content-Transfer-Encoding |
---|
2212 | prior to delivering the response message to an HTTP client. |
---|
2213 | </t> |
---|
2214 | <t> |
---|
2215 | Proxies and gateways from HTTP to MIME-compliant protocols are |
---|
2216 | responsible for ensuring that the message is in the correct format |
---|
2217 | and encoding for safe transport on that protocol, where "safe |
---|
2218 | transport" is defined by the limitations of the protocol being used. |
---|
2219 | Such a proxy or gateway &SHOULD; label the data with an appropriate |
---|
2220 | Content-Transfer-Encoding if doing so will improve the likelihood of |
---|
2221 | safe transport over the destination protocol. |
---|
2222 | </t> |
---|
2223 | </section> |
---|
2224 | |
---|
2225 | <section title="Introduction of Transfer-Encoding" anchor="introduction.of.transfer-encoding"> |
---|
2226 | <t> |
---|
2227 | HTTP/1.1 introduces the Transfer-Encoding header field (&header-transfer-encoding;). |
---|
2228 | Proxies/gateways &MUST; remove any transfer-coding prior to |
---|
2229 | forwarding a message via a MIME-compliant protocol. |
---|
2230 | </t> |
---|
2231 | </section> |
---|
2232 | |
---|
2233 | <section title="MHTML and Line Length Limitations" anchor="mhtml.line.length"> |
---|
2234 | <t> |
---|
2235 | HTTP implementations which share code with MHTML <xref target="RFC2110"/> implementations |
---|
2236 | need to be aware of MIME line length limitations. Since HTTP does not |
---|
2237 | have this limitation, HTTP does not fold long lines. MHTML messages |
---|
2238 | being transported by HTTP follow all conventions of MHTML, including |
---|
2239 | line length limitations and folding, canonicalization, etc., since |
---|
2240 | HTTP transports all message-bodies as payload (see <xref target="multipart.types"/>) and |
---|
2241 | does not interpret the content or any MIME header lines that might be |
---|
2242 | contained therein. |
---|
2243 | </t> |
---|
2244 | </section> |
---|
2245 | </section> |
---|
2246 | |
---|
2247 | <section title="Additional Features" anchor="additional.features"> |
---|
2248 | <t> |
---|
2249 | <xref target="RFC1945"/> and <xref target="RFC2068"/> document protocol elements used by some |
---|
2250 | existing HTTP implementations, but not consistently and correctly |
---|
2251 | across most HTTP/1.1 applications. Implementors are advised to be |
---|
2252 | aware of these features, but cannot rely upon their presence in, or |
---|
2253 | interoperability with, other HTTP/1.1 applications. Some of these |
---|
2254 | describe proposed experimental features, and some describe features |
---|
2255 | that experimental deployment found lacking that are now addressed in |
---|
2256 | the base HTTP/1.1 specification. |
---|
2257 | </t> |
---|
2258 | <t> |
---|
2259 | A number of other headers, such as Content-Disposition and Title, |
---|
2260 | from SMTP and MIME are also often implemented (see <xref target="RFC2076"/>). |
---|
2261 | </t> |
---|
2262 | |
---|
2263 | <section title="Content-Disposition" anchor="content-disposition"> |
---|
2264 | <iref item="Headers" subitem="Content-Disposition" primary="true" x:for-anchor=""/> |
---|
2265 | <iref item="Content-Disposition header" primary="true" x:for-anchor=""/> |
---|
2266 | <t> |
---|
2267 | The Content-Disposition response-header field has been proposed as a |
---|
2268 | means for the origin server to suggest a default filename if the user |
---|
2269 | requests that the content is saved to a file. This usage is derived |
---|
2270 | from the definition of Content-Disposition in <xref target="RFC1806"/>. |
---|
2271 | </t> |
---|
2272 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="content-disposition"/><iref primary="true" item="Grammar" subitem="disposition-type"/><iref primary="true" item="Grammar" subitem="disposition-parm"/><iref primary="true" item="Grammar" subitem="filename-parm"/><iref primary="true" item="Grammar" subitem="disp-extension-token"/><iref primary="true" item="Grammar" subitem="disp-extension-parm"/> |
---|
2273 | content-disposition = "Content-Disposition" ":" |
---|
2274 | disposition-type *( ";" disposition-parm ) |
---|
2275 | disposition-type = "attachment" | disp-extension-token |
---|
2276 | disposition-parm = filename-parm | disp-extension-parm |
---|
2277 | filename-parm = "filename" "=" quoted-string |
---|
2278 | disp-extension-token = token |
---|
2279 | disp-extension-parm = token "=" ( token | quoted-string ) |
---|
2280 | </artwork></figure> |
---|
2281 | <t> |
---|
2282 | An example is |
---|
2283 | </t> |
---|
2284 | <figure><artwork type="example"> |
---|
2285 | Content-Disposition: attachment; filename="fname.ext" |
---|
2286 | </artwork></figure> |
---|
2287 | <t> |
---|
2288 | The receiving user agent &SHOULD-NOT; respect any directory path |
---|
2289 | information present in the filename-parm parameter, which is the only |
---|
2290 | parameter believed to apply to HTTP implementations at this time. The |
---|
2291 | filename &SHOULD; be treated as a terminal component only. |
---|
2292 | </t> |
---|
2293 | <t> |
---|
2294 | If this header is used in a response with the application/octet-stream |
---|
2295 | content-type, the implied suggestion is that the user agent |
---|
2296 | should not display the response, but directly enter a `save response |
---|
2297 | as...' dialog. |
---|
2298 | </t> |
---|
2299 | <t> |
---|
2300 | See <xref target="content-disposition.issues"/> for Content-Disposition security issues. |
---|
2301 | </t> |
---|
2302 | </section> |
---|
2303 | </section> |
---|
2304 | |
---|
2305 | <section title="Compatibility with Previous Versions" anchor="compatibility"> |
---|
2306 | <section title="Changes from RFC 2068" anchor="changes.from.rfc.2068"> |
---|
2307 | <t> |
---|
2308 | Charset wildcarding is introduced to avoid explosion of character set |
---|
2309 | names in accept headers. (<xref target="header.accept-charset"/>) |
---|
2310 | </t> |
---|
2311 | <t> |
---|
2312 | Content-Base was deleted from the specification: it was not |
---|
2313 | implemented widely, and there is no simple, safe way to introduce it |
---|
2314 | without a robust extension mechanism. In addition, it is used in a |
---|
2315 | similar, but not identical fashion in MHTML <xref target="RFC2110"/>. |
---|
2316 | </t> |
---|
2317 | <t> |
---|
2318 | A content-coding of "identity" was introduced, to solve problems |
---|
2319 | discovered in caching. (<xref target="content.codings"/>) |
---|
2320 | </t> |
---|
2321 | <t> |
---|
2322 | Quality Values of zero should indicate that "I don't want something" |
---|
2323 | to allow clients to refuse a representation. (<xref target="quality.values"/>) |
---|
2324 | </t> |
---|
2325 | <t> |
---|
2326 | The Alternates<iref item="Alternates header" primary="true"/><iref item="Headers" subitem="Alternate" primary="true"/>, Content-Version<iref item="Content-Version header" primary="true"/><iref item="Headers" subitem="Content-Version" primary="true"/>, Derived-From<iref item="Derived-From header" primary="true"/><iref item="Headers" subitem="Derived-From" primary="true"/>, Link<iref item="Link header" primary="true"/><iref item="Headers" subitem="Link" primary="true"/>, URI<iref item="URI header" primary="true"/><iref item="Headers" subitem="URI" primary="true"/>, Public<iref item="Public header" primary="true"/><iref item="Headers" subitem="Public" primary="true"/> and |
---|
2327 | Content-Base<iref item="Content-Base header" primary="true"/><iref item="Headers" subitem="Content-Base" primary="true"/> header fields were defined in previous versions of this |
---|
2328 | specification, but not commonly implemented. See <xref target="RFC2068"/>. |
---|
2329 | </t> |
---|
2330 | </section> |
---|
2331 | |
---|
2332 | <section title="Changes from RFC 2616" anchor="changes.from.rfc.2616"> |
---|
2333 | <t> |
---|
2334 | Clarify contexts that charset is used in. |
---|
2335 | (<xref target="character.sets"/>) |
---|
2336 | </t> |
---|
2337 | <t> |
---|
2338 | Remove reference to non-existant identity transfer-coding value tokens. |
---|
2339 | (<xref target="no.content-transfer-encoding"/>) |
---|
2340 | </t> |
---|
2341 | </section> |
---|
2342 | |
---|
2343 | </section> |
---|
2344 | |
---|
2345 | <section title="Change Log (to be removed by RFC Editor before publication)"> |
---|
2346 | |
---|
2347 | <section title="Since RFC2616"> |
---|
2348 | <t> |
---|
2349 | Extracted relevant partitions from <xref target="RFC2616"/>. |
---|
2350 | </t> |
---|
2351 | </section> |
---|
2352 | |
---|
2353 | <section title="Since draft-ietf-httpbis-p3-payload-00"> |
---|
2354 | <t> |
---|
2355 | Closed issues: |
---|
2356 | <list style="symbols"> |
---|
2357 | <t> |
---|
2358 | <eref target="http://www3.tools.ietf.org/wg/httpbis/trac/ticket/8"/>: |
---|
2359 | "Media Type Registrations" |
---|
2360 | (<eref target="http://purl.org/NET/http-errata#media-reg"/>) |
---|
2361 | </t> |
---|
2362 | <t> |
---|
2363 | <eref target="http://www3.tools.ietf.org/wg/httpbis/trac/ticket/14"/>: |
---|
2364 | "Clarification regarding quoting of charset values" |
---|
2365 | (<eref target="http://purl.org/NET/http-errata#charactersets"/>) |
---|
2366 | </t> |
---|
2367 | <t> |
---|
2368 | <eref target="http://www3.tools.ietf.org/wg/httpbis/trac/ticket/16"/>: |
---|
2369 | "Remove 'identity' token references" |
---|
2370 | (<eref target="http://purl.org/NET/http-errata#identity"/>) |
---|
2371 | </t> |
---|
2372 | <t> |
---|
2373 | <eref target="http://www3.tools.ietf.org/wg/httpbis/trac/ticket/25"/>: |
---|
2374 | "Accept-Encoding BNF" |
---|
2375 | </t> |
---|
2376 | <t> |
---|
2377 | <eref target="http://www3.tools.ietf.org/wg/httpbis/trac/ticket/46"/>: |
---|
2378 | "RFC1700 references" |
---|
2379 | </t> |
---|
2380 | <t> |
---|
2381 | <eref target="http://www3.tools.ietf.org/wg/httpbis/trac/ticket/66"/>: |
---|
2382 | "ISO-8859-1 Reference" |
---|
2383 | </t> |
---|
2384 | <t> |
---|
2385 | <eref target="http://www3.tools.ietf.org/wg/httpbis/trac/ticket/68"/>: |
---|
2386 | "Encoding References Normative" |
---|
2387 | </t> |
---|
2388 | </list> |
---|
2389 | </t> |
---|
2390 | <t> |
---|
2391 | Other changes: |
---|
2392 | <list style="symbols"> |
---|
2393 | <t> |
---|
2394 | Start work on categorizing references as "Normative" or "Informative". |
---|
2395 | </t> |
---|
2396 | </list> |
---|
2397 | </t> |
---|
2398 | </section> |
---|
2399 | |
---|
2400 | </section> |
---|
2401 | |
---|
2402 | </back> |
---|
2403 | </rfc> |
---|