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

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

add linking between ABNF rules (does not affect TXT version), relates to #36.

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