source: draft-ietf-httpbis/04/draft-ietf-httpbis-p3-payload-04.xml

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

fix mime types

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