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

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

Cleanup references after switch to symbolic references (removing duplicated RFC numbers), clean up some of the references XML code.

  • Property svn:eol-style set to native
File size: 103.6 KB
1<?xml version="1.0" encoding="utf-8"?>
2<!DOCTYPE rfc [
3  <!ENTITY MAY "<bcp14 xmlns=''>MAY</bcp14>">
4  <!ENTITY MUST "<bcp14 xmlns=''>MUST</bcp14>">
5  <!ENTITY MUST-NOT "<bcp14 xmlns=''>MUST NOT</bcp14>">
6  <!ENTITY OPTIONAL "<bcp14 xmlns=''>OPTIONAL</bcp14>">
7  <!ENTITY RECOMMENDED "<bcp14 xmlns=''>RECOMMENDED</bcp14>">
8  <!ENTITY REQUIRED "<bcp14 xmlns=''>REQUIRED</bcp14>">
9  <!ENTITY SHALL "<bcp14 xmlns=''>SHALL</bcp14>">
10  <!ENTITY SHALL-NOT "<bcp14 xmlns=''>SHALL NOT</bcp14>">
11  <!ENTITY SHOULD "<bcp14 xmlns=''>SHOULD</bcp14>">
12  <!ENTITY SHOULD-NOT "<bcp14 xmlns=''>SHOULD NOT</bcp14>">
13  <!ENTITY ID-VERSION "latest">
14  <!ENTITY ID-MONTH "December">
15  <!ENTITY ID-YEAR "2007">
16  <!ENTITY caching                  "<xref target='Part6' xmlns:x=''/>">
17  <!ENTITY header-transfer-encoding "<xref target='Part1' x:rel='#header.transfer-encoding' xmlns:x=''/>">
18  <!ENTITY header-allow             "<xref target='Part2' x:rel='#header.allow' xmlns:x=''/>">
19  <!ENTITY header-content-length    "<xref target='Part1' x:rel='#header.content-length' xmlns:x=''/>">
20  <!ENTITY header-content-range     "<xref target='Part5' x:rel='#header.content-range' xmlns:x=''/>">
21  <!ENTITY header-expires           "<xref target='Part6' x:rel='#header.expires' xmlns:x=''/>">
22  <!ENTITY header-last-modified     "<xref target='Part4' x:rel='#header.last-modified' xmlns:x=''/>">
23  <!ENTITY header-user-agent        "<xref target='Part2' x:rel='#header.user-agent' xmlns:x=''/>">
24  <!ENTITY message-body             "<xref target='Part1' x:rel='#message.body' xmlns:x=''/>">
25  <!ENTITY message-length           "<xref target='Part1' x:rel='#message.length' xmlns:x=''/>">
26  <!ENTITY multipart-byteranges     "<xref target='Part5' x:rel='' xmlns:x=''/>">
28<?rfc toc="yes" ?>
29<?rfc symrefs="yes" ?>
30<?rfc sortrefs="yes" ?>
31<?rfc compact="yes"?>
32<?rfc subcompact="no" ?>
33<?rfc linkmailto="no" ?>
34<?rfc editing="no" ?>
35<?rfc-ext allow-markup-in-artwork="yes" ?>
36<?rfc-ext include-references-in-index="yes" ?>
37<rfc obsoletes="2068, 2616" category="std"
38     ipr="full3978" docName="draft-ietf-httpbis-p3-payload-&ID-VERSION;"
39     xmlns:x='' xmlns:ed="">
42  <title abbrev="HTTP/1.1">HTTP/1.1, part 3: Message Payload and Content Negotiation</title>
44  <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
45    <organization abbrev="Day Software">Day Software</organization>
46    <address>
47      <postal>
48        <street>23 Corporate Plaza DR, Suite 280</street>
49        <city>Newport Beach</city>
50        <region>CA</region>
51        <code>92660</code>
52        <country>USA</country>
53      </postal>
54      <phone>+1-949-706-5300</phone>
55      <facsimile>+1-949-706-5305</facsimile>
56      <email></email>
57      <uri></uri>
58    </address>
59  </author>
61  <author initials="J." surname="Gettys" fullname="Jim Gettys">
62    <organization>One Laptop per Child</organization>
63    <address>
64      <postal>
65        <street>21 Oak Knoll Road</street>
66        <city>Carlisle</city>
67        <region>MA</region>
68        <code>01741</code>
69        <country>USA</country>
70      </postal>
71      <email></email>
72      <uri></uri>
73    </address>
74  </author>
76  <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
77    <organization abbrev="HP">Hewlett-Packard Company</organization>
78    <address>
79      <postal>
80        <street>HP Labs, Large Scale Systems Group</street>
81        <street>1501 Page Mill Road, MS 1177</street>
82        <city>Palo Alto</city>
83        <region>CA</region>
84        <code>94304</code>
85        <country>USA</country>
86      </postal>
87      <email></email>
88    </address>
89  </author>
91  <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
92    <organization abbrev="Microsoft">Microsoft Corporation</organization>
93    <address>
94      <postal>
95        <street>1 Microsoft Way</street>
96        <city>Redmond</city>
97        <region>WA</region>
98        <code>98052</code>
99        <country>USA</country>
100      </postal>
101      <email></email>
102    </address>
103  </author>
105  <author initials="L." surname="Masinter" fullname="Larry Masinter">
106    <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
107    <address>
108      <postal>
109        <street>345 Park Ave</street>
110        <city>San Jose</city>
111        <region>CA</region>
112        <code>95110</code>
113        <country>USA</country>
114      </postal>
115      <email></email>
116      <uri></uri>
117    </address>
118  </author>
120  <author initials="P." surname="Leach" fullname="Paul J. Leach">
121    <organization abbrev="Microsoft">Microsoft Corporation</organization>
122    <address>
123      <postal>
124        <street>1 Microsoft Way</street>
125        <city>Redmond</city>
126        <region>WA</region>
127        <code>98052</code>
128      </postal>
129      <email></email>
130    </address>
131  </author>
133  <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
134    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
135    <address>
136      <postal>
137        <street>MIT Computer Science and Artificial Intelligence Laboratory</street>
138        <street>The Stata Center, Building 32</street>
139        <street>32 Vassar Street</street>
140        <city>Cambridge</city>
141        <region>MA</region>
142        <code>02139</code>
143        <country>USA</country>
144      </postal>
145      <email></email>
146      <uri></uri>
147    </address>
148  </author>
150  <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
151    <organization abbrev="W3C">World Wide Web Consortium</organization>
152    <address>
153      <postal>
154        <street>W3C / ERCIM</street>
155        <street>2004, rte des Lucioles</street>
156        <city>Sophia-Antipolis</city>
157        <region>AM</region>
158        <code>06902</code>
159        <country>France</country>
160      </postal>
161      <email></email>
162      <uri></uri>
163    </address>
164  </author>
166  <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
167    <organization abbrev="greenbytes">greenbytes GmbH</organization>
168    <address>
169      <postal>
170        <street>Hafenweg 16</street>
171        <city>Muenster</city><region>NW</region><code>48155</code>
172        <country>Germany</country>
173      </postal>
174      <phone>+49 251 2807760</phone>   
175      <facsimile>+49 251 2807761</facsimile>   
176      <email></email>       
177      <uri></uri>     
178    </address>
179  </author>
181  <date month="&ID-MONTH;" year="&ID-YEAR;"/>
185   The Hypertext Transfer Protocol (HTTP) is an application-level
186   protocol for distributed, collaborative, hypermedia information
187   systems. HTTP has been in use by the World Wide Web global information
188   initiative since 1990. This document is Part 3 of the seven-part specification
189   that defines the protocol referred to as "HTTP/1.1" and, taken together,
190   obsoletes RFC 2616.  Part 3 defines HTTP message content,
191   metadata, and content negotiation.
195<note title="Editorial Note (To be removed by RFC Editor)">
196  <t>
197    This version of the HTTP specification contains only minimal editorial
198    changes from <xref target="RFC2616"/> (abstract, introductory paragraph,
199    and authors' addresses).  All other changes are due to partitioning the
200    original into seven mostly independent parts.  The intent is for readers
201    of future drafts to able to use draft 00 as the basis for comparison
202    when the WG makes later changes to the specification text.  This draft
203    will shortly be followed by draft 01 (containing the first round of changes
204    that have already been agreed to on the mailing list). There is no point in
205    reviewing this draft other than to verify that the partitioning has been
206    done correctly.  Roy T. Fielding, Yves Lafon, and Julian Reschke
207    will be the editors after draft 00 is submitted.
208  </t>
209  <t>
210    Discussion of this draft should take place on the HTTPBIS working group
211    mailing list ( The current issues list is
212    at <eref target=""/>
213    and related documents (including fancy diffs) can be found at
214    <eref target=""/>.
215  </t>
219<section title="Introduction" anchor="introduction">
221   This document will define aspects of HTTP related to the payload of
222   messages (message content), including metadata and media types, along
223   with HTTP content negotiation.  Right now it only includes the extracted
224   relevant sections of RFC 2616 without edit.
227<section title="Requirements" anchor="intro.requirements">
229   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
230   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
231   document are to be interpreted as described in <xref target="RFC2119"/>.
234   An implementation is not compliant if it fails to satisfy one or more
235   of the &MUST; or &REQUIRED; level requirements for the protocols it
236   implements. An implementation that satisfies all the &MUST; or &REQUIRED;
237   level and all the &SHOULD; level requirements for its protocols is said
238   to be "unconditionally compliant"; one that satisfies all the &MUST;
239   level requirements but not all the &SHOULD; level requirements for its
240   protocols is said to be "conditionally compliant."
245<section title="Protocol Parameters" anchor="protocol.parameters">
247<section title="Character Sets" anchor="character.sets">
249   HTTP uses the same definition of the term "character set" as that
250   described for MIME:
253   The term "character set" is used in this document to refer to a
254   method used with one or more tables to convert a sequence of octets
255   into a sequence of characters. Note that unconditional conversion in
256   the other direction is not required, in that not all characters may
257   be available in a given character set and a character set may provide
258   more than one sequence of octets to represent a particular character.
259   This definition is intended to allow various kinds of character
260   encoding, from simple single-table mappings such as US-ASCII to
261   complex table switching methods such as those that use ISO-2022's
262   techniques. However, the definition associated with a MIME character
263   set name &MUST; fully specify the mapping to be performed from octets
264   to characters. In particular, use of external profiling information
265   to determine the exact mapping is not permitted.
268      <x:h>Note:</x:h> This use of the term "character set" is more commonly
269      referred to as a "character encoding." However, since HTTP and
270      MIME share the same registry, it is important that the terminology
271      also be shared.
274   HTTP character sets are identified by case-insensitive tokens. The
275   complete set of tokens is defined by the IANA Character Set registry
276   (<eref target=""/>).
278<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="charset"/>
279    charset = token
282   Although HTTP allows an arbitrary token to be used as a charset
283   value, any token that has a predefined value within the IANA
284   Character Set registry &MUST; represent the character set defined
285   by that registry. Applications &SHOULD; limit their use of character
286   sets to those defined by the IANA registry.
289   HTTP uses charset in two contexts: within an Accept-Charset request
290   header (in which the charset value is an unquoted token) and as the
291   value of a parameter in a Content-type header (within a request or
292   response), in which case the parameter value of the charset parameter
293   may be quoted.
296   Implementors should be aware of IETF character set requirements <xref target="RFC2279"/>
297   <xref target="RFC2277"/>.
300<section title="Missing Charset" anchor="missing.charset">
302   Some HTTP/1.0 software has interpreted a Content-Type header without
303   charset parameter incorrectly to mean "recipient should guess."
304   Senders wishing to defeat this behavior &MAY; include a charset
305   parameter even when the charset is ISO-8859-1 and &SHOULD; do so when
306   it is known that it will not confuse the recipient.
309   Unfortunately, some older HTTP/1.0 clients did not deal properly with
310   an explicit charset parameter. HTTP/1.1 recipients &MUST; respect the
311   charset label provided by the sender; and those user agents that have
312   a provision to "guess" a charset &MUST; use the charset from the
313   content-type field if they support that charset, rather than the
314   recipient's preference, when initially displaying a document. See
315   <xref target="canonicalization.and.text.defaults"/>.
320<section title="Content Codings" anchor="content.codings">
322   Content coding values indicate an encoding transformation that has
323   been or can be applied to an entity. Content codings are primarily
324   used to allow a document to be compressed or otherwise usefully
325   transformed without losing the identity of its underlying media type
326   and without loss of information. Frequently, the entity is stored in
327   coded form, transmitted directly, and only decoded by the recipient.
329<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="content-coding"/>
330    content-coding   = token
333   All content-coding values are case-insensitive. HTTP/1.1 uses
334   content-coding values in the Accept-Encoding (<xref target="header.accept-encoding"/>) and
335   Content-Encoding (<xref target="header.content-encoding"/>) header fields. Although the value
336   describes the content-coding, what is more important is that it
337   indicates what decoding mechanism will be required to remove the
338   encoding.
341   The Internet Assigned Numbers Authority (IANA) acts as a registry for
342   content-coding value tokens. Initially, the registry contains the
343   following tokens:
346   gzip<iref item="gzip"/>
347  <list>
348    <t>
349        An encoding format produced by the file compression program
350        "gzip" (GNU zip) as described in <xref target="RFC1952"/>. This format is a
351        Lempel-Ziv coding (LZ77) with a 32 bit CRC.
352    </t>
353  </list>
356   compress<iref item="compress"/>
357  <list><t>
358        The encoding format produced by the common UNIX file compression
359        program "compress". This format is an adaptive Lempel-Ziv-Welch
360        coding (LZW).
362        Use of program names for the identification of encoding formats
363        is not desirable and is discouraged for future encodings. Their
364        use here is representative of historical practice, not good
365        design. For compatibility with previous implementations of HTTP,
366        applications &SHOULD; consider "x-gzip" and "x-compress" to be
367        equivalent to "gzip" and "compress" respectively.
368  </t></list>
371   deflate<iref item="deflate"/>
372  <list><t>
373        The "zlib" format defined in <xref target="RFC1950"/> in combination with
374        the "deflate" compression mechanism described in <xref target="RFC1951"/>.
375  </t></list>
378   identity<iref item="identity"/>
379  <list><t>
380        The default (identity) encoding; the use of no transformation
381        whatsoever. This content-coding is used only in the Accept-Encoding
382        header, and &SHOULD-NOT;  be used in the Content-Encoding
383        header.
384  </t></list>
387   New content-coding value tokens &SHOULD; be registered; to allow
388   interoperability between clients and servers, specifications of the
389   content coding algorithms needed to implement a new value &SHOULD; be
390   publicly available and adequate for independent implementation, and
391   conform to the purpose of content coding defined in this section.
395<section title="Media Types" anchor="media.types">
397   HTTP uses Internet Media Types <xref target="RFC4288"/> in the Content-Type (<xref target="header.content-type"/>)
398   and Accept (<xref target="header.accept"/>) header fields in order to provide
399   open and extensible data typing and type negotiation.
401<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"/>
402    media-type     = type "/" subtype *( ";" parameter )
403    type           = token
404    subtype        = token
407   Parameters &MAY; follow the type/subtype in the form of attribute/value
408   pairs.
410<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"/>
411    parameter               = attribute "=" value
412    attribute               = token
413    value                   = token | quoted-string
416   The type, subtype, and parameter attribute names are case-insensitive.
417   Parameter values might or might not be case-sensitive,
418   depending on the semantics of the parameter name. Linear white space
419   (LWS) &MUST-NOT; be used between the type and subtype, nor between an
420   attribute and its value. The presence or absence of a parameter might
421   be significant to the processing of a media-type, depending on its
422   definition within the media type registry.
425   Note that some older HTTP applications do not recognize media type
426   parameters. When sending data to older HTTP applications,
427   implementations &SHOULD; only use media type parameters when they are
428   required by that type/subtype definition.
431   Media-type values are registered with the Internet Assigned Number
432   Authority (IANA). The media type registration process is
433   outlined in RFC 4288 <xref target="RFC4288"/>. Use of non-registered media types is
434   discouraged.
437<section title="Canonicalization and Text Defaults" anchor="canonicalization.and.text.defaults">
439   Internet media types are registered with a canonical form. An
440   entity-body transferred via HTTP messages &MUST; be represented in the
441   appropriate canonical form prior to its transmission except for
442   "text" types, as defined in the next paragraph.
445   When in canonical form, media subtypes of the "text" type use CRLF as
446   the text line break. HTTP relaxes this requirement and allows the
447   transport of text media with plain CR or LF alone representing a line
448   break when it is done consistently for an entire entity-body. HTTP
449   applications &MUST; accept CRLF, bare CR, and bare LF as being
450   representative of a line break in text media received via HTTP. In
451   addition, if the text is represented in a character set that does not
452   use octets 13 and 10 for CR and LF respectively, as is the case for
453   some multi-byte character sets, HTTP allows the use of whatever octet
454   sequences are defined by that character set to represent the
455   equivalent of CR and LF for line breaks. This flexibility regarding
456   line breaks applies only to text media in the entity-body; a bare CR
457   or LF &MUST-NOT; be substituted for CRLF within any of the HTTP control
458   structures (such as header fields and multipart boundaries).
461   If an entity-body is encoded with a content-coding, the underlying
462   data &MUST; be in a form defined above prior to being encoded.
465   The "charset" parameter is used with some media types to define the
466   character set (<xref target="character.sets"/>) of the data. When no explicit charset
467   parameter is provided by the sender, media subtypes of the "text"
468   type are defined to have a default charset value of "ISO-8859-1" when
469   received via HTTP. Data in character sets other than "ISO-8859-1" or
470   its subsets &MUST; be labeled with an appropriate charset value. See
471   <xref target="missing.charset"/> for compatibility problems.
475<section title="Multipart Types" anchor="multipart.types">
477   MIME provides for a number of "multipart" types -- encapsulations of
478   one or more entities within a single message-body. All multipart
479   types share a common syntax, as defined in <xref target="RFC2046" x:sec="5.1.1" x:fmt="of"/>,
480   and &MUST; include a boundary parameter as part of the media type
481   value. The message body is itself a protocol element and &MUST;
482   therefore use only CRLF to represent line breaks between body-parts.
483   Unlike in RFC 2046, the epilogue of any multipart message &MUST; be
484   empty; HTTP applications &MUST-NOT; transmit the epilogue (even if the
485   original multipart contains an epilogue). These restrictions exist in
486   order to preserve the self-delimiting nature of a multipart message-body,
487   wherein the "end" of the message-body is indicated by the
488   ending multipart boundary.
491   In general, HTTP treats a multipart message-body no differently than
492   any other media type: strictly as payload. The one exception is the
493   "multipart/byteranges" type (&multipart-byteranges;) when it appears in a 206
494   (Partial Content) response.
495   <!-- jre: re-insert removed text pointing to caching? -->
496   In all
497   other cases, an HTTP user agent &SHOULD; follow the same or similar
498   behavior as a MIME user agent would upon receipt of a multipart type.
499   The MIME header fields within each body-part of a multipart message-body
500   do not have any significance to HTTP beyond that defined by
501   their MIME semantics.
504   In general, an HTTP user agent &SHOULD; follow the same or similar
505   behavior as a MIME user agent would upon receipt of a multipart type.
506   If an application receives an unrecognized multipart subtype, the
507   application &MUST; treat it as being equivalent to "multipart/mixed".
510      <x:h>Note:</x:h> The "multipart/form-data" type has been specifically defined
511      for carrying form data suitable for processing via the POST
512      request method, as described in <xref target="RFC1867"/>.
517<section title="Quality Values" anchor="quality.values">
519   HTTP content negotiation (<xref target="content.negotiation"/>) uses short "floating point"
520   numbers to indicate the relative importance ("weight") of various
521   negotiable parameters.  A weight is normalized to a real number in
522   the range 0 through 1, where 0 is the minimum and 1 the maximum
523   value. If a parameter has a quality value of 0, then content with
524   this parameter is `not acceptable' for the client. HTTP/1.1
525   applications &MUST-NOT; generate more than three digits after the
526   decimal point. User configuration of these values &SHOULD; also be
527   limited in this fashion.
529<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="qvalue"/>
530    qvalue         = ( "0" [ "." 0*3DIGIT ] )
531                   | ( "1" [ "." 0*3("0") ] )
534   "Quality values" is a misnomer, since these values merely represent
535   relative degradation in desired quality.
539<section title="Language Tags" anchor="language.tags">
541   A language tag identifies a natural language spoken, written, or
542   otherwise conveyed by human beings for communication of information
543   to other human beings. Computer languages are explicitly excluded.
544   HTTP uses language tags within the Accept-Language and Content-Language
545   fields.
548   The syntax and registry of HTTP language tags is the same as that
549   defined by <xref target="RFC1766"/>. In summary, a language tag is composed of 1
550   or more parts: A primary language tag and a possibly empty series of
551   subtags:
553<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"/>
554     language-tag  = primary-tag *( "-" subtag )
555     primary-tag   = 1*8ALPHA
556     subtag        = 1*8ALPHA
559   White space is not allowed within the tag and all tags are case-insensitive.
560   The name space of language tags is administered by the
561   IANA. Example tags include:
563<figure><artwork type="example">
564    en, en-US, en-cockney, i-cherokee, x-pig-latin
567   where any two-letter primary-tag is an ISO-639 language abbreviation
568   and any two-letter initial subtag is an ISO-3166 country code. (The
569   last three tags above are not registered tags; all but the last are
570   examples of tags which could be registered in future.)
575<section title="Entity" anchor="entity">
577   Request and Response messages &MAY; transfer an entity if not otherwise
578   restricted by the request method or response status code. An entity
579   consists of entity-header fields and an entity-body, although some
580   responses will only include the entity-headers.
583   In this section, both sender and recipient refer to either the client
584   or the server, depending on who sends and who receives the entity.
587<section title="Entity Header Fields" anchor="entity.header.fields">
589   Entity-header fields define metainformation about the entity-body or,
590   if no body is present, about the resource identified by the request.
591   Some of this metainformation is &OPTIONAL;; some might be &REQUIRED; by
592   portions of this specification.
594<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="entity-header"/><iref primary="true" item="Grammar" subitem="extension-header"/>
595    entity-header  = Allow                    ; &header-allow;
596                   | Content-Encoding         ; <xref target="header.content-encoding"/>
597                   | Content-Language         ; <xref target="header.content-language"/>
598                   | Content-Length           ; &header-content-length;
599                   | Content-Location         ; <xref target="header.content-location"/>
600                   | Content-MD5              ; <xref target="header.content-md5"/>
601                   | Content-Range            ; &header-content-range;
602                   | Content-Type             ; <xref target="header.content-type"/>
603                   | Expires                  ; &header-expires;
604                   | Last-Modified            ; &header-last-modified;
605                   | extension-header
607    extension-header = message-header
610   The extension-header mechanism allows additional entity-header fields
611   to be defined without changing the protocol, but these fields cannot
612   be assumed to be recognizable by the recipient. Unrecognized header
613   fields &SHOULD; be ignored by the recipient and &MUST; be forwarded by
614   transparent proxies.
618<section title="Entity Body" anchor="entity.body">
620   The entity-body (if any) sent with an HTTP request or response is in
621   a format and encoding defined by the entity-header fields.
623<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="entity-body"/>
624    entity-body    = *OCTET
627   An entity-body is only present in a message when a message-body is
628   present, as described in &message-body;. The entity-body is obtained
629   from the message-body by decoding any Transfer-Encoding that might
630   have been applied to ensure safe and proper transfer of the message.
633<section title="Type" anchor="type">
635   When an entity-body is included with a message, the data type of that
636   body is determined via the header fields Content-Type and Content-Encoding.
637   These define a two-layer, ordered encoding model:
639<figure><artwork type="example">
640    entity-body := Content-Encoding( Content-Type( data ) )
643   Content-Type specifies the media type of the underlying data.
644   Content-Encoding may be used to indicate any additional content
645   codings applied to the data, usually for the purpose of data
646   compression, that are a property of the requested resource. There is
647   no default encoding.
650   Any HTTP/1.1 message containing an entity-body &SHOULD; include a
651   Content-Type header field defining the media type of that body. If
652   and only if the media type is not given by a Content-Type field, the
653   recipient &MAY; attempt to guess the media type via inspection of its
654   content and/or the name extension(s) of the URI used to identify the
655   resource. If the media type remains unknown, the recipient &SHOULD;
656   treat it as type "application/octet-stream".
660<section title="Entity Length" anchor="entity.length">
662   The entity-length of a message is the length of the message-body
663   before any transfer-codings have been applied. &message-length; defines
664   how the transfer-length of a message-body is determined.
670<section title="Content Negotiation" anchor="content.negotiation">
672   Most HTTP responses include an entity which contains information for
673   interpretation by a human user. Naturally, it is desirable to supply
674   the user with the "best available" entity corresponding to the
675   request. Unfortunately for servers and caches, not all users have the
676   same preferences for what is "best," and not all user agents are
677   equally capable of rendering all entity types. For that reason, HTTP
678   has provisions for several mechanisms for "content negotiation" --
679   the process of selecting the best representation for a given response
680   when there are multiple representations available.
681  <list><t>
682      <x:h>Note:</x:h> This is not called "format negotiation" because the
683      alternate representations may be of the same media type, but use
684      different capabilities of that type, be in different languages,
685      etc.
686  </t></list>
689   Any response containing an entity-body &MAY; be subject to negotiation,
690   including error responses.
693   There are two kinds of content negotiation which are possible in
694   HTTP: server-driven and agent-driven negotiation. These two kinds of
695   negotiation are orthogonal and thus may be used separately or in
696   combination. One method of combination, referred to as transparent
697   negotiation, occurs when a cache uses the agent-driven negotiation
698   information provided by the origin server in order to provide
699   server-driven negotiation for subsequent requests.
702<section title="Server-driven Negotiation" anchor="server-driven.negotiation">
704   If the selection of the best representation for a response is made by
705   an algorithm located at the server, it is called server-driven
706   negotiation. Selection is based on the available representations of
707   the response (the dimensions over which it can vary; e.g. language,
708   content-coding, etc.) and the contents of particular header fields in
709   the request message or on other information pertaining to the request
710   (such as the network address of the client).
713   Server-driven negotiation is advantageous when the algorithm for
714   selecting from among the available representations is difficult to
715   describe to the user agent, or when the server desires to send its
716   "best guess" to the client along with the first response (hoping to
717   avoid the round-trip delay of a subsequent request if the "best
718   guess" is good enough for the user). In order to improve the server's
719   guess, the user agent &MAY; include request header fields (Accept,
720   Accept-Language, Accept-Encoding, etc.) which describe its
721   preferences for such a response.
724   Server-driven negotiation has disadvantages:
725  <list style="numbers">
726    <t>
727         It is impossible for the server to accurately determine what
728         might be "best" for any given user, since that would require
729         complete knowledge of both the capabilities of the user agent
730         and the intended use for the response (e.g., does the user want
731         to view it on screen or print it on paper?).
732    </t>
733    <t>
734         Having the user agent describe its capabilities in every
735         request can be both very inefficient (given that only a small
736         percentage of responses have multiple representations) and a
737         potential violation of the user's privacy.
738    </t>
739    <t>
740         It complicates the implementation of an origin server and the
741         algorithms for generating responses to a request.
742    </t>
743    <t>
744         It may limit a public cache's ability to use the same response
745         for multiple user's requests.
746    </t>
747  </list>
750   HTTP/1.1 includes the following request-header fields for enabling
751   server-driven negotiation through description of user agent
752   capabilities and user preferences: Accept (<xref target="header.accept"/>), Accept-Charset
753   (<xref target="header.accept-charset"/>), Accept-Encoding (<xref target="header.accept-encoding"/>), Accept-Language
754   (<xref target="header.accept-language"/>), and User-Agent (&header-user-agent;). However, an
755   origin server is not limited to these dimensions and &MAY; vary the
756   response based on any aspect of the request, including information
757   outside the request-header fields or within extension header fields
758   not defined by this specification.
761   The Vary header field &caching; can be used to express the parameters the
762   server uses to select a representation that is subject to server-driven
763   negotiation.
767<section title="Agent-driven Negotiation" anchor="agent-driven.negotiation">
769   With agent-driven negotiation, selection of the best representation
770   for a response is performed by the user agent after receiving an
771   initial response from the origin server. Selection is based on a list
772   of the available representations of the response included within the
773   header fields or entity-body of the initial response, with each
774   representation identified by its own URI. Selection from among the
775   representations may be performed automatically (if the user agent is
776   capable of doing so) or manually by the user selecting from a
777   generated (possibly hypertext) menu.
780   Agent-driven negotiation is advantageous when the response would vary
781   over commonly-used dimensions (such as type, language, or encoding),
782   when the origin server is unable to determine a user agent's
783   capabilities from examining the request, and generally when public
784   caches are used to distribute server load and reduce network usage.
787   Agent-driven negotiation suffers from the disadvantage of needing a
788   second request to obtain the best alternate representation. This
789   second request is only efficient when caching is used. In addition,
790   this specification does not define any mechanism for supporting
791   automatic selection, though it also does not prevent any such
792   mechanism from being developed as an extension and used within
793   HTTP/1.1.
796   HTTP/1.1 defines the 300 (Multiple Choices) and 406 (Not Acceptable)
797   status codes for enabling agent-driven negotiation when the server is
798   unwilling or unable to provide a varying response using server-driven
799   negotiation.
803<section title="Transparent Negotiation" anchor="transparent.negotiation">
805   Transparent negotiation is a combination of both server-driven and
806   agent-driven negotiation. When a cache is supplied with a form of the
807   list of available representations of the response (as in agent-driven
808   negotiation) and the dimensions of variance are completely understood
809   by the cache, then the cache becomes capable of performing server-driven
810   negotiation on behalf of the origin server for subsequent
811   requests on that resource.
814   Transparent negotiation has the advantage of distributing the
815   negotiation work that would otherwise be required of the origin
816   server and also removing the second request delay of agent-driven
817   negotiation when the cache is able to correctly guess the right
818   response.
821   This specification does not define any mechanism for transparent
822   negotiation, though it also does not prevent any such mechanism from
823   being developed as an extension that could be used within HTTP/1.1.
827<section title="Header Field Definitions" anchor="header.fields">
829   This section defines the syntax and semantics of all standard
830   HTTP/1.1 header fields. For entity-header fields, both sender and
831   recipient refer to either the client or the server, depending on who
832   sends and who receives the entity.
834<section title="Accept" anchor="header.accept">
835  <iref primary="true" item="Accept header" x:for-anchor=""/>
836  <iref primary="true" item="Headers" subitem="Accept" x:for-anchor=""/>
838   The Accept request-header field can be used to specify certain media
839   types which are acceptable for the response. Accept headers can be
840   used to indicate that the request is specifically limited to a small
841   set of desired types, as in the case of a request for an in-line
842   image.
844<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"/>
845    Accept         = "Accept" ":"
846                     #( media-range [ accept-params ] )
848    media-range    = ( "*/*"
849                     | ( type "/" "*" )
850                     | ( type "/" subtype )
851                     ) *( ";" parameter )
852    accept-params  = ";" "q" "=" qvalue *( accept-extension )
853    accept-extension = ";" token [ "=" ( token | quoted-string ) ]
856   The asterisk "*" character is used to group media types into ranges,
857   with "*/*" indicating all media types and "type/*" indicating all
858   subtypes of that type. The media-range &MAY; include media type
859   parameters that are applicable to that range.
862   Each media-range &MAY; be followed by one or more accept-params,
863   beginning with the "q" parameter for indicating a relative quality
864   factor. The first "q" parameter (if any) separates the media-range
865   parameter(s) from the accept-params. Quality factors allow the user
866   or user agent to indicate the relative degree of preference for that
867   media-range, using the qvalue scale from 0 to 1 (<xref target="quality.values"/>). The
868   default value is q=1.
869  <list><t>
870      <x:h>Note:</x:h> Use of the "q" parameter name to separate media type
871      parameters from Accept extension parameters is due to historical
872      practice. Although this prevents any media type parameter named
873      "q" from being used with a media range, such an event is believed
874      to be unlikely given the lack of any "q" parameters in the IANA
875      media type registry and the rare usage of any media type
876      parameters in Accept. Future media types are discouraged from
877      registering any parameter named "q".
878  </t></list>
881   The example
883<figure><artwork type="example">
884    Accept: audio/*; q=0.2, audio/basic
887   &SHOULD; be interpreted as "I prefer audio/basic, but send me any audio
888   type if it is the best available after an 80% mark-down in quality."
891   If no Accept header field is present, then it is assumed that the
892   client accepts all media types. If an Accept header field is present,
893   and if the server cannot send a response which is acceptable
894   according to the combined Accept field value, then the server &SHOULD;
895   send a 406 (not acceptable) response.
898   A more elaborate example is
900<figure><artwork type="example">
901    Accept: text/plain; q=0.5, text/html,
902            text/x-dvi; q=0.8, text/x-c
905   Verbally, this would be interpreted as "text/html and text/x-c are
906   the preferred media types, but if they do not exist, then send the
907   text/x-dvi entity, and if that does not exist, send the text/plain
908   entity."
911   Media ranges can be overridden by more specific media ranges or
912   specific media types. If more than one media range applies to a given
913   type, the most specific reference has precedence. For example,
915<figure><artwork type="example">
916    Accept: text/*, text/html, text/html;level=1, */*
919   have the following precedence:
921<figure><artwork type="example">
922    1) text/html;level=1
923    2) text/html
924    3) text/*
925    4) */*
928   The media type quality factor associated with a given type is
929   determined by finding the media range with the highest precedence
930   which matches that type. For example,
932<figure><artwork type="example">
933    Accept: text/*;q=0.3, text/html;q=0.7, text/html;level=1,
934            text/html;level=2;q=0.4, */*;q=0.5
937   would cause the following values to be associated:
939<figure><artwork type="example">
940    text/html;level=1         = 1
941    text/html                 = 0.7
942    text/plain                = 0.3
943    image/jpeg                = 0.5
944    text/html;level=2         = 0.4
945    text/html;level=3         = 0.7
948      <x:h>Note:</x:h> A user agent might be provided with a default set of quality
949      values for certain media ranges. However, unless the user agent is
950      a closed system which cannot interact with other rendering agents,
951      this default set ought to be configurable by the user.
955<section title="Accept-Charset" anchor="header.accept-charset">
956  <iref primary="true" item="Accept-Charset header" x:for-anchor=""/>
957  <iref primary="true" item="Headers" subitem="Accept-Charset" x:for-anchor=""/>
959   The Accept-Charset request-header field can be used to indicate what
960   character sets are acceptable for the response. This field allows
961   clients capable of understanding more comprehensive or special-purpose
962   character sets to signal that capability to a server which is
963   capable of representing documents in those character sets.
965<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Accept-Charset"/>
966   Accept-Charset = "Accept-Charset" ":"
967           1#( ( charset | "*" )[ ";" "q" "=" qvalue ] )
970   Character set values are described in <xref target="character.sets"/>. Each charset &MAY;
971   be given an associated quality value which represents the user's
972   preference for that charset. The default value is q=1. An example is
974<figure><artwork type="example">
975   Accept-Charset: iso-8859-5, unicode-1-1;q=0.8
978   The special value "*", if present in the Accept-Charset field,
979   matches every character set (including ISO-8859-1) which is not
980   mentioned elsewhere in the Accept-Charset field. If no "*" is present
981   in an Accept-Charset field, then all character sets not explicitly
982   mentioned get a quality value of 0, except for ISO-8859-1, which gets
983   a quality value of 1 if not explicitly mentioned.
986   If no Accept-Charset header is present, the default is that any
987   character set is acceptable. If an Accept-Charset header is present,
988   and if the server cannot send a response which is acceptable
989   according to the Accept-Charset header, then the server &SHOULD; send
990   an error response with the 406 (not acceptable) status code, though
991   the sending of an unacceptable response is also allowed.
995<section title="Accept-Encoding" anchor="header.accept-encoding">
996  <iref primary="true" item="Accept-Encoding header" x:for-anchor=""/>
997  <iref primary="true" item="Headers" subitem="Accept-Encoding" x:for-anchor=""/>
999   The Accept-Encoding request-header field is similar to Accept, but
1000   restricts the content-codings (<xref target="content.codings"/>) that are acceptable in
1001   the response.
1003<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Accept-Encoding"/><iref primary="true" item="Grammar" subitem="codings"/>
1004    Accept-Encoding  = "Accept-Encoding" ":"
1005                       1#( codings [ ";" "q" "=" qvalue ] )
1006    codings          = ( content-coding | "*" )
1009   Examples of its use are:
1011<figure><artwork type="example">
1012    Accept-Encoding: compress, gzip
1013    Accept-Encoding:
1014    Accept-Encoding: *
1015    Accept-Encoding: compress;q=0.5, gzip;q=1.0
1016    Accept-Encoding: gzip;q=1.0, identity; q=0.5, *;q=0
1019   A server tests whether a content-coding is acceptable, according to
1020   an Accept-Encoding field, using these rules:
1021  <list style="numbers">
1022      <t>If the content-coding is one of the content-codings listed in
1023         the Accept-Encoding field, then it is acceptable, unless it is
1024         accompanied by a qvalue of 0. (As defined in <xref target="quality.values"/>, a
1025         qvalue of 0 means "not acceptable.")</t>
1027      <t>The special "*" symbol in an Accept-Encoding field matches any
1028         available content-coding not explicitly listed in the header
1029         field.</t>
1031      <t>If multiple content-codings are acceptable, then the acceptable
1032         content-coding with the highest non-zero qvalue is preferred.</t>
1034      <t>The "identity" content-coding is always acceptable, unless
1035         specifically refused because the Accept-Encoding field includes
1036         "identity;q=0", or because the field includes "*;q=0" and does
1037         not explicitly include the "identity" content-coding. If the
1038         Accept-Encoding field-value is empty, then only the "identity"
1039         encoding is acceptable.</t>
1040  </list>
1043   If an Accept-Encoding field is present in a request, and if the
1044   server cannot send a response which is acceptable according to the
1045   Accept-Encoding header, then the server &SHOULD; send an error response
1046   with the 406 (Not Acceptable) status code.
1049   If no Accept-Encoding field is present in a request, the server &MAY;
1050   assume that the client will accept any content coding. In this case,
1051   if "identity" is one of the available content-codings, then the
1052   server &SHOULD; use the "identity" content-coding, unless it has
1053   additional information that a different content-coding is meaningful
1054   to the client.
1055  <list><t>
1056      <x:h>Note:</x:h> If the request does not include an Accept-Encoding field,
1057      and if the "identity" content-coding is unavailable, then
1058      content-codings commonly understood by HTTP/1.0 clients (i.e.,
1059      "gzip" and "compress") are preferred; some older clients
1060      improperly display messages sent with other content-codings.  The
1061      server might also make this decision based on information about
1062      the particular user-agent or client.
1063    </t><t>
1064      <x:h>Note:</x:h> Most HTTP/1.0 applications do not recognize or obey qvalues
1065      associated with content-codings. This means that qvalues will not
1066      work and are not permitted with x-gzip or x-compress.
1067    </t></list>
1071<section title="Accept-Language" anchor="header.accept-language">
1072  <iref primary="true" item="Accept-Language header" x:for-anchor=""/>
1073  <iref primary="true" item="Headers" subitem="Accept-Language" x:for-anchor=""/>
1075   The Accept-Language request-header field is similar to Accept, but
1076   restricts the set of natural languages that are preferred as a
1077   response to the request. Language tags are defined in <xref target="language.tags"/>.
1079<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Accept-Language"/><iref primary="true" item="Grammar" subitem="language-range"/>
1080    Accept-Language = "Accept-Language" ":"
1081                      1#( language-range [ ";" "q" "=" qvalue ] )
1082    language-range  = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) | "*" )
1085   Each language-range &MAY; be given an associated quality value which
1086   represents an estimate of the user's preference for the languages
1087   specified by that range. The quality value defaults to "q=1". For
1088   example,
1090<figure><artwork type="example">
1091    Accept-Language: da, en-gb;q=0.8, en;q=0.7
1094   would mean: "I prefer Danish, but will accept British English and
1095   other types of English." A language-range matches a language-tag if
1096   it exactly equals the tag, or if it exactly equals a prefix of the
1097   tag such that the first tag character following the prefix is "-".
1098   The special range "*", if present in the Accept-Language field,
1099   matches every tag not matched by any other range present in the
1100   Accept-Language field.
1101  <list><t>
1102      <x:h>Note:</x:h> This use of a prefix matching rule does not imply that
1103      language tags are assigned to languages in such a way that it is
1104      always true that if a user understands a language with a certain
1105      tag, then this user will also understand all languages with tags
1106      for which this tag is a prefix. The prefix rule simply allows the
1107      use of prefix tags if this is the case.
1108  </t></list>
1111   The language quality factor assigned to a language-tag by the
1112   Accept-Language field is the quality value of the longest language-range
1113   in the field that matches the language-tag. If no language-range
1114   in the field matches the tag, the language quality factor
1115   assigned is 0. If no Accept-Language header is present in the
1116   request, the server
1117   &SHOULD; assume that all languages are equally acceptable. If an
1118   Accept-Language header is present, then all languages which are
1119   assigned a quality factor greater than 0 are acceptable.
1122   It might be contrary to the privacy expectations of the user to send
1123   an Accept-Language header with the complete linguistic preferences of
1124   the user in every request. For a discussion of this issue, see
1125   <xref target=""/>.
1128   As intelligibility is highly dependent on the individual user, it is
1129   recommended that client applications make the choice of linguistic
1130   preference available to the user. If the choice is not made
1131   available, then the Accept-Language header field &MUST-NOT; be given in
1132   the request.
1133  <list><t>
1134      <x:h>Note:</x:h> When making the choice of linguistic preference available to
1135      the user, we remind implementors of  the fact that users are not
1136      familiar with the details of language matching as described above,
1137      and should provide appropriate guidance. As an example, users
1138      might assume that on selecting "en-gb", they will be served any
1139      kind of English document if British English is not available. A
1140      user agent might suggest in such a case to add "en" to get the
1141      best matching behavior.
1142  </t></list>
1146<section title="Content-Encoding" anchor="header.content-encoding">
1147  <iref primary="true" item="Content-Encoding header" x:for-anchor=""/>
1148  <iref primary="true" item="Headers" subitem="Content-Encoding" x:for-anchor=""/>
1150   The Content-Encoding entity-header field is used as a modifier to the
1151   media-type. When present, its value indicates what additional content
1152   codings have been applied to the entity-body, and thus what decoding
1153   mechanisms must be applied in order to obtain the media-type
1154   referenced by the Content-Type header field. Content-Encoding is
1155   primarily used to allow a document to be compressed without losing
1156   the identity of its underlying media type.
1158<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Content-Encoding"/>
1159    Content-Encoding  = "Content-Encoding" ":" 1#content-coding
1162   Content codings are defined in <xref target="content.codings"/>. An example of its use is
1164<figure><artwork type="example">
1165    Content-Encoding: gzip
1168   The content-coding is a characteristic of the entity identified by
1169   the Request-URI. Typically, the entity-body is stored with this
1170   encoding and is only decoded before rendering or analogous usage.
1171   However, a non-transparent proxy &MAY; modify the content-coding if the
1172   new coding is known to be acceptable to the recipient, unless the
1173   "no-transform" cache-control directive is present in the message.
1176   If the content-coding of an entity is not "identity", then the
1177   response &MUST; include a Content-Encoding entity-header (<xref target="header.content-encoding"/>)
1178   that lists the non-identity content-coding(s) used.
1181   If the content-coding of an entity in a request message is not
1182   acceptable to the origin server, the server &SHOULD; respond with a
1183   status code of 415 (Unsupported Media Type).
1186   If multiple encodings have been applied to an entity, the content
1187   codings &MUST; be listed in the order in which they were applied.
1188   Additional information about the encoding parameters &MAY; be provided
1189   by other entity-header fields not defined by this specification.
1193<section title="Content-Language" anchor="header.content-language">
1194  <iref primary="true" item="Content-Language header" x:for-anchor=""/>
1195  <iref primary="true" item="Headers" subitem="Content-Language" x:for-anchor=""/>
1197   The Content-Language entity-header field describes the natural
1198   language(s) of the intended audience for the enclosed entity. Note
1199   that this might not be equivalent to all the languages used within
1200   the entity-body.
1202<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Content-Language"/>
1203    Content-Language  = "Content-Language" ":" 1#language-tag
1206   Language tags are defined in <xref target="language.tags"/>. The primary purpose of
1207   Content-Language is to allow a user to identify and differentiate
1208   entities according to the user's own preferred language. Thus, if the
1209   body content is intended only for a Danish-literate audience, the
1210   appropriate field is
1212<figure><artwork type="example">
1213    Content-Language: da
1216   If no Content-Language is specified, the default is that the content
1217   is intended for all language audiences. This might mean that the
1218   sender does not consider it to be specific to any natural language,
1219   or that the sender does not know for which language it is intended.
1222   Multiple languages &MAY; be listed for content that is intended for
1223   multiple audiences. For example, a rendition of the "Treaty of
1224   Waitangi," presented simultaneously in the original Maori and English
1225   versions, would call for
1227<figure><artwork type="example">
1228    Content-Language: mi, en
1231   However, just because multiple languages are present within an entity
1232   does not mean that it is intended for multiple linguistic audiences.
1233   An example would be a beginner's language primer, such as "A First
1234   Lesson in Latin," which is clearly intended to be used by an
1235   English-literate audience. In this case, the Content-Language would
1236   properly only include "en".
1239   Content-Language &MAY; be applied to any media type -- it is not
1240   limited to textual documents.
1244<section title="Content-Location" anchor="header.content-location">
1245  <iref primary="true" item="Content-Location header" x:for-anchor=""/>
1246  <iref primary="true" item="Headers" subitem="Content-Location" x:for-anchor=""/>
1248   The Content-Location entity-header field &MAY; be used to supply the
1249   resource location for the entity enclosed in the message when that
1250   entity is accessible from a location separate from the requested
1251   resource's URI. A server &SHOULD; provide a Content-Location for the
1252   variant corresponding to the response entity; especially in the case
1253   where a resource has multiple entities associated with it, and those
1254   entities actually have separate locations by which they might be
1255   individually accessed, the server &SHOULD; provide a Content-Location
1256   for the particular variant which is returned.
1258<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Content-Location"/>
1259    Content-Location = "Content-Location" ":"
1260                      ( absoluteURI | relativeURI )
1263   The value of Content-Location also defines the base URI for the
1264   entity.
1267   The Content-Location value is not a replacement for the original
1268   requested URI; it is only a statement of the location of the resource
1269   corresponding to this particular entity at the time of the request.
1270   Future requests &MAY; specify the Content-Location URI as the request-URI
1271   if the desire is to identify the source of that particular
1272   entity.
1275   A cache cannot assume that an entity with a Content-Location
1276   different from the URI used to retrieve it can be used to respond to
1277   later requests on that Content-Location URI. However, the Content-Location
1278   can be used to differentiate between multiple entities
1279   retrieved from a single requested resource, as described in &caching;.
1282   If the Content-Location is a relative URI, the relative URI is
1283   interpreted relative to the Request-URI.
1286   The meaning of the Content-Location header in PUT or POST requests is
1287   undefined; servers are free to ignore it in those cases.
1291<section title="Content-MD5" anchor="header.content-md5">
1292  <iref primary="true" item="Content-MD5 header" x:for-anchor=""/>
1293  <iref primary="true" item="Headers" subitem="Content-MD5" x:for-anchor=""/>
1295   The Content-MD5 entity-header field, as defined in <xref target="RFC1864"/>, is
1296   an MD5 digest of the entity-body for the purpose of providing an
1297   end-to-end message integrity check (MIC) of the entity-body. (Note: a
1298   MIC is good for detecting accidental modification of the entity-body
1299   in transit, but is not proof against malicious attacks.)
1301<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Content-MD5"/><iref primary="true" item="Grammar" subitem="md5-digest"/>
1302     Content-MD5   = "Content-MD5" ":" md5-digest
1303     md5-digest   = &lt;base64 of 128 bit MD5 digest as per RFC 1864&gt;
1306   The Content-MD5 header field &MAY; be generated by an origin server or
1307   client to function as an integrity check of the entity-body. Only
1308   origin servers or clients &MAY; generate the Content-MD5 header field;
1309   proxies and gateways &MUST-NOT; generate it, as this would defeat its
1310   value as an end-to-end integrity check. Any recipient of the entity-body,
1311   including gateways and proxies, &MAY; check that the digest value
1312   in this header field matches that of the entity-body as received.
1315   The MD5 digest is computed based on the content of the entity-body,
1316   including any content-coding that has been applied, but not including
1317   any transfer-encoding applied to the message-body. If the message is
1318   received with a transfer-encoding, that encoding &MUST; be removed
1319   prior to checking the Content-MD5 value against the received entity.
1322   This has the result that the digest is computed on the octets of the
1323   entity-body exactly as, and in the order that, they would be sent if
1324   no transfer-encoding were being applied.
1327   HTTP extends RFC 1864 to permit the digest to be computed for MIME
1328   composite media-types (e.g., multipart/* and message/rfc822), but
1329   this does not change how the digest is computed as defined in the
1330   preceding paragraph.
1333   There are several consequences of this. The entity-body for composite
1334   types &MAY; contain many body-parts, each with its own MIME and HTTP
1335   headers (including Content-MD5, Content-Transfer-Encoding, and
1336   Content-Encoding headers). If a body-part has a Content-Transfer-Encoding
1337   or Content-Encoding header, it is assumed that the content
1338   of the body-part has had the encoding applied, and the body-part is
1339   included in the Content-MD5 digest as is -- i.e., after the
1340   application. The Transfer-Encoding header field is not allowed within
1341   body-parts.
1344   Conversion of all line breaks to CRLF &MUST-NOT; be done before
1345   computing or checking the digest: the line break convention used in
1346   the text actually transmitted &MUST; be left unaltered when computing
1347   the digest.
1348  <list><t>
1349      <x:h>Note:</x:h> while the definition of Content-MD5 is exactly the same for
1350      HTTP as in RFC 1864 for MIME entity-bodies, there are several ways
1351      in which the application of Content-MD5 to HTTP entity-bodies
1352      differs from its application to MIME entity-bodies. One is that
1353      HTTP, unlike MIME, does not use Content-Transfer-Encoding, and
1354      does use Transfer-Encoding and Content-Encoding. Another is that
1355      HTTP more frequently uses binary content types than MIME, so it is
1356      worth noting that, in such cases, the byte order used to compute
1357      the digest is the transmission byte order defined for the type.
1358      Lastly, HTTP allows transmission of text types with any of several
1359      line break conventions and not just the canonical form using CRLF.
1360  </t></list>
1364<section title="Content-Type" anchor="header.content-type">
1365  <iref primary="true" item="Content-Type header" x:for-anchor=""/>
1366  <iref primary="true" item="Headers" subitem="Content-Type" x:for-anchor=""/>
1368   The Content-Type entity-header field indicates the media type of the
1369   entity-body sent to the recipient or, in the case of the HEAD method,
1370   the media type that would have been sent had the request been a GET.
1372<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Content-Type"/>
1373    Content-Type   = "Content-Type" ":" media-type
1376   Media types are defined in <xref target="media.types"/>. An example of the field is
1378<figure><artwork type="example">
1379    Content-Type: text/html; charset=ISO-8859-4
1382   Further discussion of methods for identifying the media type of an
1383   entity is provided in <xref target="type"/>.
1389<section title="IANA Considerations" anchor="IANA.considerations">
1391   TBD.
1395<section title="Security Considerations" anchor="security.considerations">
1397   This section is meant to inform application developers, information
1398   providers, and users of the security limitations in HTTP/1.1 as
1399   described by this document. The discussion does not include
1400   definitive solutions to the problems revealed, though it does make
1401   some suggestions for reducing security risks.
1404<section title="Privacy Issues Connected to Accept Headers" anchor="">
1406   Accept request-headers can reveal information about the user to all
1407   servers which are accessed. The Accept-Language header in particular
1408   can reveal information the user would consider to be of a private
1409   nature, because the understanding of particular languages is often
1410   strongly correlated to the membership of a particular ethnic group.
1411   User agents which offer the option to configure the contents of an
1412   Accept-Language header to be sent in every request are strongly
1413   encouraged to let the configuration process include a message which
1414   makes the user aware of the loss of privacy involved.
1417   An approach that limits the loss of privacy would be for a user agent
1418   to omit the sending of Accept-Language headers by default, and to ask
1419   the user whether or not to start sending Accept-Language headers to a
1420   server if it detects, by looking for any Vary response-header fields
1421   generated by the server, that such sending could improve the quality
1422   of service.
1425   Elaborate user-customized accept header fields sent in every request,
1426   in particular if these include quality values, can be used by servers
1427   as relatively reliable and long-lived user identifiers. Such user
1428   identifiers would allow content providers to do click-trail tracking,
1429   and would allow collaborating content providers to match cross-server
1430   click-trails or form submissions of individual users. Note that for
1431   many users not behind a proxy, the network address of the host
1432   running the user agent will also serve as a long-lived user
1433   identifier. In environments where proxies are used to enhance
1434   privacy, user agents ought to be conservative in offering accept
1435   header configuration options to end users. As an extreme privacy
1436   measure, proxies could filter the accept headers in relayed requests.
1437   General purpose user agents which provide a high degree of header
1438   configurability &SHOULD; warn users about the loss of privacy which can
1439   be involved.
1443<section title="Content-Disposition Issues" anchor="content-disposition.issues">
1445   <xref target="RFC1806"/>, from which the often implemented Content-Disposition
1446   (see <xref target="content-disposition"/>) header in HTTP is derived, has a number of very
1447   serious security considerations. Content-Disposition is not part of
1448   the HTTP standard, but since it is widely implemented, we are
1449   documenting its use and risks for implementors. See <xref target="RFC2183"/>
1450   (which updates <xref target="RFC1806"/>) for details.
1456<section title="Acknowledgments" anchor="ack">
1462<reference anchor="Part1">
1463   <front>
1464      <title abbrev="HTTP/1.1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title>
1465      <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1466         <organization abbrev="Day Software">Day Software</organization>
1467         <address><email></email></address>
1468      </author>
1469      <author initials="J." surname="Gettys" fullname="Jim Gettys">
1470         <organization>One Laptop per Child</organization>
1471         <address><email></email></address>
1472      </author>
1473      <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
1474         <organization abbrev="HP">Hewlett-Packard Company</organization>
1475         <address><email></email></address>
1476      </author>
1477      <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
1478         <organization abbrev="Microsoft">Microsoft Corporation</organization>
1479         <address><email></email></address>
1480      </author>
1481      <author initials="L." surname="Masinter" fullname="Larry Masinter">
1482         <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1483         <address><email></email></address>
1484      </author>
1485      <author initials="P." surname="Leach" fullname="Paul J. Leach">
1486         <organization abbrev="Microsoft">Microsoft Corporation</organization>
1487         <address><email></email></address>
1488      </author>
1489      <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
1490         <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1491         <address><email></email></address>
1492      </author>
1493      <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
1494         <organization abbrev="W3C">World Wide Web Consortium</organization>
1495         <address><email></email></address>
1496      </author>
1497      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1498         <organization abbrev="greenbytes">greenbytes GmbH</organization>
1499         <address><email></email></address>
1500      </author>
1501      <date month="&ID-MONTH;" year="&ID-YEAR;"/>
1502   </front>
1503   <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;"/>
1504   <x:source href="p1-messaging.xml" basename="p1-messaging"/>
1507<reference anchor="Part2">
1508   <front>
1509      <title abbrev="HTTP/1.1">HTTP/1.1, part 2: Message Semantics</title>
1510      <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1511         <organization abbrev="Day Software">Day Software</organization>
1512         <address><email></email></address>
1513      </author>
1514      <author initials="J." surname="Gettys" fullname="Jim Gettys">
1515         <organization>One Laptop per Child</organization>
1516         <address><email></email></address>
1517      </author>
1518      <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
1519         <organization abbrev="HP">Hewlett-Packard Company</organization>
1520         <address><email></email></address>
1521      </author>
1522      <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
1523         <organization abbrev="Microsoft">Microsoft Corporation</organization>
1524         <address><email></email></address>
1525      </author>
1526      <author initials="L." surname="Masinter" fullname="Larry Masinter">
1527         <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1528         <address><email></email></address>
1529      </author>
1530      <author initials="P." surname="Leach" fullname="Paul J. Leach">
1531         <organization abbrev="Microsoft">Microsoft Corporation</organization>
1532         <address><email></email></address>
1533      </author>
1534      <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
1535         <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1536         <address><email></email></address>
1537      </author>
1538      <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
1539         <organization abbrev="W3C">World Wide Web Consortium</organization>
1540         <address><email></email></address>
1541      </author>
1542      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1543         <organization abbrev="greenbytes">greenbytes GmbH</organization>
1544         <address><email></email></address>
1545      </author>
1546      <date month="&ID-MONTH;" year="&ID-YEAR;"/>
1547   </front>
1548   <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-&ID-VERSION;"/>
1549   <x:source href="p2-semantics.xml" basename="p2-semantics"/>
1552<reference anchor="Part4">
1553   <front>
1554      <title abbrev="HTTP/1.1">HTTP/1.1, part 4: Conditional Requests</title>
1555      <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1556         <organization abbrev="Day Software">Day Software</organization>
1557         <address><email></email></address>
1558      </author>
1559      <author initials="J." surname="Gettys" fullname="Jim Gettys">
1560         <organization>One Laptop per Child</organization>
1561         <address><email></email></address>
1562      </author>
1563      <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
1564         <organization abbrev="HP">Hewlett-Packard Company</organization>
1565         <address><email></email></address>
1566      </author>
1567      <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
1568         <organization abbrev="Microsoft">Microsoft Corporation</organization>
1569         <address><email></email></address>
1570      </author>
1571      <author initials="L." surname="Masinter" fullname="Larry Masinter">
1572         <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1573         <address><email></email></address>
1574      </author>
1575      <author initials="P." surname="Leach" fullname="Paul J. Leach">
1576         <organization abbrev="Microsoft">Microsoft Corporation</organization>
1577         <address><email></email></address>
1578      </author>
1579      <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
1580         <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1581         <address><email></email></address>
1582      </author>
1583      <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
1584         <organization abbrev="W3C">World Wide Web Consortium</organization>
1585         <address><email></email></address>
1586      </author>
1587      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1588         <organization abbrev="greenbytes">greenbytes GmbH</organization>
1589         <address><email></email></address>
1590      </author>
1591      <date month="&ID-MONTH;" year="&ID-YEAR;"/>
1592   </front>
1593   <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p4-conditional-&ID-VERSION;"/>
1594   <x:source href="p4-conditional.xml" basename="p4-conditional"/>
1597<reference anchor="Part5">
1598   <front>
1599      <title abbrev="HTTP/1.1">HTTP/1.1, part 5: Range Requests and Partial Responses</title>
1600      <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1601         <organization abbrev="Day Software">Day Software</organization>
1602         <address><email></email></address>
1603      </author>
1604      <author initials="J." surname="Gettys" fullname="Jim Gettys">
1605         <organization>One Laptop per Child</organization>
1606         <address><email></email></address>
1607      </author>
1608      <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
1609         <organization abbrev="HP">Hewlett-Packard Company</organization>
1610         <address><email></email></address>
1611      </author>
1612      <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
1613         <organization abbrev="Microsoft">Microsoft Corporation</organization>
1614         <address><email></email></address>
1615      </author>
1616      <author initials="L." surname="Masinter" fullname="Larry Masinter">
1617         <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1618         <address><email></email></address>
1619      </author>
1620      <author initials="P." surname="Leach" fullname="Paul J. Leach">
1621         <organization abbrev="Microsoft">Microsoft Corporation</organization>
1622         <address><email></email></address>
1623      </author>
1624      <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
1625         <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1626         <address><email></email></address>
1627      </author>
1628      <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
1629         <organization abbrev="W3C">World Wide Web Consortium</organization>
1630         <address><email></email></address>
1631      </author>
1632      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1633         <organization abbrev="greenbytes">greenbytes GmbH</organization>
1634         <address><email></email></address>
1635      </author>
1636      <date month="&ID-MONTH;" year="&ID-YEAR;"/>
1637   </front>
1638   <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-&ID-VERSION;"/>
1639   <x:source href="p5-range.xml" basename="p5-range"/>
1642<reference anchor="Part6">
1643   <front>
1644      <title abbrev="HTTP/1.1">HTTP/1.1, part 6: Caching</title>
1645      <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1646         <organization abbrev="Day Software">Day Software</organization>
1647         <address><email></email></address>
1648      </author>
1649      <author initials="J." surname="Gettys" fullname="Jim Gettys">
1650         <organization>One Laptop per Child</organization>
1651         <address><email></email></address>
1652      </author>
1653      <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
1654         <organization abbrev="HP">Hewlett-Packard Company</organization>
1655         <address><email></email></address>
1656      </author>
1657      <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
1658         <organization abbrev="Microsoft">Microsoft Corporation</organization>
1659         <address><email></email></address>
1660      </author>
1661      <author initials="L." surname="Masinter" fullname="Larry Masinter">
1662         <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1663         <address><email></email></address>
1664      </author>
1665      <author initials="P." surname="Leach" fullname="Paul J. Leach">
1666         <organization abbrev="Microsoft">Microsoft Corporation</organization>
1667         <address><email></email></address>
1668      </author>
1669      <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
1670         <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1671         <address><email></email></address>
1672      </author>
1673      <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
1674         <organization abbrev="W3C">World Wide Web Consortium</organization>
1675         <address><email></email></address>
1676      </author>
1677      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1678         <organization abbrev="greenbytes">greenbytes GmbH</organization>
1679         <address><email></email></address>
1680      </author>
1681      <date month="&ID-MONTH;" year="&ID-YEAR;"/>
1682   </front>
1683   <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-&ID-VERSION;"/>
1684   <x:source href="p6-cache.xml" basename="p6-cache"/>
1687<reference anchor="RFC2616">
1688   <front>
1689      <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
1690      <author initials="R." surname="Fielding" fullname="R. Fielding">
1691         <organization>University of California, Irvine</organization>
1692         <address><email></email></address>
1693      </author>
1694      <author initials="J." surname="Gettys" fullname="J. Gettys">
1695         <organization>W3C</organization>
1696         <address><email></email></address>
1697      </author>
1698      <author initials="J." surname="Mogul" fullname="J. Mogul">
1699         <organization>Compaq Computer Corporation</organization>
1700         <address><email></email></address>
1701      </author>
1702      <author initials="H." surname="Frystyk" fullname="H. Frystyk">
1703         <organization>MIT Laboratory for Computer Science</organization>
1704         <address><email></email></address>
1705      </author>
1706      <author initials="L." surname="Masinter" fullname="L. Masinter">
1707         <organization>Xerox Corporation</organization>
1708         <address><email></email></address>
1709      </author>
1710      <author initials="P." surname="Leach" fullname="P. Leach">
1711         <organization>Microsoft Corporation</organization>
1712         <address><email></email></address>
1713      </author>
1714      <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
1715         <organization>W3C</organization>
1716         <address><email></email></address>
1717      </author>
1718      <date month="June" year="1999"/>
1719   </front>
1720   <seriesInfo name="RFC" value="2616"/>
1723<reference anchor="RFC1766">
1724  <front>
1725    <title abbrev="Language Tag">Tags for the Identification of Languages</title>
1726    <author initials="H." surname="Alvestrand" fullname="Harald Tveit Alvestrand">
1727      <organization>UNINETT</organization>
1728      <address><email></email></address>
1729    </author>
1730    <date month="March" year="1995"/>
1731  </front>
1732  <seriesInfo name="RFC" value="1766"/>
1735<reference anchor="RFC2045">
1736  <front>
1737    <title abbrev="Internet Message Bodies">Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</title>
1738    <author initials="N." surname="Freed" fullname="Ned Freed">
1739      <organization>Innosoft International, Inc.</organization>
1740      <address><email></email></address>
1741    </author>
1742    <author initials="N.S." surname="Borenstein" fullname="Nathaniel S. Borenstein">
1743      <organization>First Virtual Holdings</organization>
1744      <address><email></email></address>
1745    </author>
1746    <date month="November" year="1996"/>
1747  </front>
1748  <seriesInfo name="RFC" value="2045"/>
1751<reference anchor="RFC822">
1752  <front>
1753    <title abbrev="Standard for ARPA Internet Text Messages">Standard for the format of ARPA Internet text messages</title>
1754    <author initials="D.H." surname="Crocker" fullname="David H. Crocker">
1755      <organization>University of Delaware, Dept. of Electrical Engineering</organization>
1756      <address><email>DCrocker@UDel-Relay</email></address>
1757    </author>
1758    <date month="August" day="13" year="1982"/>
1759  </front>
1760  <seriesInfo name="STD" value="11"/>
1761  <seriesInfo name="RFC" value="822"/>
1764<reference anchor="RFC1867">
1765  <front>
1766    <title>Form-based File Upload in HTML</title>
1767    <author initials="L." surname="Masinter" fullname="Larry Masinter">
1768      <organization>Xerox Palo Alto Research Center</organization>
1769      <address><email></email></address>
1770    </author>
1771    <author initials="E." surname="Nebel" fullname="Ernesto Nebel">
1772      <organization>XSoft, Xerox Corporation</organization>
1773      <address><email></email></address>
1774    </author>
1775    <date month="November" year="1995"/>
1776  </front>
1777  <seriesInfo name="RFC" value="1867"/>
1780<reference anchor="RFC4288">
1781  <front>
1782    <title>Media Type Specifications and Registration Procedures</title>
1783    <author initials="N." surname="Freed" fullname="N. Freed">
1784      <organization>Sun Microsystems</organization>
1785      <address>
1786        <email></email>
1787      </address>
1788    </author>
1789    <author initials="J." surname="Klensin" fullname="J. Klensin">
1790      <organization/>
1791      <address>
1792        <email></email>
1793      </address>
1794    </author>
1795    <date year="2005" month="December"/>
1796  </front>
1797  <seriesInfo name="BCP" value="13"/>
1798  <seriesInfo name="RFC" value="4288"/>
1801<reference anchor="RFC1864">
1802  <front>
1803    <title abbrev="Content-MD5 Header Field">The Content-MD5 Header Field</title>
1804    <author initials="J." surname="Myers" fullname="John G. Myers">
1805      <organization>Carnegie Mellon University</organization>
1806      <address><email></email></address>
1807    </author>
1808    <author initials="M." surname="Rose" fullname="Marshall T. Rose">
1809      <organization>Dover Beach Consulting, Inc.</organization>
1810      <address><email></email></address>
1811    </author>
1812    <date month="October" year="1995"/>
1813  </front>
1814  <seriesInfo name="RFC" value="1864"/>
1817<reference anchor="RFC1952">
1818  <front>
1819    <title>GZIP file format specification version 4.3</title>
1820    <author initials="P." surname="Deutsch" fullname="L. Peter Deutsch">
1821      <organization>Aladdin Enterprises</organization>
1822      <address><email></email></address>
1823    </author>
1824    <author initials="J-L." surname="Gailly" fullname="Jean-Loup Gailly">
1825      <organization/>
1826      <address><email></email></address></author>
1827    <author initials="M." surname="Adler" fullname="Mark Adler">
1828      <organization/>
1829      <address><email></email></address></author>
1830    <author initials="L.P." surname="Deutsch" fullname="L. Peter Deutsch">
1831      <organization/>
1832      <address><email></email></address>
1833    </author>
1834    <author initials="G." surname="Randers-Pehrson" fullname="Glenn Randers-Pehrson">
1835      <organization/>
1836      <address><email></email></address>
1837    </author>
1838    <date month="May" year="1996"/>
1839  </front>
1840  <seriesInfo name="RFC" value="1952"/>
1843<reference anchor="RFC1951">
1844  <front>
1845    <title>DEFLATE Compressed Data Format Specification version 1.3</title>
1846    <author initials="P." surname="Deutsch" fullname="L. Peter Deutsch">
1847      <organization>Aladdin Enterprises</organization>
1848      <address><email></email></address>
1849    </author>
1850    <date month="May" year="1996"/>
1851  </front>
1852  <seriesInfo name="RFC" value="1951"/>
1855<reference anchor="RFC1950">
1856  <front>
1857    <title>ZLIB Compressed Data Format Specification version 3.3</title>
1858    <author initials="L.P." surname="Deutsch" fullname="L. Peter Deutsch">
1859      <organization>Aladdin Enterprises</organization>
1860      <address><email></email></address>
1861    </author>
1862    <author initials="J-L." surname="Gailly" fullname="Jean-Loup Gailly">
1863      <organization/>
1864    </author>
1865    <date month="May" year="1996"/>
1866  </front>
1867  <seriesInfo name="RFC" value="1950"/>
1870<reference anchor="RFC2068">
1871  <front>
1872    <title abbrev="HTTP/1.1">Hypertext Transfer Protocol -- HTTP/1.1</title>
1873    <author initials="R." surname="Fielding" fullname="Roy T. Fielding">
1874      <organization>University of California, Irvine, Department of Information and Computer Science</organization>
1875      <address><email></email></address>
1876    </author>
1877    <author initials="J." surname="Gettys" fullname="Jim Gettys">
1878      <organization>MIT Laboratory for Computer Science</organization>
1879      <address><email></email></address>
1880    </author>
1881    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
1882      <organization>Digital Equipment Corporation, Western Research Laboratory</organization>
1883      <address><email></email></address>
1884    </author>
1885    <author initials="H." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
1886      <organization>MIT Laboratory for Computer Science</organization>
1887      <address><email></email></address>
1888    </author>
1889    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
1890      <organization>MIT Laboratory for Computer Science</organization>
1891      <address><email></email></address>
1892    </author>
1893    <date month="January" year="1997"/>
1894  </front>
1895  <seriesInfo name="RFC" value="2068"/>
1898<reference anchor="RFC1806">
1899  <front>
1900    <title abbrev="Content-Disposition">Communicating Presentation Information in Internet Messages: The Content-Disposition Header</title>
1901    <author initials="R." surname="Troost" fullname="Rens Troost">
1902      <organization>New Century Systems</organization>
1903      <address><email></email></address>
1904    </author>
1905    <author initials="S." surname="Dorner" fullname="Steve Dorner">
1906      <organization>QUALCOMM Incorporated</organization>
1907      <address><email></email></address>
1908    </author>
1909    <date month="June" year="1995"/>
1910  </front>
1911  <seriesInfo name="RFC" value="1806"/>
1914<reference anchor="RFC1945">
1915  <front>
1916    <title abbrev="HTTP/1.0">Hypertext Transfer Protocol -- HTTP/1.0</title>
1917    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
1918      <organization>MIT, Laboratory for Computer Science</organization>
1919      <address><email></email></address>
1920    </author>
1921    <author initials="R.T." surname="Fielding" fullname="Roy T. Fielding">
1922      <organization>University of California, Irvine, Department of Information and Computer Science</organization>
1923      <address><email></email></address>
1924    </author>
1925    <author initials="H.F." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
1926      <organization>W3 Consortium, MIT Laboratory for Computer Science</organization>
1927      <address><email></email></address>
1928    </author>
1929    <date month="May" year="1996"/>
1930  </front>
1931  <seriesInfo name="RFC" value="1945"/>
1934<reference anchor="RFC2076">
1935  <front>
1936    <title abbrev="Internet Message Headers">Common Internet Message Headers</title>
1937    <author initials="J." surname="Palme" fullname="Jacob Palme">
1938      <organization>Stockholm University/KTH</organization>
1939      <address><email></email></address>
1940    </author>
1941    <date month="February" year="1997"/>
1942  </front>
1943  <seriesInfo name="RFC" value="2076"/>
1946<reference anchor="RFC2119">
1947  <front>
1948    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
1949    <author initials="S." surname="Bradner" fullname="Scott Bradner">
1950      <organization>Harvard University</organization>
1951      <address><email></email></address>
1952    </author>
1953    <date month="March" year="1997"/>
1954  </front>
1955  <seriesInfo name="BCP" value="14"/>
1956  <seriesInfo name="RFC" value="2119"/>
1959<reference anchor="RFC2279">
1961<title abbrev="UTF-8">UTF-8, a transformation format of ISO 10646</title>
1962<author initials="F." surname="Yergeau" fullname="Francois Yergeau">
1963<organization>Alis Technologies</organization>
1966<street>100, boul. Alexis-Nihon</street>
1967<street>Suite 600</street>
1970<code>H4M 2P2</code>
1972<phone>+1 514 747 2547</phone>
1973<facsimile>+1 514 747 2561</facsimile>
1975<date month="January" year="1998"/>
1977<t>ISO/IEC 10646-1 defines a multi-octet character set called the Universal Character Set (UCS) which encompasses most of the world's writing systems. Multi-octet characters, however, are not compatible with many current applications and protocols, and this has led to the development of a few so-called UCS transformation formats (UTF), each with different characteristics.  UTF-8, the object of this memo, has the characteristic of preserving the full US-ASCII range, providing compatibility with file systems, parsers and other software that rely on US-ASCII values but are transparent to other values. This memo updates and replaces RFC 2044, in particular addressing the question of versions of the relevant standards.</t></abstract></front>
1978<seriesInfo name="RFC" value="2279"/>
1981<reference anchor="RFC2046">
1982  <front>
1983    <title abbrev="Media Types">Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types</title>
1984    <author initials="N." surname="Freed" fullname="Ned Freed">
1985      <organization>Innosoft International, Inc.</organization>
1986      <address><email></email></address>
1987    </author>
1988    <author initials="N." surname="Borenstein" fullname="Nathaniel S. Borenstein">
1989      <organization>First Virtual Holdings</organization>
1990      <address><email></email></address>
1991    </author>
1992    <date month="November" year="1996"/>
1993  </front>
1994  <seriesInfo name="RFC" value="2046"/>
1997<reference anchor="RFC2277">
1999<title abbrev="Charset Policy">IETF Policy on Character Sets and Languages</title>
2000<author initials="H.T." surname="Alvestrand" fullname="Harald Tveit Alvestrand">
2004<street>P.O.Box 6883 Elgeseter</street>
2005<street>N-7002 TRONDHEIM</street>
2007<phone>+47 73 59 70 94</phone>
2009<date month="January" year="1998"/>
2011<keyword>Internet Engineering Task Force</keyword>
2012<keyword>character encoding</keyword></front>
2013<seriesInfo name="BCP" value="18"/>
2014<seriesInfo name="RFC" value="2277"/>
2017<reference anchor="RFC2110">
2019<title abbrev="MHTML">MIME E-mail Encapsulation of Aggregate Documents, such as HTML (MHTML)</title>
2020<author initials="J." surname="Palme" fullname="Jacob Palme">
2021<organization>Stockholm University and KTH</organization>
2024<street>Electrum 230</street>
2025<street>S-164 40 Kista</street>
2027<phone>+46-8-16 16 67</phone>
2028<facsimile>+46-8-783 08 29</facsimile>
2030<author initials="A." surname="Hopmann" fullname="Alex Hopmann">
2031<organization>Microsoft Corporation</organization>
2034<street>3590 North First Street</street>
2035<street>Suite 300</street>
2036<street>San Jose</street>
2037<street>CA 95134</street>
2038<street>Working group chairman:</street></postal>
2040<date month="March" year="1997"/>
2043<keyword>hypertext markup language</keyword>
2045<keyword>multipurpose internet mail extensions</keyword>
2047<seriesInfo name="RFC" value="2110"/>
2050<reference anchor="RFC2049">
2051  <front>
2052    <title abbrev="MIME Conformance">Multipurpose Internet Mail Extensions (MIME) Part Five: Conformance Criteria and Examples</title>
2053    <author initials="N." surname="Freed" fullname="Ned Freed">
2054      <organization>Innosoft International, Inc.</organization>
2055      <address><email></email></address>
2056    </author>
2057    <author initials="N.S." surname="Borenstein" fullname="Nathaniel S. Borenstein">
2058      <organization>First Virtual Holdings</organization>
2059      <address><email></email></address>
2060    </author>
2061    <date month="November" year="1996"/>
2062  </front>
2063  <seriesInfo name="RFC" value="2049"/>
2066<reference anchor="RFC2183">
2067  <front>
2068    <title abbrev="Content-Disposition">Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field</title>
2069    <author initials="R." surname="Troost" fullname="Rens Troost">
2070      <organization>New Century Systems</organization>
2071      <address><email></email></address>
2072    </author>
2073    <author initials="S." surname="Dorner" fullname="Steve Dorner">
2074      <organization>QUALCOMM Incorporated</organization>
2075      <address><email></email></address>
2076    </author>
2077    <author initials="K." surname="Moore" fullname="Keith Moore">
2078      <organization>Department of Computer Science</organization>
2079      <address><email></email></address>
2080    </author>
2081    <date month="August" year="1997"/>
2082  </front>
2083  <seriesInfo name="RFC" value="2183"/>
2088<section title="Differences Between HTTP Entities and RFC 2045 Entities" anchor="differences.between.http.entities.and.rfc.2045.entities">
2090   HTTP/1.1 uses many of the constructs defined for Internet Mail (<xref target="RFC822"/>) and the Multipurpose Internet Mail Extensions (MIME <xref target="RFC2045"/>) to
2091   allow entities to be transmitted in an open variety of
2092   representations and with extensible mechanisms. However, RFC 2045
2093   discusses mail, and HTTP has a few features that are different from
2094   those described in RFC 2045. These differences were carefully chosen
2095   to optimize performance over binary connections, to allow greater
2096   freedom in the use of new media types, to make date comparisons
2097   easier, and to acknowledge the practice of some early HTTP servers
2098   and clients.
2101   This appendix describes specific areas where HTTP differs from RFC
2102   2045. Proxies and gateways to strict MIME environments &SHOULD; be
2103   aware of these differences and provide the appropriate conversions
2104   where necessary. Proxies and gateways from MIME environments to HTTP
2105   also need to be aware of the differences because some conversions
2106   might be required.
2108<section title="MIME-Version" anchor="mime-version">
2110   HTTP is not a MIME-compliant protocol. However, HTTP/1.1 messages &MAY;
2111   include a single MIME-Version general-header field to indicate what
2112   version of the MIME protocol was used to construct the message. Use
2113   of the MIME-Version header field indicates that the message is in
2114   full compliance with the MIME protocol (as defined in RFC 2045<xref target="RFC2045"/>).
2115   Proxies/gateways are responsible for ensuring full compliance (where
2116   possible) when exporting HTTP messages to strict MIME environments.
2118<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="MIME-Version"/>
2119    MIME-Version   = "MIME-Version" ":" 1*DIGIT "." 1*DIGIT
2122   MIME version "1.0" is the default for use in HTTP/1.1. However,
2123   HTTP/1.1 message parsing and semantics are defined by this document
2124   and not the MIME specification.
2128<section title="Conversion to Canonical Form" anchor="">
2130   <xref target="RFC2045"/> requires that an Internet mail entity be converted to
2131   canonical form prior to being transferred, as described in section <xref target="RFC2049" x:fmt="of" x:sec="4"/>.
2132   <xref target="canonicalization.and.text.defaults"/> of this document describes the forms
2133   allowed for subtypes of the "text" media type when transmitted over
2134   HTTP. <xref target="RFC2046"/> requires that content with a type of "text" represent
2135   line breaks as CRLF and forbids the use of CR or LF outside of line
2136   break sequences. HTTP allows CRLF, bare CR, and bare LF to indicate a
2137   line break within text content when a message is transmitted over
2138   HTTP.
2141   Where it is possible, a proxy or gateway from HTTP to a strict MIME
2142   environment &SHOULD; translate all line breaks within the text media
2143   types described in <xref target="canonicalization.and.text.defaults"/> of this document to the RFC 2049
2144   canonical form of CRLF. Note, however, that this might be complicated
2145   by the presence of a Content-Encoding and by the fact that HTTP
2146   allows the use of some character sets which do not use octets 13 and
2147   10 to represent CR and LF, as is the case for some multi-byte
2148   character sets.
2151   Implementors should note that conversion will break any cryptographic
2152   checksums applied to the original content unless the original content
2153   is already in canonical form. Therefore, the canonical form is
2154   recommended for any content that uses such checksums in HTTP.
2158<section title="Introduction of Content-Encoding" anchor="introduction.of.content-encoding">
2160   RFC 2045 does not include any concept equivalent to HTTP/1.1's
2161   Content-Encoding header field. Since this acts as a modifier on the
2162   media type, proxies and gateways from HTTP to MIME-compliant
2163   protocols &MUST; either change the value of the Content-Type header
2164   field or decode the entity-body before forwarding the message. (Some
2165   experimental applications of Content-Type for Internet mail have used
2166   a media-type parameter of ";conversions=&lt;content-coding&gt;" to perform
2167   a function equivalent to Content-Encoding. However, this parameter is
2168   not part of RFC 2045).
2172<section title="No Content-Transfer-Encoding" anchor="no.content-transfer-encoding">
2174   HTTP does not use the Content-Transfer-Encoding field of RFC
2175   2045. Proxies and gateways from MIME-compliant protocols to HTTP &MUST;
2176   remove any Content-Transfer-Encoding
2177   prior to delivering the response message to an HTTP client.
2180   Proxies and gateways from HTTP to MIME-compliant protocols are
2181   responsible for ensuring that the message is in the correct format
2182   and encoding for safe transport on that protocol, where "safe
2183   transport" is defined by the limitations of the protocol being used.
2184   Such a proxy or gateway &SHOULD; label the data with an appropriate
2185   Content-Transfer-Encoding if doing so will improve the likelihood of
2186   safe transport over the destination protocol.
2190<section title="Introduction of Transfer-Encoding" anchor="introduction.of.transfer-encoding">
2192   HTTP/1.1 introduces the Transfer-Encoding header field (&header-transfer-encoding;).
2193   Proxies/gateways &MUST; remove any transfer-coding prior to
2194   forwarding a message via a MIME-compliant protocol.
2198<section title="MHTML and Line Length Limitations" anchor="mhtml.line.length">
2200   HTTP implementations which share code with MHTML <xref target="RFC2110"/> implementations
2201   need to be aware of MIME line length limitations. Since HTTP does not
2202   have this limitation, HTTP does not fold long lines. MHTML messages
2203   being transported by HTTP follow all conventions of MHTML, including
2204   line length limitations and folding, canonicalization, etc., since
2205   HTTP transports all message-bodies as payload (see <xref target="multipart.types"/>) and
2206   does not interpret the content or any MIME header lines that might be
2207   contained therein.
2212<section title="Additional Features" anchor="additional.features">
2214   <xref target="RFC1945"/> and <xref target="RFC2068"/> document protocol elements used by some
2215   existing HTTP implementations, but not consistently and correctly
2216   across most HTTP/1.1 applications. Implementors are advised to be
2217   aware of these features, but cannot rely upon their presence in, or
2218   interoperability with, other HTTP/1.1 applications. Some of these
2219   describe proposed experimental features, and some describe features
2220   that experimental deployment found lacking that are now addressed in
2221   the base HTTP/1.1 specification.
2224   A number of other headers, such as Content-Disposition and Title,
2225   from SMTP and MIME are also often implemented (see <xref target="RFC2076"/>).
2228<section title="Content-Disposition" anchor="content-disposition">
2229<iref item="Headers" subitem="Content-Disposition" primary="true" x:for-anchor=""/>
2230<iref item="Content-Disposition header" primary="true" x:for-anchor=""/>
2232   The Content-Disposition response-header field has been proposed as a
2233   means for the origin server to suggest a default filename if the user
2234   requests that the content is saved to a file. This usage is derived
2235   from the definition of Content-Disposition in <xref target="RFC1806"/>.
2237<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"/>
2238     content-disposition = "Content-Disposition" ":"
2239                           disposition-type *( ";" disposition-parm )
2240     disposition-type = "attachment" | disp-extension-token
2241     disposition-parm = filename-parm | disp-extension-parm
2242     filename-parm = "filename" "=" quoted-string
2243     disp-extension-token = token
2244     disp-extension-parm = token "=" ( token | quoted-string )
2247   An example is
2249<figure><artwork type="example">
2250     Content-Disposition: attachment; filename="fname.ext"
2253   The receiving user agent &SHOULD-NOT;  respect any directory path
2254   information present in the filename-parm parameter, which is the only
2255   parameter believed to apply to HTTP implementations at this time. The
2256   filename &SHOULD; be treated as a terminal component only.
2259   If this header is used in a response with the application/octet-stream
2260   content-type, the implied suggestion is that the user agent
2261   should not display the response, but directly enter a `save response
2262   as...' dialog.
2265   See <xref target="content-disposition.issues"/> for Content-Disposition security issues.
2270<section title="Changes from RFC 2068" anchor="changes.from.rfc.2068">
2272   Charset wildcarding is introduced to avoid explosion of character set
2273   names in accept headers. (<xref target="header.accept-charset"/>)
2276   Content-Base was deleted from the specification: it was not
2277   implemented widely, and there is no simple, safe way to introduce it
2278   without a robust extension mechanism. In addition, it is used in a
2279   similar, but not identical fashion in MHTML <xref target="RFC2110"/>.
2282   A content-coding of "identity" was introduced, to solve problems
2283   discovered in caching. (<xref target="content.codings"/>)
2286   Quality Values of zero should indicate that "I don't want something"
2287   to allow clients to refuse a representation. (<xref target="quality.values"/>)
2290   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
2291   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
2292   specification, but not commonly implemented. See <xref target="RFC2068"/>.
Note: See TracBrowser for help on using the repository browser.