source: draft-ietf-httpbis/01/p3-payload.xml @ 165

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

set date and version for draft 01

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