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

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

Clarify not to share coding names between the content coding and the transfer coding registry unless the encoding is the same (see #143)

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