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

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

Update "Editorial Note" stating that we now have incorporated everything that was in draft-lafon-rfc2616bis-03.

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