source: draft-ietf-httpbis/02/draft-ietf-httpbis-p3-payload-02.xml @ 377

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

Prepare for release of draft 02 on Monday, Feb 24.

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