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

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

Rewrite header ABNFs to spell out whitespace rules, factor out value format definitions. (related to #36)

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