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

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

Use canonical URLs for links to

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