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

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

Add IANA considerations sub section for content codings (see #149)

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