source: draft-ietf-httpbis/latest/p3-payload.xml @ 203

Last change on this file since 203 was 203, checked in by julian.reschke@…, 12 years ago

Add processing instructions for inline comments throughout, and use them for the IANA TBDs.

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