source: draft-ietf-httpbis/00/draft-ietf-httpbis-p3-payload-00.xml @ 63

Last change on this file since 63 was 63, checked in by fielding@…, 12 years ago

Update issues list URI and draft names

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