source: draft-ietf-httpbis/03/draft-ietf-httpbis-p3-payload-03.xml @ 1099

Last change on this file since 1099 was 559, checked in by fielding@…, 11 years ago

remove executable and set eol-style for earlier drafts

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