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

Last change on this file since 148 was 148, checked in by fielding@…, 12 years ago

Fix remaining Misc. Typos to address #50.

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