source: draft-ietf-httpbis/05/draft-ietf-httpbis-p3-payload-05.xml @ 381

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

Prepare release of draft 05.

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