source: draft-ietf-httpbis/05/draft-ietf-httpbis-p3-payload-05.txt @ 1633

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

remove executable and set eol-style for earlier drafts

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