source: draft-ietf-httpbis/14/draft-ietf-httpbis-p3-payload-14.xml @ 1271

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

-14

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