source: draft-ietf-httpbis/14/draft-ietf-httpbis-p1-messaging-14.txt @ 1271

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

-14

  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 207.5 KB
Line 
1
2
3
4HTTPbis Working Group                                   R. Fielding, Ed.
5Internet-Draft                                                     Adobe
6Obsoletes: 2145,2616 (if approved)                             J. Gettys
7Updates: 2817 (if approved)                               Alcatel-Lucent
8Intended status: Standards Track                                J. Mogul
9Expires: October 20, 2011                                             HP
10                                                              H. Frystyk
11                                                               Microsoft
12                                                             L. Masinter
13                                                                   Adobe
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                                                          April 18, 2011
23
24
25        HTTP/1.1, part 1: URIs, Connections, and Message Parsing
26                   draft-ietf-httpbis-p1-messaging-14
27
28Abstract
29
30   The Hypertext Transfer Protocol (HTTP) is an application-level
31   protocol for distributed, collaborative, hypertext information
32   systems.  HTTP has been in use by the World Wide Web global
33   information initiative since 1990.  This document is Part 1 of the
34   seven-part specification that defines the protocol referred to as
35   "HTTP/1.1" and, taken together, obsoletes RFC 2616.  Part 1 provides
36   an overview of HTTP and its associated terminology, defines the
37   "http" and "https" Uniform Resource Identifier (URI) schemes, defines
38   the generic message syntax and parsing requirements for HTTP message
39   frames, and describes general security concerns for implementations.
40
41Editorial Note (To be removed by RFC Editor)
42
43   Discussion of this draft should take place on the HTTPBIS working
44   group mailing list (ietf-http-wg@w3.org), which is archived at
45   <http://lists.w3.org/Archives/Public/ietf-http-wg/>.
46
47   The current issues list is at
48   <http://tools.ietf.org/wg/httpbis/trac/report/3> and related
49   documents (including fancy diffs) can be found at
50   <http://tools.ietf.org/wg/httpbis/>.
51
52
53
54
55Fielding, et al.        Expires October 20, 2011                [Page 1]
56
57Internet-Draft              HTTP/1.1, Part 1                  April 2011
58
59
60   The changes in this draft are summarized in Appendix D.15.
61
62Status of This Memo
63
64   This Internet-Draft is submitted in full conformance with the
65   provisions of BCP 78 and BCP 79.
66
67   Internet-Drafts are working documents of the Internet Engineering
68   Task Force (IETF).  Note that other groups may also distribute
69   working documents as Internet-Drafts.  The list of current Internet-
70   Drafts is at http://datatracker.ietf.org/drafts/current/.
71
72   Internet-Drafts are draft documents valid for a maximum of six months
73   and may be updated, replaced, or obsoleted by other documents at any
74   time.  It is inappropriate to use Internet-Drafts as reference
75   material or to cite them other than as "work in progress."
76
77   This Internet-Draft will expire on October 20, 2011.
78
79Copyright Notice
80
81   Copyright (c) 2011 IETF Trust and the persons identified as the
82   document authors.  All rights reserved.
83
84   This document is subject to BCP 78 and the IETF Trust's Legal
85   Provisions Relating to IETF Documents
86   (http://trustee.ietf.org/license-info) in effect on the date of
87   publication of this document.  Please review these documents
88   carefully, as they describe your rights and restrictions with respect
89   to this document.  Code Components extracted from this document must
90   include Simplified BSD License text as described in Section 4.e of
91   the Trust Legal Provisions and are provided without warranty as
92   described in the Simplified BSD License.
93
94   This document may contain material from IETF Documents or IETF
95   Contributions published or made publicly available before November
96   10, 2008.  The person(s) controlling the copyright in some of this
97   material may not have granted the IETF Trust the right to allow
98   modifications of such material outside the IETF Standards Process.
99   Without obtaining an adequate license from the person(s) controlling
100   the copyright in such materials, this document may not be modified
101   outside the IETF Standards Process, and derivative works of it may
102   not be created outside the IETF Standards Process, except to format
103   it for publication as an RFC or to translate it into languages other
104   than English.
105
106Table of Contents
107
108
109
110
111Fielding, et al.        Expires October 20, 2011                [Page 2]
112
113Internet-Draft              HTTP/1.1, Part 1                  April 2011
114
115
116   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  6
117     1.1.  Requirements . . . . . . . . . . . . . . . . . . . . . . .  7
118     1.2.  Syntax Notation  . . . . . . . . . . . . . . . . . . . . .  7
119       1.2.1.  ABNF Extension: #rule  . . . . . . . . . . . . . . . .  7
120       1.2.2.  Basic Rules  . . . . . . . . . . . . . . . . . . . . .  8
121   2.  HTTP-related architecture  . . . . . . . . . . . . . . . . . . 10
122     2.1.  Client/Server Messaging  . . . . . . . . . . . . . . . . . 10
123     2.2.  Connections and Transport Independence . . . . . . . . . . 12
124     2.3.  Intermediaries . . . . . . . . . . . . . . . . . . . . . . 12
125     2.4.  Caches . . . . . . . . . . . . . . . . . . . . . . . . . . 14
126     2.5.  Protocol Versioning  . . . . . . . . . . . . . . . . . . . 15
127     2.6.  Uniform Resource Identifiers . . . . . . . . . . . . . . . 17
128       2.6.1.  http URI scheme  . . . . . . . . . . . . . . . . . . . 18
129       2.6.2.  https URI scheme . . . . . . . . . . . . . . . . . . . 19
130       2.6.3.  http and https URI Normalization and Comparison  . . . 20
131   3.  Message Format . . . . . . . . . . . . . . . . . . . . . . . . 20
132     3.1.  Message Parsing Robustness . . . . . . . . . . . . . . . . 21
133     3.2.  Header Fields  . . . . . . . . . . . . . . . . . . . . . . 22
134     3.3.  Message Body . . . . . . . . . . . . . . . . . . . . . . . 24
135     3.4.  General Header Fields  . . . . . . . . . . . . . . . . . . 27
136   4.  Request  . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
137     4.1.  Request-Line . . . . . . . . . . . . . . . . . . . . . . . 28
138       4.1.1.  Method . . . . . . . . . . . . . . . . . . . . . . . . 28
139       4.1.2.  request-target . . . . . . . . . . . . . . . . . . . . 28
140     4.2.  The Resource Identified by a Request . . . . . . . . . . . 30
141     4.3.  Effective Request URI  . . . . . . . . . . . . . . . . . . 31
142   5.  Response . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
143     5.1.  Status-Line  . . . . . . . . . . . . . . . . . . . . . . . 33
144       5.1.1.  Status Code and Reason Phrase  . . . . . . . . . . . . 33
145   6.  Protocol Parameters  . . . . . . . . . . . . . . . . . . . . . 33
146     6.1.  Date/Time Formats: Full Date . . . . . . . . . . . . . . . 33
147     6.2.  Transfer Codings . . . . . . . . . . . . . . . . . . . . . 36
148       6.2.1.  Chunked Transfer Coding  . . . . . . . . . . . . . . . 37
149       6.2.2.  Compression Codings  . . . . . . . . . . . . . . . . . 39
150       6.2.3.  Transfer Coding Registry . . . . . . . . . . . . . . . 40
151     6.3.  Product Tokens . . . . . . . . . . . . . . . . . . . . . . 41
152     6.4.  Quality Values . . . . . . . . . . . . . . . . . . . . . . 41
153   7.  Connections  . . . . . . . . . . . . . . . . . . . . . . . . . 41
154     7.1.  Persistent Connections . . . . . . . . . . . . . . . . . . 42
155       7.1.1.  Purpose  . . . . . . . . . . . . . . . . . . . . . . . 42
156       7.1.2.  Overall Operation  . . . . . . . . . . . . . . . . . . 42
157       7.1.3.  Proxy Servers  . . . . . . . . . . . . . . . . . . . . 44
158       7.1.4.  Practical Considerations . . . . . . . . . . . . . . . 46
159     7.2.  Message Transmission Requirements  . . . . . . . . . . . . 47
160       7.2.1.  Persistent Connections and Flow Control  . . . . . . . 47
161       7.2.2.  Monitoring Connections for Error Status Messages . . . 48
162       7.2.3.  Use of the 100 (Continue) Status . . . . . . . . . . . 48
163       7.2.4.  Client Behavior if Server Prematurely Closes
164
165
166
167Fielding, et al.        Expires October 20, 2011                [Page 3]
168
169Internet-Draft              HTTP/1.1, Part 1                  April 2011
170
171
172               Connection . . . . . . . . . . . . . . . . . . . . . . 50
173   8.  Miscellaneous notes that might disappear . . . . . . . . . . . 51
174     8.1.  Scheme aliases considered harmful  . . . . . . . . . . . . 51
175     8.2.  Use of HTTP for proxy communication  . . . . . . . . . . . 51
176     8.3.  Interception of HTTP for access control  . . . . . . . . . 51
177     8.4.  Use of HTTP by other protocols . . . . . . . . . . . . . . 51
178     8.5.  Use of HTTP by media type specification  . . . . . . . . . 51
179   9.  Header Field Definitions . . . . . . . . . . . . . . . . . . . 51
180     9.1.  Connection . . . . . . . . . . . . . . . . . . . . . . . . 51
181     9.2.  Content-Length . . . . . . . . . . . . . . . . . . . . . . 53
182     9.3.  Date . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
183       9.3.1.  Clockless Origin Server Operation  . . . . . . . . . . 54
184     9.4.  Host . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
185     9.5.  TE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
186     9.6.  Trailer  . . . . . . . . . . . . . . . . . . . . . . . . . 57
187     9.7.  Transfer-Encoding  . . . . . . . . . . . . . . . . . . . . 57
188     9.8.  Upgrade  . . . . . . . . . . . . . . . . . . . . . . . . . 58
189       9.8.1.  Upgrade Token Registry . . . . . . . . . . . . . . . . 59
190     9.9.  Via  . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
191   10. IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 61
192     10.1. Header Field Registration  . . . . . . . . . . . . . . . . 61
193     10.2. URI Scheme Registration  . . . . . . . . . . . . . . . . . 62
194     10.3. Internet Media Type Registrations  . . . . . . . . . . . . 62
195       10.3.1. Internet Media Type message/http . . . . . . . . . . . 62
196       10.3.2. Internet Media Type application/http . . . . . . . . . 63
197     10.4. Transfer Coding Registry . . . . . . . . . . . . . . . . . 64
198     10.5. Upgrade Token Registration . . . . . . . . . . . . . . . . 65
199   11. Security Considerations  . . . . . . . . . . . . . . . . . . . 65
200     11.1. Personal Information . . . . . . . . . . . . . . . . . . . 65
201     11.2. Abuse of Server Log Information  . . . . . . . . . . . . . 66
202     11.3. Attacks Based On File and Path Names . . . . . . . . . . . 66
203     11.4. DNS Spoofing . . . . . . . . . . . . . . . . . . . . . . . 66
204     11.5. Proxies and Caching  . . . . . . . . . . . . . . . . . . . 67
205     11.6. Denial of Service Attacks on Proxies . . . . . . . . . . . 68
206   12. Acknowledgments  . . . . . . . . . . . . . . . . . . . . . . . 68
207   13. References . . . . . . . . . . . . . . . . . . . . . . . . . . 69
208     13.1. Normative References . . . . . . . . . . . . . . . . . . . 69
209     13.2. Informative References . . . . . . . . . . . . . . . . . . 71
210   Appendix A.  Tolerant Applications . . . . . . . . . . . . . . . . 73
211   Appendix B.  HTTP Version History  . . . . . . . . . . . . . . . . 74
212     B.1.  Changes from HTTP/1.0  . . . . . . . . . . . . . . . . . . 75
213       B.1.1.  Multi-homed Web Servers  . . . . . . . . . . . . . . . 75
214       B.1.2.  Keep-Alive Connections . . . . . . . . . . . . . . . . 76
215     B.2.  Changes from RFC 2616  . . . . . . . . . . . . . . . . . . 76
216   Appendix C.  Collected ABNF  . . . . . . . . . . . . . . . . . . . 77
217   Appendix D.  Change Log (to be removed by RFC Editor before
218                publication)  . . . . . . . . . . . . . . . . . . . . 81
219     D.1.  Since RFC 2616 . . . . . . . . . . . . . . . . . . . . . . 81
220
221
222
223Fielding, et al.        Expires October 20, 2011                [Page 4]
224
225Internet-Draft              HTTP/1.1, Part 1                  April 2011
226
227
228     D.2.  Since draft-ietf-httpbis-p1-messaging-00 . . . . . . . . . 81
229     D.3.  Since draft-ietf-httpbis-p1-messaging-01 . . . . . . . . . 83
230     D.4.  Since draft-ietf-httpbis-p1-messaging-02 . . . . . . . . . 84
231     D.5.  Since draft-ietf-httpbis-p1-messaging-03 . . . . . . . . . 84
232     D.6.  Since draft-ietf-httpbis-p1-messaging-04 . . . . . . . . . 85
233     D.7.  Since draft-ietf-httpbis-p1-messaging-05 . . . . . . . . . 85
234     D.8.  Since draft-ietf-httpbis-p1-messaging-06 . . . . . . . . . 86
235     D.9.  Since draft-ietf-httpbis-p1-messaging-07 . . . . . . . . . 87
236     D.10. Since draft-ietf-httpbis-p1-messaging-08 . . . . . . . . . 87
237     D.11. Since draft-ietf-httpbis-p1-messaging-09 . . . . . . . . . 88
238     D.12. Since draft-ietf-httpbis-p1-messaging-10 . . . . . . . . . 88
239     D.13. Since draft-ietf-httpbis-p1-messaging-11 . . . . . . . . . 89
240     D.14. Since draft-ietf-httpbis-p1-messaging-12 . . . . . . . . . 89
241     D.15. Since draft-ietf-httpbis-p1-messaging-13 . . . . . . . . . 90
242   Index  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279Fielding, et al.        Expires October 20, 2011                [Page 5]
280
281Internet-Draft              HTTP/1.1, Part 1                  April 2011
282
283
2841.  Introduction
285
286   The Hypertext Transfer Protocol (HTTP) is an application-level
287   request/response protocol that uses extensible semantics and MIME-
288   like message payloads for flexible interaction with network-based
289   hypertext information systems.  HTTP relies upon the Uniform Resource
290   Identifier (URI) standard [RFC3986] to indicate the target resource
291   and relationships between resources.  Messages are passed in a format
292   similar to that used by Internet mail [RFC5322] and the Multipurpose
293   Internet Mail Extensions (MIME) [RFC2045] (see Appendix A of [Part3]
294   for the differences between HTTP and MIME messages).
295
296   HTTP is a generic interface protocol for information systems.  It is
297   designed to hide the details of how a service is implemented by
298   presenting a uniform interface to clients that is independent of the
299   types of resources provided.  Likewise, servers do not need to be
300   aware of each client's purpose: an HTTP request can be considered in
301   isolation rather than being associated with a specific type of client
302   or a predetermined sequence of application steps.  The result is a
303   protocol that can be used effectively in many different contexts and
304   for which implementations can evolve independently over time.
305
306   HTTP is also designed for use as an intermediation protocol for
307   translating communication to and from non-HTTP information systems.
308   HTTP proxies and gateways can provide access to alternative
309   information services by translating their diverse protocols into a
310   hypertext format that can be viewed and manipulated by clients in the
311   same way as HTTP services.
312
313   One consequence of HTTP flexibility is that the protocol cannot be
314   defined in terms of what occurs behind the interface.  Instead, we
315   are limited to defining the syntax of communication, the intent of
316   received communication, and the expected behavior of recipients.  If
317   the communication is considered in isolation, then successful actions
318   ought to be reflected in corresponding changes to the observable
319   interface provided by servers.  However, since multiple clients might
320   act in parallel and perhaps at cross-purposes, we cannot require that
321   such changes be observable beyond the scope of a single response.
322
323   This document is Part 1 of the seven-part specification of HTTP,
324   defining the protocol referred to as "HTTP/1.1", obsoleting [RFC2616]
325   and [RFC2145].  Part 1 describes the architectural elements that are
326   used or referred to in HTTP, defines the "http" and "https" URI
327   schemes, describes overall network operation and connection
328   management, and defines HTTP message framing and forwarding
329   requirements.  Our goal is to define all of the mechanisms necessary
330   for HTTP message handling that are independent of message semantics,
331   thereby defining the complete set of requirements for message parsers
332
333
334
335Fielding, et al.        Expires October 20, 2011                [Page 6]
336
337Internet-Draft              HTTP/1.1, Part 1                  April 2011
338
339
340   and message-forwarding intermediaries.
341
3421.1.  Requirements
343
344   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
345   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
346   document are to be interpreted as described in [RFC2119].
347
348   An implementation is not compliant if it fails to satisfy one or more
349   of the "MUST" or "REQUIRED" level requirements for the protocols it
350   implements.  An implementation that satisfies all the "MUST" or
351   "REQUIRED" level and all the "SHOULD" level requirements for its
352   protocols is said to be "unconditionally compliant"; one that
353   satisfies all the "MUST" level requirements but not all the "SHOULD"
354   level requirements for its protocols is said to be "conditionally
355   compliant".
356
3571.2.  Syntax Notation
358
359   This specification uses the Augmented Backus-Naur Form (ABNF)
360   notation of [RFC5234].
361
362   The following core rules are included by reference, as defined in
363   [RFC5234], Appendix B.1: ALPHA (letters), CR (carriage return), CRLF
364   (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote),
365   HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any 8-bit
366   sequence of data), SP (space), VCHAR (any visible [USASCII]
367   character), and WSP (whitespace).
368
369   As a syntactic convention, ABNF rule names prefixed with "obs-"
370   denote "obsolete" grammar rules that appear for historical reasons.
371
3721.2.1.  ABNF Extension: #rule
373
374   The #rule extension to the ABNF rules of [RFC5234] is used to improve
375   readability.
376
377   A construct "#" is defined, similar to "*", for defining comma-
378   delimited lists of elements.  The full form is "<n>#<m>element"
379   indicating at least <n> and at most <m> elements, each separated by a
380   single comma (",") and optional whitespace (OWS, Section 1.2.2).
381
382   Thus,
383
384     1#element => element *( OWS "," OWS element )
385
386
387
388
389
390
391Fielding, et al.        Expires October 20, 2011                [Page 7]
392
393Internet-Draft              HTTP/1.1, Part 1                  April 2011
394
395
396   and:
397
398     #element => [ 1#element ]
399
400   and for n >= 1 and m > 1:
401
402     <n>#<m>element => element <n-1>*<m-1>( OWS "," OWS element )
403
404   For compatibility with legacy list rules, recipients SHOULD accept
405   empty list elements.  In other words, consumers would follow the list
406   productions:
407
408     #element => [ ( "," / element ) *( OWS "," [ OWS element ] ) ]
409
410     1#element => *( "," OWS ) element *( OWS "," [ OWS element ] )
411
412   Note that empty elements do not contribute to the count of elements
413   present, though.
414
415   For example, given these ABNF productions:
416
417     example-list      = 1#example-list-elmt
418     example-list-elmt = token ; see Section 1.2.2
419
420   Then these are valid values for example-list (not including the
421   double quotes, which are present for delimitation only):
422
423     "foo,bar"
424     " foo ,bar,"
425     "  foo , ,bar,charlie   "
426     "foo ,bar,   charlie "
427
428   But these values would be invalid, as at least one non-empty element
429   is required:
430
431     ""
432     ","
433     ",   ,"
434
435   Appendix C shows the collected ABNF, with the list rules expanded as
436   explained above.
437
4381.2.2.  Basic Rules
439
440   HTTP/1.1 defines the sequence CR LF as the end-of-line marker for all
441   protocol elements other than the message-body (see Appendix A for
442   tolerant applications).
443
444
445
446
447Fielding, et al.        Expires October 20, 2011                [Page 8]
448
449Internet-Draft              HTTP/1.1, Part 1                  April 2011
450
451
452   This specification uses three rules to denote the use of linear
453   whitespace: OWS (optional whitespace), RWS (required whitespace), and
454   BWS ("bad" whitespace).
455
456   The OWS rule is used where zero or more linear whitespace octets
457   might appear.  OWS SHOULD either not be produced or be produced as a
458   single SP.  Multiple OWS octets that occur within field-content
459   SHOULD be replaced with a single SP before interpreting the field
460   value or forwarding the message downstream.
461
462   RWS is used when at least one linear whitespace octet is required to
463   separate field tokens.  RWS SHOULD be produced as a single SP.
464   Multiple RWS octets that occur within field-content SHOULD be
465   replaced with a single SP before interpreting the field value or
466   forwarding the message downstream.
467
468   BWS is used where the grammar allows optional whitespace for
469   historical reasons but senders SHOULD NOT produce it in messages.
470   HTTP/1.1 recipients MUST accept such bad optional whitespace and
471   remove it before interpreting the field value or forwarding the
472   message downstream.
473
474
475     OWS            = *( [ obs-fold ] WSP )
476                    ; "optional" whitespace
477     RWS            = 1*( [ obs-fold ] WSP )
478                    ; "required" whitespace
479     BWS            = OWS
480                    ; "bad" whitespace
481     obs-fold       = CRLF
482                    ; see Section 3.2
483
484   Many HTTP/1.1 header field values consist of words (token or quoted-
485   string) separated by whitespace or special characters.  These special
486   characters MUST be in a quoted string to be used within a parameter
487   value (as defined in Section 6.2).
488
489     word           = token / quoted-string
490
491     token          = 1*tchar
492
493     tchar          = "!" / "#" / "$" / "%" / "&" / "'" / "*"
494                    / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
495                    / DIGIT / ALPHA
496                    ; any VCHAR, except special
497
498     special        = "(" / ")" / "<" / ">" / "@" / ","
499                    / ";" / ":" / "\" / DQUOTE / "/" / "["
500
501
502
503Fielding, et al.        Expires October 20, 2011                [Page 9]
504
505Internet-Draft              HTTP/1.1, Part 1                  April 2011
506
507
508                    / "]" / "?" / "=" / "{" / "}"
509
510   A string of text is parsed as a single word if it is quoted using
511   double-quote marks.
512
513     quoted-string  = DQUOTE *( qdtext / quoted-pair ) DQUOTE
514     qdtext         = OWS / %x21 / %x23-5B / %x5D-7E / obs-text
515                    ; OWS / <VCHAR except DQUOTE and "\"> / obs-text
516     obs-text       = %x80-FF
517
518   The backslash octet ("\") can be used as a single-octet quoting
519   mechanism within quoted-string constructs:
520
521     quoted-pair    = "\" ( WSP / VCHAR / obs-text )
522
523   Senders SHOULD NOT escape octets that do not require escaping (i.e.,
524   other than DQUOTE and the backslash octet).
525
5262.  HTTP-related architecture
527
528   HTTP was created for the World Wide Web architecture and has evolved
529   over time to support the scalability needs of a worldwide hypertext
530   system.  Much of that architecture is reflected in the terminology
531   and syntax productions used to define HTTP.
532
5332.1.  Client/Server Messaging
534
535   HTTP is a stateless request/response protocol that operates by
536   exchanging messages across a reliable transport or session-layer
537   "connection".  An HTTP "client" is a program that establishes a
538   connection to a server for the purpose of sending one or more HTTP
539   requests.  An HTTP "server" is a program that accepts connections in
540   order to service HTTP requests by sending HTTP responses.
541
542   Note that the terms client and server refer only to the roles that
543   these programs perform for a particular connection.  The same program
544   might act as a client on some connections and a server on others.  We
545   use the term "user agent" to refer to the program that initiates a
546   request, such as a WWW browser, editor, or spider (web-traversing
547   robot), and the term "origin server" to refer to the program that can
548   originate authoritative responses to a request.  For general
549   requirements, we use the term "sender" to refer to whichever
550   component sent a given message and the term "recipient" to refer to
551   any component that receives the message.
552
553   Most HTTP communication consists of a retrieval request (GET) for a
554   representation of some resource identified by a URI.  In the simplest
555   case, this might be accomplished via a single bidirectional
556
557
558
559Fielding, et al.        Expires October 20, 2011               [Page 10]
560
561Internet-Draft              HTTP/1.1, Part 1                  April 2011
562
563
564   connection (===) between the user agent (UA) and the origin server
565   (O).
566
567            request   >
568       UA ======================================= O
569                                   <   response
570
571   A client sends an HTTP request to the server in the form of a request
572   message (Section 4), beginning with a method, URI, and protocol
573   version, followed by MIME-like header fields containing request
574   modifiers, client information, and payload metadata, an empty line to
575   indicate the end of the header section, and finally the payload body
576   (if any).
577
578   A server responds to the client's request by sending an HTTP response
579   message (Section 5), beginning with a status line that includes the
580   protocol version, a success or error code, and textual reason phrase,
581   followed by MIME-like header fields containing server information,
582   resource metadata, and payload metadata, an empty line to indicate
583   the end of the header section, and finally the payload body (if any).
584
585   The following example illustrates a typical message exchange for a
586   GET request on the URI "http://www.example.com/hello.txt":
587
588   client request:
589
590     GET /hello.txt HTTP/1.1
591     User-Agent: curl/7.16.3 libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3
592     Host: www.example.com
593     Accept: */*
594
595
596   server response:
597
598     HTTP/1.1 200 OK
599     Date: Mon, 27 Jul 2009 12:28:53 GMT
600     Server: Apache
601     Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT
602     ETag: "34aa387-d-1568eb00"
603     Accept-Ranges: bytes
604     Content-Length: 14
605     Vary: Accept-Encoding
606     Content-Type: text/plain
607
608     Hello World!
609
610
611
612
613
614
615Fielding, et al.        Expires October 20, 2011               [Page 11]
616
617Internet-Draft              HTTP/1.1, Part 1                  April 2011
618
619
6202.2.  Connections and Transport Independence
621
622   HTTP messaging is independent of the underlying transport or session-
623   layer connection protocol(s).  HTTP only presumes a reliable
624   transport with in-order delivery of requests and the corresponding
625   in-order delivery of responses.  The mapping of HTTP request and
626   response structures onto the data units of the underlying transport
627   protocol is outside the scope of this specification.
628
629   The specific connection protocols to be used for an interaction are
630   determined by client configuration and the target resource's URI.
631   For example, the "http" URI scheme (Section 2.6.1) indicates a
632   default connection of TCP over IP, with a default TCP port of 80, but
633   the client might be configured to use a proxy via some other
634   connection port or protocol instead of using the defaults.
635
636   A connection might be used for multiple HTTP request/response
637   exchanges, as defined in Section 7.1.
638
6392.3.  Intermediaries
640
641   HTTP enables the use of intermediaries to satisfy requests through a
642   chain of connections.  There are three common forms of HTTP
643   intermediary: proxy, gateway, and tunnel.  In some cases, a single
644   intermediary might act as an origin server, proxy, gateway, or
645   tunnel, switching behavior based on the nature of each request.
646
647            >             >             >             >
648       UA =========== A =========== B =========== C =========== O
649                  <             <             <             <
650
651   The figure above shows three intermediaries (A, B, and C) between the
652   user agent and origin server.  A request or response message that
653   travels the whole chain will pass through four separate connections.
654   Some HTTP communication options might apply only to the connection
655   with the nearest, non-tunnel neighbor, only to the end-points of the
656   chain, or to all connections along the chain.  Although the diagram
657   is linear, each participant might be engaged in multiple,
658   simultaneous communications.  For example, B might be receiving
659   requests from many clients other than A, and/or forwarding requests
660   to servers other than C, at the same time that it is handling A's
661   request.
662
663   We use the terms "upstream" and "downstream" to describe various
664   requirements in relation to the directional flow of a message: all
665   messages flow from upstream to downstream.  Likewise, we use the
666   terms inbound and outbound to refer to directions in relation to the
667   request path: "inbound" means toward the origin server and "outbound"
668
669
670
671Fielding, et al.        Expires October 20, 2011               [Page 12]
672
673Internet-Draft              HTTP/1.1, Part 1                  April 2011
674
675
676   means toward the user agent.
677
678   A "proxy" is a message forwarding agent that is selected by the
679   client, usually via local configuration rules, to receive requests
680   for some type(s) of absolute URI and attempt to satisfy those
681   requests via translation through the HTTP interface.  Some
682   translations are minimal, such as for proxy requests for "http" URIs,
683   whereas other requests might require translation to and from entirely
684   different application-layer protocols.  Proxies are often used to
685   group an organization's HTTP requests through a common intermediary
686   for the sake of security, annotation services, or shared caching.
687
688   An HTTP-to-HTTP proxy is called a "transforming proxy" if it is
689   designed or configured to modify request or response messages in a
690   semantically meaningful way (i.e., modifications, beyond those
691   required by normal HTTP processing, that change the message in a way
692   that would be significant to the original sender or potentially
693   significant to downstream recipients).  For example, a transforming
694   proxy might be acting as a shared annotation server (modifying
695   responses to include references to a local annotation database), a
696   malware filter, a format transcoder, or an intranet-to-Internet
697   privacy filter.  Such transformations are presumed to be desired by
698   the client (or client organization) that selected the proxy and are
699   beyond the scope of this specification.  However, when a proxy is not
700   intended to transform a given message, we use the term "non-
701   transforming proxy" to target requirements that preserve HTTP message
702   semantics.
703
704   A "gateway" (a.k.a., "reverse proxy") is a receiving agent that acts
705   as a layer above some other server(s) and translates the received
706   requests to the underlying server's protocol.  Gateways are often
707   used to encapsulate legacy or untrusted information services, to
708   improve server performance through "accelerator" caching, and to
709   enable partitioning or load-balancing of HTTP services across
710   multiple machines.
711
712   A gateway behaves as an origin server on its outbound connection and
713   as a user agent on its inbound connection.  All HTTP requirements
714   applicable to an origin server also apply to the outbound
715   communication of a gateway.  A gateway communicates with inbound
716   servers using any protocol that it desires, including private
717   extensions to HTTP that are outside the scope of this specification.
718   However, an HTTP-to-HTTP gateway that wishes to interoperate with
719   third-party HTTP servers MUST comply with HTTP user agent
720   requirements on the gateway's inbound connection and MUST implement
721   the Connection (Section 9.1) and Via (Section 9.9) header fields for
722   both connections.
723
724
725
726
727Fielding, et al.        Expires October 20, 2011               [Page 13]
728
729Internet-Draft              HTTP/1.1, Part 1                  April 2011
730
731
732   A "tunnel" acts as a blind relay between two connections without
733   changing the messages.  Once active, a tunnel is not considered a
734   party to the HTTP communication, though the tunnel might have been
735   initiated by an HTTP request.  A tunnel ceases to exist when both
736   ends of the relayed connection are closed.  Tunnels are used to
737   extend a virtual connection through an intermediary, such as when
738   transport-layer security is used to establish private communication
739   through a shared firewall proxy.
740
741   In addition, there may exist network intermediaries that are not
742   considered part of the HTTP communication but nevertheless act as
743   filters or redirecting agents (usually violating HTTP semantics,
744   causing security problems, and otherwise making a mess of things).
745   Such a network intermediary, often referred to as an "interception
746   proxy" [RFC3040], "transparent proxy" [RFC1919], or "captive portal",
747   differs from an HTTP proxy because it has not been selected by the
748   client.  Instead, the network intermediary redirects outgoing TCP
749   port 80 packets (and occasionally other common port traffic) to an
750   internal HTTP server.  Interception proxies are commonly found on
751   public network access points, as a means of enforcing account
752   subscription prior to allowing use of non-local Internet services,
753   and within corporate firewalls to enforce network usage policies.
754   They are indistinguishable from a man-in-the-middle attack.
755
7562.4.  Caches
757
758   A "cache" is a local store of previous response messages and the
759   subsystem that controls its message storage, retrieval, and deletion.
760   A cache stores cacheable responses in order to reduce the response
761   time and network bandwidth consumption on future, equivalent
762   requests.  Any client or server MAY employ a cache, though a cache
763   cannot be used by a server while it is acting as a tunnel.
764
765   The effect of a cache is that the request/response chain is shortened
766   if one of the participants along the chain has a cached response
767   applicable to that request.  The following illustrates the resulting
768   chain if B has a cached copy of an earlier response from O (via C)
769   for a request which has not been cached by UA or A.
770
771               >             >
772          UA =========== A =========== B - - - - - - C - - - - - - O
773                     <             <
774
775   A response is "cacheable" if a cache is allowed to store a copy of
776   the response message for use in answering subsequent requests.  Even
777   when a response is cacheable, there might be additional constraints
778   placed by the client or by the origin server on when that cached
779   response can be used for a particular request.  HTTP requirements for
780
781
782
783Fielding, et al.        Expires October 20, 2011               [Page 14]
784
785Internet-Draft              HTTP/1.1, Part 1                  April 2011
786
787
788   cache behavior and cacheable responses are defined in Section 2 of
789   [Part6].
790
791   There are a wide variety of architectures and configurations of
792   caches and proxies deployed across the World Wide Web and inside
793   large organizations.  These systems include national hierarchies of
794   proxy caches to save transoceanic bandwidth, systems that broadcast
795   or multicast cache entries, organizations that distribute subsets of
796   cached data via optical media, and so on.
797
7982.5.  Protocol Versioning
799
800   HTTP uses a "<major>.<minor>" numbering scheme to indicate versions
801   of the protocol.  This specification defines version "1.1".  The
802   protocol version as a whole indicates the sender's compliance with
803   the set of requirements laid out in that version's corresponding
804   specification of HTTP.
805
806   The version of an HTTP message is indicated by an HTTP-Version field
807   in the first line of the message.  HTTP-Version is case-sensitive.
808
809     HTTP-Version   = HTTP-Prot-Name "/" 1*DIGIT "." 1*DIGIT
810     HTTP-Prot-Name = %x48.54.54.50 ; "HTTP", case-sensitive
811
812   The HTTP version number consists of two non-negative decimal integers
813   separated by a "." (period or decimal point).  The first number
814   ("major version") indicates the HTTP messaging syntax, whereas the
815   second number ("minor version") indicates the highest minor version
816   to which the sender is at least conditionally compliant and able to
817   understand for future communication.  The minor version advertises
818   the sender's communication capabilities even when the sender is only
819   using a backwards-compatible subset of the protocol, thereby letting
820   the recipient know that more advanced features can be used in
821   response (by servers) or in future requests (by clients).
822
823   When comparing HTTP versions, the numbers MUST be compared
824   numerically rather than lexically.  For example, HTTP/2.4 is a lower
825   version than HTTP/2.13, which in turn is lower than HTTP/12.3.
826   Leading zeros MUST be ignored by recipients and MUST NOT be sent.
827
828   When an HTTP/1.1 message is sent to an HTTP/1.0 recipient [RFC1945]
829   or a recipient whose version is unknown, the HTTP/1.1 message is
830   constructed such that it can be interpreted as a valid HTTP/1.0
831   message if all of the newer features are ignored.  This specification
832   places recipient-version requirements on some new features so that a
833   compliant sender will only use compatible features until it has
834   determined, through configuration or the receipt of a message, that
835   the recipient supports HTTP/1.1.
836
837
838
839Fielding, et al.        Expires October 20, 2011               [Page 15]
840
841Internet-Draft              HTTP/1.1, Part 1                  April 2011
842
843
844   The interpretation of an HTTP header field does not change between
845   minor versions of the same major version, though the default behavior
846   of a recipient in the absence of such a field can change.  Unless
847   specified otherwise, header fields defined in HTTP/1.1 are defined
848   for all versions of HTTP/1.x.  In particular, the Host and Connection
849   header fields ought to be implemented by all HTTP/1.x implementations
850   whether or not they advertise compliance with HTTP/1.1.
851
852   New header fields can be defined such that, when they are understood
853   by a recipient, they might override or enhance the interpretation of
854   previously defined header fields.  When an implementation receives an
855   unrecognized header field, the recipient MUST ignore that header
856   field for local processing regardless of the message's HTTP version.
857   An unrecognized header field received by a proxy MUST be forwarded
858   downstream unless the header field's field-name is listed in the
859   message's Connection header-field (see Section 9.1).  These
860   requirements allow HTTP's functionality to be enhanced without
861   requiring prior update of all compliant intermediaries.
862
863   Intermediaries that process HTTP messages (i.e., all intermediaries
864   other than those acting as a tunnel) MUST send their own HTTP-Version
865   in forwarded messages.  In other words, they MUST NOT blindly forward
866   the first line of an HTTP message without ensuring that the protocol
867   version matches what the intermediary understands, and is at least
868   conditionally compliant to, for both the receiving and sending of
869   messages.  Forwarding an HTTP message without rewriting the HTTP-
870   Version might result in communication errors when downstream
871   recipients use the message sender's version to determine what
872   features are safe to use for later communication with that sender.
873
874   An HTTP client SHOULD send a request version equal to the highest
875   version for which the client is at least conditionally compliant and
876   whose major version is no higher than the highest version supported
877   by the server, if this is known.  An HTTP client MUST NOT send a
878   version for which it is not at least conditionally compliant.
879
880   An HTTP client MAY send a lower request version if it is known that
881   the server incorrectly implements the HTTP specification, but only
882   after the client has attempted at least one normal request and
883   determined from the response status or header fields (e.g., Server)
884   that the server improperly handles higher request versions.
885
886   An HTTP server SHOULD send a response version equal to the highest
887   version for which the server is at least conditionally compliant and
888   whose major version is less than or equal to the one received in the
889   request.  An HTTP server MUST NOT send a version for which it is not
890   at least conditionally compliant.  A server MAY send a 505 (HTTP
891   Version Not Supported) response if it cannot send a response using
892
893
894
895Fielding, et al.        Expires October 20, 2011               [Page 16]
896
897Internet-Draft              HTTP/1.1, Part 1                  April 2011
898
899
900   the major version used in the client's request.
901
902   An HTTP server MAY send an HTTP/1.0 response to an HTTP/1.0 request
903   if it is known or suspected that the client incorrectly implements
904   the HTTP specification and is incapable of correctly processing later
905   version responses, such as when a client fails to parse the version
906   number correctly or when an intermediary is known to blindly forward
907   the HTTP-Version even when it doesn't comply with the given minor
908   version of the protocol.  Such protocol downgrades SHOULD NOT be
909   performed unless triggered by specific client attributes, such as
910   when one or more of the request header fields (e.g., User-Agent)
911   uniquely match the values sent by a client known to be in error.
912
913   The intention of HTTP's versioning design is that the major number
914   will only be incremented if an incompatible message syntax is
915   introduced, and that the minor number will only be incremented when
916   changes made to the protocol have the effect of adding to the message
917   semantics or implying additional capabilities of the sender.
918   However, the minor version was not incremented for the changes
919   introduced between [RFC2068] and [RFC2616], and this revision is
920   specifically avoiding any such changes to the protocol.
921
9222.6.  Uniform Resource Identifiers
923
924   Uniform Resource Identifiers (URIs) [RFC3986] are used throughout
925   HTTP as the means for identifying resources.  URI references are used
926   to target requests, indicate redirects, and define relationships.
927   HTTP does not limit what a resource might be; it merely defines an
928   interface that can be used to interact with a resource via HTTP.
929   More information on the scope of URIs and resources can be found in
930   [RFC3986].
931
932   This specification adopts the definitions of "URI-reference",
933   "absolute-URI", "relative-part", "port", "host", "path-abempty",
934   "path-absolute", "query", and "authority" from the URI generic syntax
935   [RFC3986].  In addition, we define a partial-URI rule for protocol
936   elements that allow a relative URI but not a fragment.
937
938     URI-reference = <URI-reference, defined in [RFC3986], Section 4.1>
939     absolute-URI  = <absolute-URI, defined in [RFC3986], Section 4.3>
940     relative-part = <relative-part, defined in [RFC3986], Section 4.2>
941     authority     = <authority, defined in [RFC3986], Section 3.2>
942     path-abempty  = <path-abempty, defined in [RFC3986], Section 3.3>
943     path-absolute = <path-absolute, defined in [RFC3986], Section 3.3>
944     port          = <port, defined in [RFC3986], Section 3.2.3>
945     query         = <query, defined in [RFC3986], Section 3.4>
946     uri-host      = <host, defined in [RFC3986], Section 3.2.2>
947
948
949
950
951Fielding, et al.        Expires October 20, 2011               [Page 17]
952
953Internet-Draft              HTTP/1.1, Part 1                  April 2011
954
955
956     partial-URI   = relative-part [ "?" query ]
957
958   Each protocol element in HTTP that allows a URI reference will
959   indicate in its ABNF production whether the element allows any form
960   of reference (URI-reference), only a URI in absolute form (absolute-
961   URI), only the path and optional query components, or some
962   combination of the above.  Unless otherwise indicated, URI references
963   are parsed relative to the effective request URI, which defines the
964   default base URI for references in both the request and its
965   corresponding response.
966
9672.6.1.  http URI scheme
968
969   The "http" URI scheme is hereby defined for the purpose of minting
970   identifiers according to their association with the hierarchical
971   namespace governed by a potential HTTP origin server listening for
972   TCP connections on a given port.
973
974     http-URI = "http:" "//" authority path-abempty [ "?" query ]
975
976   The HTTP origin server is identified by the generic syntax's
977   authority component, which includes a host identifier and optional
978   TCP port ([RFC3986], Section 3.2.2).  The remainder of the URI,
979   consisting of both the hierarchical path component and optional query
980   component, serves as an identifier for a potential resource within
981   that origin server's name space.
982
983   If the host identifier is provided as an IP literal or IPv4 address,
984   then the origin server is any listener on the indicated TCP port at
985   that IP address.  If host is a registered name, then that name is
986   considered an indirect identifier and the recipient might use a name
987   resolution service, such as DNS, to find the address of a listener
988   for that host.  The host MUST NOT be empty; if an "http" URI is
989   received with an empty host, then it MUST be rejected as invalid.  If
990   the port subcomponent is empty or not given, then TCP port 80 is
991   assumed (the default reserved port for WWW services).
992
993   Regardless of the form of host identifier, access to that host is not
994   implied by the mere presence of its name or address.  The host might
995   or might not exist and, even when it does exist, might or might not
996   be running an HTTP server or listening to the indicated port.  The
997   "http" URI scheme makes use of the delegated nature of Internet names
998   and addresses to establish a naming authority (whatever entity has
999   the ability to place an HTTP server at that Internet name or address)
1000   and allows that authority to determine which names are valid and how
1001   they might be used.
1002
1003   When an "http" URI is used within a context that calls for access to
1004
1005
1006
1007Fielding, et al.        Expires October 20, 2011               [Page 18]
1008
1009Internet-Draft              HTTP/1.1, Part 1                  April 2011
1010
1011
1012   the indicated resource, a client MAY attempt access by resolving the
1013   host to an IP address, establishing a TCP connection to that address
1014   on the indicated port, and sending an HTTP request message to the
1015   server containing the URI's identifying data as described in
1016   Section 4.  If the server responds to that request with a non-interim
1017   HTTP response message, as described in Section 5, then that response
1018   is considered an authoritative answer to the client's request.
1019
1020   Although HTTP is independent of the transport protocol, the "http"
1021   scheme is specific to TCP-based services because the name delegation
1022   process depends on TCP for establishing authority.  An HTTP service
1023   based on some other underlying connection protocol would presumably
1024   be identified using a different URI scheme, just as the "https"
1025   scheme (below) is used for servers that require an SSL/TLS transport
1026   layer on a connection.  Other protocols might also be used to provide
1027   access to "http" identified resources -- it is only the authoritative
1028   interface used for mapping the namespace that is specific to TCP.
1029
1030   The URI generic syntax for authority also includes a deprecated
1031   userinfo subcomponent ([RFC3986], Section 3.2.1) for including user
1032   authentication information in the URI.  Some implementations make use
1033   of the userinfo component for internal configuration of
1034   authentication information, such as within command invocation
1035   options, configuration files, or bookmark lists, even though such
1036   usage might expose a user identifier or password.  Senders MUST NOT
1037   include a userinfo subcomponent (and its "@" delimiter) when
1038   transmitting an "http" URI in a message.  Recipients of HTTP messages
1039   that contain a URI reference SHOULD parse for the existence of
1040   userinfo and treat its presence as an error, likely indicating that
1041   the deprecated subcomponent is being used to obscure the authority
1042   for the sake of phishing attacks.
1043
10442.6.2.  https URI scheme
1045
1046   The "https" URI scheme is hereby defined for the purpose of minting
1047   identifiers according to their association with the hierarchical
1048   namespace governed by a potential HTTP origin server listening for
1049   SSL/TLS-secured connections on a given TCP port.
1050
1051   All of the requirements listed above for the "http" scheme are also
1052   requirements for the "https" scheme, except that a default TCP port
1053   of 443 is assumed if the port subcomponent is empty or not given, and
1054   the TCP connection MUST be secured for privacy through the use of
1055   strong encryption prior to sending the first HTTP request.
1056
1057     https-URI = "https:" "//" authority path-abempty [ "?" query ]
1058
1059   Unlike the "http" scheme, responses to "https" identified requests
1060
1061
1062
1063Fielding, et al.        Expires October 20, 2011               [Page 19]
1064
1065Internet-Draft              HTTP/1.1, Part 1                  April 2011
1066
1067
1068   are never "public" and thus MUST NOT be reused for shared caching.
1069   They can, however, be reused in a private cache if the message is
1070   cacheable by default in HTTP or specifically indicated as such by the
1071   Cache-Control header field (Section 3.2 of [Part6]).
1072
1073   Resources made available via the "https" scheme have no shared
1074   identity with the "http" scheme even if their resource identifiers
1075   indicate the same authority (the same host listening to the same TCP
1076   port).  They are distinct name spaces and are considered to be
1077   distinct origin servers.  However, an extension to HTTP that is
1078   defined to apply to entire host domains, such as the Cookie protocol
1079   [draft-ietf-httpstate-cookie], can allow information set by one
1080   service to impact communication with other services within a matching
1081   group of host domains.
1082
1083   The process for authoritative access to an "https" identified
1084   resource is defined in [RFC2818].
1085
10862.6.3.  http and https URI Normalization and Comparison
1087
1088   Since the "http" and "https" schemes conform to the URI generic
1089   syntax, such URIs are normalized and compared according to the
1090   algorithm defined in [RFC3986], Section 6, using the defaults
1091   described above for each scheme.
1092
1093   If the port is equal to the default port for a scheme, the normal
1094   form is to elide the port subcomponent.  Likewise, an empty path
1095   component is equivalent to an absolute path of "/", so the normal
1096   form is to provide a path of "/" instead.  The scheme and host are
1097   case-insensitive and normally provided in lowercase; all other
1098   components are compared in a case-sensitive manner.  Characters other
1099   than those in the "reserved" set are equivalent to their percent-
1100   encoded octets (see [RFC3986], Section 2.1): the normal form is to
1101   not encode them.
1102
1103   For example, the following three URIs are equivalent:
1104
1105      http://example.com:80/~smith/home.html
1106      http://EXAMPLE.com/%7Esmith/home.html
1107      http://EXAMPLE.com:/%7esmith/home.html
1108
11093.  Message Format
1110
1111   All HTTP/1.1 messages consist of a start-line followed by a sequence
1112   of octets in a format similar to the Internet Message Format
1113   [RFC5322]: zero or more header fields (collectively referred to as
1114   the "headers" or the "header section"), an empty line indicating the
1115   end of the header section, and an optional message-body.
1116
1117
1118
1119Fielding, et al.        Expires October 20, 2011               [Page 20]
1120
1121Internet-Draft              HTTP/1.1, Part 1                  April 2011
1122
1123
1124   An HTTP message can either be a request from client to server or a
1125   response from server to client.  Syntactically, the two types of
1126   message differ only in the start-line, which is either a Request-Line
1127   (for requests) or a Status-Line (for responses), and in the algorithm
1128   for determining the length of the message-body (Section 3.3).  In
1129   theory, a client could receive requests and a server could receive
1130   responses, distinguishing them by their different start-line formats,
1131   but in practice servers are implemented to only expect a request (a
1132   response is interpreted as an unknown or invalid request method) and
1133   clients are implemented to only expect a response.
1134
1135     HTTP-message    = start-line
1136                       *( header-field CRLF )
1137                       CRLF
1138                       [ message-body ]
1139     start-line      = Request-Line / Status-Line
1140
1141   Implementations MUST NOT send whitespace between the start-line and
1142   the first header field.  The presence of such whitespace in a request
1143   might be an attempt to trick a server into ignoring that field or
1144   processing the line after it as a new request, either of which might
1145   result in a security vulnerability if other implementations within
1146   the request chain interpret the same message differently.  Likewise,
1147   the presence of such whitespace in a response might be ignored by
1148   some clients or cause others to cease parsing.
1149
11503.1.  Message Parsing Robustness
1151
1152   In the interest of robustness, servers SHOULD ignore at least one
1153   empty line received where a Request-Line is expected.  In other
1154   words, if the server is reading the protocol stream at the beginning
1155   of a message and receives a CRLF first, it SHOULD ignore the CRLF.
1156
1157   Some old HTTP/1.0 client implementations send an extra CRLF after a
1158   POST request as a lame workaround for some early server applications
1159   that failed to read message-body content that was not terminated by a
1160   line-ending.  An HTTP/1.1 client MUST NOT preface or follow a request
1161   with an extra CRLF.  If terminating the request message-body with a
1162   line-ending is desired, then the client MUST include the terminating
1163   CRLF octets as part of the message-body length.
1164
1165   When a server listening only for HTTP request messages, or processing
1166   what appears from the start-line to be an HTTP request message,
1167   receives a sequence of octets that does not match the HTTP-message
1168   grammar aside from the robustness exceptions listed above, the server
1169   MUST respond with an HTTP/1.1 400 (Bad Request) response.
1170
1171   The normal procedure for parsing an HTTP message is to read the
1172
1173
1174
1175Fielding, et al.        Expires October 20, 2011               [Page 21]
1176
1177Internet-Draft              HTTP/1.1, Part 1                  April 2011
1178
1179
1180   start-line into a structure, read each header field into a hash table
1181   by field name until the empty line, and then use the parsed data to
1182   determine if a message-body is expected.  If a message-body has been
1183   indicated, then it is read as a stream until an amount of octets
1184   equal to the message-body length is read or the connection is closed.
1185   Care must be taken to parse an HTTP message as a sequence of octets
1186   in an encoding that is a superset of US-ASCII.  Attempting to parse
1187   HTTP as a stream of Unicode characters in a character encoding like
1188   UTF-16 might introduce security flaws due to the differing ways that
1189   such parsers interpret invalid characters.
1190
1191   HTTP allows the set of defined header fields to be extended without
1192   changing the protocol version (see Section 10.1).  Unrecognized
1193   header fields MUST be forwarded by a proxy unless the proxy is
1194   specifically configured to block or otherwise transform such fields.
1195   Unrecognized header fields SHOULD be ignored by other recipients.
1196
11973.2.  Header Fields
1198
1199   Each HTTP header field consists of a case-insensitive field name
1200   followed by a colon (":"), optional whitespace, and the field value.
1201
1202     header-field   = field-name ":" OWS [ field-value ] OWS
1203     field-name     = token
1204     field-value    = *( field-content / OWS )
1205     field-content  = *( WSP / VCHAR / obs-text )
1206
1207   No whitespace is allowed between the header field name and colon.
1208   For security reasons, any request message received containing such
1209   whitespace MUST be rejected with a response code of 400 (Bad
1210   Request).  A proxy MUST remove any such whitespace from a response
1211   message before forwarding the message downstream.
1212
1213   A field value MAY be preceded by optional whitespace (OWS); a single
1214   SP is preferred.  The field value does not include any leading or
1215   trailing white space: OWS occurring before the first non-whitespace
1216   octet of the field value or after the last non-whitespace octet of
1217   the field value is ignored and SHOULD be removed before further
1218   processing (as this does not change the meaning of the header field).
1219
1220   The order in which header fields with differing field names are
1221   received is not significant.  However, it is "good practice" to send
1222   header fields that contain control data first, such as Host on
1223   requests and Date on responses, so that implementations can decide
1224   when not to handle a message as early as possible.  A server MUST
1225   wait until the entire header section is received before interpreting
1226   a request message, since later header fields might include
1227   conditionals, authentication credentials, or deliberately misleading
1228
1229
1230
1231Fielding, et al.        Expires October 20, 2011               [Page 22]
1232
1233Internet-Draft              HTTP/1.1, Part 1                  April 2011
1234
1235
1236   duplicate header fields that would impact request processing.
1237
1238   Multiple header fields with the same field name MUST NOT be sent in a
1239   message unless the entire field value for that header field is
1240   defined as a comma-separated list [i.e., #(values)].  Multiple header
1241   fields with the same field name can be combined into one "field-name:
1242   field-value" pair, without changing the semantics of the message, by
1243   appending each subsequent field value to the combined field value in
1244   order, separated by a comma.  The order in which header fields with
1245   the same field name are received is therefore significant to the
1246   interpretation of the combined field value; a proxy MUST NOT change
1247   the order of these field values when forwarding a message.
1248
1249      Note: The "Set-Cookie" header field as implemented in practice can
1250      occur multiple times, but does not use the list syntax, and thus
1251      cannot be combined into a single line
1252      ([draft-ietf-httpstate-cookie]).  (See Appendix A.2.3 of [Kri2001]
1253      for details.)  Also note that the Set-Cookie2 header field
1254      specified in [RFC2965] does not share this problem.
1255
1256   Historically, HTTP header field values could be extended over
1257   multiple lines by preceding each extra line with at least one space
1258   or horizontal tab octet (line folding).  This specification
1259   deprecates such line folding except within the message/http media
1260   type (Section 10.3.1).  HTTP/1.1 senders MUST NOT produce messages
1261   that include line folding (i.e., that contain any field-content that
1262   matches the obs-fold rule) unless the message is intended for
1263   packaging within the message/http media type.  HTTP/1.1 recipients
1264   SHOULD accept line folding and replace any embedded obs-fold
1265   whitespace with a single SP prior to interpreting the field value or
1266   forwarding the message downstream.
1267
1268   Historically, HTTP has allowed field content with text in the ISO-
1269   8859-1 [ISO-8859-1] character encoding and supported other character
1270   sets only through use of [RFC2047] encoding.  In practice, most HTTP
1271   header field values use only a subset of the US-ASCII character
1272   encoding [USASCII].  Newly defined header fields SHOULD limit their
1273   field values to US-ASCII octets.  Recipients SHOULD treat other (obs-
1274   text) octets in field content as opaque data.
1275
1276   Comments can be included in some HTTP header fields by surrounding
1277   the comment text with parentheses.  Comments are only allowed in
1278   fields containing "comment" as part of their field value definition.
1279
1280     comment        = "(" *( ctext / quoted-cpair / comment ) ")"
1281     ctext          = OWS / %x21-27 / %x2A-5B / %x5D-7E / obs-text
1282                    ; OWS / <VCHAR except "(", ")", and "\"> / obs-text
1283
1284
1285
1286
1287Fielding, et al.        Expires October 20, 2011               [Page 23]
1288
1289Internet-Draft              HTTP/1.1, Part 1                  April 2011
1290
1291
1292   The backslash octet ("\") can be used as a single-octet quoting
1293   mechanism within comment constructs:
1294
1295     quoted-cpair    = "\" ( WSP / VCHAR / obs-text )
1296
1297   Senders SHOULD NOT escape octets that do not require escaping (i.e.,
1298   other than the backslash octet "\" and the parentheses "(" and ")").
1299
13003.3.  Message Body
1301
1302   The message-body (if any) of an HTTP message is used to carry the
1303   payload body associated with the request or response.
1304
1305     message-body = *OCTET
1306
1307   The message-body differs from the payload body only when a transfer-
1308   coding has been applied, as indicated by the Transfer-Encoding header
1309   field (Section 9.7).  If more than one Transfer-Encoding header field
1310   is present in a message, the multiple field-values MUST be combined
1311   into one field-value, according to the algorithm defined in
1312   Section 3.2, before determining the message-body length.
1313
1314   When one or more transfer-codings are applied to a payload in order
1315   to form the message-body, the Transfer-Encoding header field MUST
1316   contain the list of transfer-codings applied.  Transfer-Encoding is a
1317   property of the message, not of the payload, and thus MAY be added or
1318   removed by any implementation along the request/response chain under
1319   the constraints found in Section 6.2.
1320
1321   If a message is received that has multiple Content-Length header
1322   fields (Section 9.2) with field-values consisting of the same decimal
1323   value, or a single Content-Length header field with a field value
1324   containing a list of identical decimal values (e.g., "Content-Length:
1325   42, 42"), indicating that duplicate Content-Length header fields have
1326   been generated or combined by an upstream message processor, then the
1327   recipient MUST either reject the message as invalid or replace the
1328   duplicated field-values with a single valid Content-Length field
1329   containing that decimal value prior to determining the message-body
1330   length.
1331
1332   The rules for when a message-body is allowed in a message differ for
1333   requests and responses.
1334
1335   The presence of a message-body in a request is signaled by the
1336   inclusion of a Content-Length or Transfer-Encoding header field in
1337   the request's header fields, even if the request method does not
1338   define any use for a message-body.  This allows the request message
1339   framing algorithm to be independent of method semantics.
1340
1341
1342
1343Fielding, et al.        Expires October 20, 2011               [Page 24]
1344
1345Internet-Draft              HTTP/1.1, Part 1                  April 2011
1346
1347
1348   For response messages, whether or not a message-body is included with
1349   a message is dependent on both the request method and the response
1350   status code (Section 5.1.1).  Responses to the HEAD request method
1351   never include a message-body because the associated response header
1352   fields (e.g., Transfer-Encoding, Content-Length, etc.) only indicate
1353   what their values would have been if the request method had been GET.
1354   All 1xx (Informational), 204 (No Content), and 304 (Not Modified)
1355   responses MUST NOT include a message-body.  All other responses do
1356   include a message-body, although the body MAY be of zero length.
1357
1358   The length of the message-body is determined by one of the following
1359   (in order of precedence):
1360
1361   1.  Any response to a HEAD request and any response with a status
1362       code of 100-199, 204, or 304 is always terminated by the first
1363       empty line after the header fields, regardless of the header
1364       fields present in the message, and thus cannot contain a message-
1365       body.
1366
1367   2.  If a Transfer-Encoding header field is present and the "chunked"
1368       transfer-coding (Section 6.2) is the final encoding, the message-
1369       body length is determined by reading and decoding the chunked
1370       data until the transfer-coding indicates the data is complete.
1371
1372       If a Transfer-Encoding header field is present in a response and
1373       the "chunked" transfer-coding is not the final encoding, the
1374       message-body length is determined by reading the connection until
1375       it is closed by the server.  If a Transfer-Encoding header field
1376       is present in a request and the "chunked" transfer-coding is not
1377       the final encoding, the message-body length cannot be determined
1378       reliably; the server MUST respond with the 400 (Bad Request)
1379       status code and then close the connection.
1380
1381       If a message is received with both a Transfer-Encoding header
1382       field and a Content-Length header field, the Transfer-Encoding
1383       overrides the Content-Length.  Such a message might indicate an
1384       attempt to perform request or response smuggling (bypass of
1385       security-related checks on message routing or content) and thus
1386       ought to be handled as an error.  The provided Content-Length
1387       MUST be removed, prior to forwarding the message downstream, or
1388       replaced with the real message-body length after the transfer-
1389       coding is decoded.
1390
1391   3.  If a message is received without Transfer-Encoding and with
1392       either multiple Content-Length header fields having differing
1393       field-values or a single Content-Length header field having an
1394       invalid value, then the message framing is invalid and MUST be
1395       treated as an error to prevent request or response smuggling.  If
1396
1397
1398
1399Fielding, et al.        Expires October 20, 2011               [Page 25]
1400
1401Internet-Draft              HTTP/1.1, Part 1                  April 2011
1402
1403
1404       this is a request message, the server MUST respond with a 400
1405       (Bad Request) status code and then close the connection.  If this
1406       is a response message received by a proxy, the proxy MUST discard
1407       the received response, send a 502 (Bad Gateway) status code as
1408       its downstream response, and then close the connection.  If this
1409       is a response message received by a user-agent, it MUST be
1410       treated as an error by discarding the message and closing the
1411       connection.
1412
1413   4.  If a valid Content-Length header field is present without
1414       Transfer-Encoding, its decimal value defines the message-body
1415       length in octets.  If the actual number of octets sent in the
1416       message is less than the indicated Content-Length, the recipient
1417       MUST consider the message to be incomplete and treat the
1418       connection as no longer usable.  If the actual number of octets
1419       sent in the message is more than the indicated Content-Length,
1420       the recipient MUST only process the message-body up to the field
1421       value's number of octets; the remainder of the message MUST
1422       either be discarded or treated as the next message in a pipeline.
1423       For the sake of robustness, a user-agent MAY attempt to detect
1424       and correct such an error in message framing if it is parsing the
1425       response to the last request on on a connection and the
1426       connection has been closed by the server.
1427
1428   5.  If this is a request message and none of the above are true, then
1429       the message-body length is zero (no message-body is present).
1430
1431   6.  Otherwise, this is a response message without a declared message-
1432       body length, so the message-body length is determined by the
1433       number of octets received prior to the server closing the
1434       connection.
1435
1436   Since there is no way to distinguish a successfully completed, close-
1437   delimited message from a partially-received message interrupted by
1438   network failure, implementations SHOULD use encoding or length-
1439   delimited messages whenever possible.  The close-delimiting feature
1440   exists primarily for backwards compatibility with HTTP/1.0.
1441
1442   A server MAY reject a request that contains a message-body but not a
1443   Content-Length by responding with 411 (Length Required).
1444
1445   Unless a transfer-coding other than "chunked" has been applied, a
1446   client that sends a request containing a message-body SHOULD use a
1447   valid Content-Length header field if the message-body length is known
1448   in advance, rather than the "chunked" encoding, since some existing
1449   services respond to "chunked" with a 411 (Length Required) status
1450   code even though they understand the chunked encoding.  This is
1451   typically because such services are implemented via a gateway that
1452
1453
1454
1455Fielding, et al.        Expires October 20, 2011               [Page 26]
1456
1457Internet-Draft              HTTP/1.1, Part 1                  April 2011
1458
1459
1460   requires a content-length in advance of being called and the server
1461   is unable or unwilling to buffer the entire request before
1462   processing.
1463
1464   A client that sends a request containing a message-body MUST include
1465   a valid Content-Length header field if it does not know the server
1466   will handle HTTP/1.1 (or later) requests; such knowledge can be in
1467   the form of specific user configuration or by remembering the version
1468   of a prior received response.
1469
1470   Request messages that are prematurely terminated, possibly due to a
1471   cancelled connection or a server-imposed time-out exception, MUST
1472   result in closure of the connection; sending an HTTP/1.1 error
1473   response prior to closing the connection is OPTIONAL.  Response
1474   messages that are prematurely terminated, usually by closure of the
1475   connection prior to receiving the expected number of octets or by
1476   failure to decode a transfer-encoded message-body, MUST be recorded
1477   as incomplete.  A user agent MUST NOT render an incomplete response
1478   message-body as if it were complete (i.e., some indication must be
1479   given to the user that an error occurred).  Cache requirements for
1480   incomplete responses are defined in Section 2.1.1 of [Part6].
1481
1482   A server MUST read the entire request message-body or close the
1483   connection after sending its response, since otherwise the remaining
1484   data on a persistent connection would be misinterpreted as the next
1485   request.  Likewise, a client MUST read the entire response message-
1486   body if it intends to reuse the same connection for a subsequent
1487   request.  Pipelining multiple requests on a connection is described
1488   in Section 7.1.2.2.
1489
14903.4.  General Header Fields
1491
1492   There are a few header fields which have general applicability for
1493   both request and response messages, but which do not apply to the
1494   payload being transferred.  These header fields apply only to the
1495   message being transmitted.
1496
1497   +-------------------+---------------+
1498   | Header Field Name | Defined in... |
1499   +-------------------+---------------+
1500   | Connection        | Section 9.1   |
1501   | Date              | Section 9.3   |
1502   | Trailer           | Section 9.6   |
1503   | Transfer-Encoding | Section 9.7   |
1504   | Upgrade           | Section 9.8   |
1505   | Via               | Section 9.9   |
1506   +-------------------+---------------+
1507
1508
1509
1510
1511Fielding, et al.        Expires October 20, 2011               [Page 27]
1512
1513Internet-Draft              HTTP/1.1, Part 1                  April 2011
1514
1515
15164.  Request
1517
1518   A request message from a client to a server begins with a Request-
1519   Line, followed by zero or more header fields, an empty line
1520   signifying the end of the header block, and an optional message body.
1521
1522     Request       = Request-Line              ; Section 4.1
1523                     *( header-field CRLF )    ; Section 3.2
1524                     CRLF
1525                     [ message-body ]          ; Section 3.3
1526
15274.1.  Request-Line
1528
1529   The Request-Line begins with a method token, followed by a single
1530   space (SP), the request-target, another single space (SP), the
1531   protocol version, and ending with CRLF.
1532
1533     Request-Line   = Method SP request-target SP HTTP-Version CRLF
1534
15354.1.1.  Method
1536
1537   The Method token indicates the request method to be performed on the
1538   target resource.  The request method is case-sensitive.
1539
1540     Method         = token
1541
15424.1.2.  request-target
1543
1544   The request-target identifies the target resource upon which to apply
1545   the request.  In most cases, the user agent is provided a URI
1546   reference from which it determines an absolute URI for identifying
1547   the target resource.  When a request to the resource is initiated,
1548   all or part of that URI is used to construct the HTTP request-target.
1549
1550     request-target = "*"
1551                    / absolute-URI
1552                    / ( path-absolute [ "?" query ] )
1553                    / authority
1554
1555   The four options for request-target are dependent on the nature of
1556   the request.
1557
1558   The asterisk "*" form of request-target, which MUST NOT be used with
1559   any request method other than OPTIONS, means that the request applies
1560   to the server as a whole (the listening process) rather than to a
1561   specific named resource at that server.  For example,
1562
1563     OPTIONS * HTTP/1.1
1564
1565
1566
1567Fielding, et al.        Expires October 20, 2011               [Page 28]
1568
1569Internet-Draft              HTTP/1.1, Part 1                  April 2011
1570
1571
1572   The "absolute-URI" form is REQUIRED when the request is being made to
1573   a proxy.  The proxy is requested to either forward the request or
1574   service it from a valid cache, and then return the response.  Note
1575   that the proxy MAY forward the request on to another proxy or
1576   directly to the server specified by the absolute-URI.  In order to
1577   avoid request loops, a proxy that forwards requests to other proxies
1578   MUST be able to recognize and exclude all of its own server names,
1579   including any aliases, local variations, and the numeric IP address.
1580   An example Request-Line would be:
1581
1582     GET http://www.example.org/pub/WWW/TheProject.html HTTP/1.1
1583
1584   To allow for transition to absolute-URIs in all requests in future
1585   versions of HTTP, all HTTP/1.1 servers MUST accept the absolute-URI
1586   form in requests, even though HTTP/1.1 clients will only generate
1587   them in requests to proxies.
1588
1589   If a proxy receives a host name that is not a fully qualified domain
1590   name, it MAY add its domain to the host name it received.  If a proxy
1591   receives a fully qualified domain name, the proxy MUST NOT change the
1592   host name.
1593
1594   The "authority form" is only used by the CONNECT request method
1595   (Section 7.9 of [Part2]).
1596
1597   The most common form of request-target is that used when making a
1598   request to an origin server ("origin form").  In this case, the
1599   absolute path and query components of the URI MUST be transmitted as
1600   the request-target, and the authority component MUST be transmitted
1601   in a Host header field.  For example, a client wishing to retrieve a
1602   representation of the resource, as identified above, directly from
1603   the origin server would open (or reuse) a TCP connection to port 80
1604   of the host "www.example.org" and send the lines:
1605
1606     GET /pub/WWW/TheProject.html HTTP/1.1
1607     Host: www.example.org
1608
1609   followed by the remainder of the Request.  Note that the origin form
1610   of request-target always starts with an absolute path; if the target
1611   resource's URI path is empty, then an absolute path of "/" MUST be
1612   provided in the request-target.
1613
1614   If a proxy receives an OPTIONS request with an absolute-URI form of
1615   request-target in which the URI has an empty path and no query
1616   component, then the last proxy on the request chain MUST use a
1617   request-target of "*" when it forwards the request to the indicated
1618   origin server.
1619
1620
1621
1622
1623Fielding, et al.        Expires October 20, 2011               [Page 29]
1624
1625Internet-Draft              HTTP/1.1, Part 1                  April 2011
1626
1627
1628   For example, the request
1629
1630     OPTIONS http://www.example.org:8001 HTTP/1.1
1631
1632   would be forwarded by the final proxy as
1633
1634     OPTIONS * HTTP/1.1
1635     Host: www.example.org:8001
1636
1637   after connecting to port 8001 of host "www.example.org".
1638
1639   The request-target is transmitted in the format specified in
1640   Section 2.6.1.  If the request-target is percent-encoded ([RFC3986],
1641   Section 2.1), the origin server MUST decode the request-target in
1642   order to properly interpret the request.  Servers SHOULD respond to
1643   invalid request-targets with an appropriate status code.
1644
1645   A non-transforming proxy MUST NOT rewrite the "path-absolute" part of
1646   the received request-target when forwarding it to the next inbound
1647   server, except as noted above to replace a null path-absolute with
1648   "/" or "*".
1649
1650      Note: The "no rewrite" rule prevents the proxy from changing the
1651      meaning of the request when the origin server is improperly using
1652      a non-reserved URI character for a reserved purpose.  Implementors
1653      need to be aware that some pre-HTTP/1.1 proxies have been known to
1654      rewrite the request-target.
1655
1656   HTTP does not place a pre-defined limit on the length of a request-
1657   target.  A server MUST be prepared to receive URIs of unbounded
1658   length and respond with the 414 (URI Too Long) status code if the
1659   received request-target would be longer than the server wishes to
1660   handle (see Section 8.4.15 of [Part2]).
1661
1662   Various ad-hoc limitations on request-target length are found in
1663   practice.  It is RECOMMENDED that all HTTP senders and recipients
1664   support request-target lengths of 8000 or more octets.
1665
1666      Note: Fragments ([RFC3986], Section 3.5) are not part of the
1667      request-target and thus will not be transmitted in an HTTP
1668      request.
1669
16704.2.  The Resource Identified by a Request
1671
1672   The exact resource identified by an Internet request is determined by
1673   examining both the request-target and the Host header field.
1674
1675   An origin server that does not allow resources to differ by the
1676
1677
1678
1679Fielding, et al.        Expires October 20, 2011               [Page 30]
1680
1681Internet-Draft              HTTP/1.1, Part 1                  April 2011
1682
1683
1684   requested host MAY ignore the Host header field value when
1685   determining the resource identified by an HTTP/1.1 request.  (But see
1686   Appendix B.1.1 for other requirements on Host support in HTTP/1.1.)
1687
1688   An origin server that does differentiate resources based on the host
1689   requested (sometimes referred to as virtual hosts or vanity host
1690   names) MUST use the following rules for determining the requested
1691   resource on an HTTP/1.1 request:
1692
1693   1.  If request-target is an absolute-URI, the host is part of the
1694       request-target.  Any Host header field value in the request MUST
1695       be ignored.
1696
1697   2.  If the request-target is not an absolute-URI, and the request
1698       includes a Host header field, the host is determined by the Host
1699       header field value.
1700
1701   3.  If the host as determined by rule 1 or 2 is not a valid host on
1702       the server, the response MUST be a 400 (Bad Request) error
1703       message.
1704
1705   Recipients of an HTTP/1.0 request that lacks a Host header field MAY
1706   attempt to use heuristics (e.g., examination of the URI path for
1707   something unique to a particular host) in order to determine what
1708   exact resource is being requested.
1709
17104.3.  Effective Request URI
1711
1712   HTTP requests often do not carry the absolute URI ([RFC3986], Section
1713   4.3) for the target resource; instead, the URI needs to be inferred
1714   from the request-target, Host header field, and connection context.
1715   The result of this process is called the "effective request URI".
1716   The "target resource" is the resource identified by the effective
1717   request URI.
1718
1719   If the request-target is an absolute-URI, then the effective request
1720   URI is the request-target.
1721
1722   If the request-target uses the path-absolute form or the asterisk
1723   form, and the Host header field is present, then the effective
1724   request URI is constructed by concatenating
1725
1726   o  the scheme name: "http" if the request was received over an
1727      insecure TCP connection, or "https" when received over a SSL/
1728      TLS-secured TCP connection,
1729
1730   o  the octet sequence "://",
1731
1732
1733
1734
1735Fielding, et al.        Expires October 20, 2011               [Page 31]
1736
1737Internet-Draft              HTTP/1.1, Part 1                  April 2011
1738
1739
1740   o  the authority component, as specified in the Host header field
1741      (Section 9.4), and
1742
1743   o  the request-target obtained from the Request-Line, unless the
1744      request-target is just the asterisk "*".
1745
1746   If the request-target uses the path-absolute form or the asterisk
1747   form, and the Host header field is not present, then the effective
1748   request URI is undefined.
1749
1750   Otherwise, when request-target uses the authority form, the effective
1751   request URI is undefined.
1752
1753   Example 1: the effective request URI for the message
1754
1755     GET /pub/WWW/TheProject.html HTTP/1.1
1756     Host: www.example.org:8080
1757
1758   (received over an insecure TCP connection) is "http", plus "://",
1759   plus the authority component "www.example.org:8080", plus the
1760   request-target "/pub/WWW/TheProject.html", thus
1761   "http://www.example.org:8080/pub/WWW/TheProject.html".
1762
1763   Example 2: the effective request URI for the message
1764
1765     GET * HTTP/1.1
1766     Host: www.example.org
1767
1768   (received over an SSL/TLS secured TCP connection) is "https", plus
1769   "://", plus the authority component "www.example.org", thus
1770   "https://www.example.org".
1771
1772   Effective request URIs are compared using the rules described in
1773   Section 2.6.3, except that empty path components MUST NOT be treated
1774   as equivalent to an absolute path of "/".
1775
17765.  Response
1777
1778   After receiving and interpreting a request message, a server responds
1779   with an HTTP response message.
1780
1781     Response      = Status-Line               ; Section 5.1
1782                     *( header-field CRLF )    ; Section 3.2
1783                     CRLF
1784                     [ message-body ]          ; Section 3.3
1785
1786
1787
1788
1789
1790
1791Fielding, et al.        Expires October 20, 2011               [Page 32]
1792
1793Internet-Draft              HTTP/1.1, Part 1                  April 2011
1794
1795
17965.1.  Status-Line
1797
1798   The first line of a Response message is the Status-Line, consisting
1799   of the protocol version, a space (SP), the status code, another
1800   space, a possibly-empty textual phrase describing the status code,
1801   and ending with CRLF.
1802
1803     Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
1804
18055.1.1.  Status Code and Reason Phrase
1806
1807   The Status-Code element is a 3-digit integer result code of the
1808   attempt to understand and satisfy the request.  These codes are fully
1809   defined in Section 8 of [Part2].  The Reason Phrase exists for the
1810   sole purpose of providing a textual description associated with the
1811   numeric status code, out of deference to earlier Internet application
1812   protocols that were more frequently used with interactive text
1813   clients.  A client SHOULD ignore the content of the Reason Phrase.
1814
1815   The first digit of the Status-Code defines the class of response.
1816   The last two digits do not have any categorization role.  There are 5
1817   values for the first digit:
1818
1819   o  1xx: Informational - Request received, continuing process
1820
1821   o  2xx: Success - The action was successfully received, understood,
1822      and accepted
1823
1824   o  3xx: Redirection - Further action must be taken in order to
1825      complete the request
1826
1827   o  4xx: Client Error - The request contains bad syntax or cannot be
1828      fulfilled
1829
1830   o  5xx: Server Error - The server failed to fulfill an apparently
1831      valid request
1832
1833
1834     Status-Code    = 3DIGIT
1835     Reason-Phrase  = *( WSP / VCHAR / obs-text )
1836
18376.  Protocol Parameters
1838
18396.1.  Date/Time Formats: Full Date
1840
1841   HTTP applications have historically allowed three different formats
1842   for date/time stamps.  However, the preferred format is a fixed-
1843   length subset of that defined by [RFC1123]:
1844
1845
1846
1847Fielding, et al.        Expires October 20, 2011               [Page 33]
1848
1849Internet-Draft              HTTP/1.1, Part 1                  April 2011
1850
1851
1852     Sun, 06 Nov 1994 08:49:37 GMT  ; RFC 1123
1853
1854   The other formats are described here only for compatibility with
1855   obsolete implementations.
1856
1857     Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format
1858     Sun Nov  6 08:49:37 1994       ; ANSI C's asctime() format
1859
1860   HTTP/1.1 clients and servers that parse a date value MUST accept all
1861   three formats (for compatibility with HTTP/1.0), though they MUST
1862   only generate the RFC 1123 format for representing HTTP-date values
1863   in header fields.  See Appendix A for further information.
1864
1865   All HTTP date/time stamps MUST be represented in Greenwich Mean Time
1866   (GMT), without exception.  For the purposes of HTTP, GMT is exactly
1867   equal to UTC (Coordinated Universal Time).  This is indicated in the
1868   first two formats by the inclusion of "GMT" as the three-letter
1869   abbreviation for time zone, and MUST be assumed when reading the
1870   asctime format.  HTTP-date is case sensitive and MUST NOT include
1871   additional whitespace beyond that specifically included as SP in the
1872   grammar.
1873
1874     HTTP-date    = rfc1123-date / obs-date
1875
1876   Preferred format:
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903Fielding, et al.        Expires October 20, 2011               [Page 34]
1904
1905Internet-Draft              HTTP/1.1, Part 1                  April 2011
1906
1907
1908     rfc1123-date = day-name "," SP date1 SP time-of-day SP GMT
1909     ; fixed length subset of the format defined in
1910     ; Section 5.2.14 of [RFC1123]
1911
1912     day-name     = %x4D.6F.6E ; "Mon", case-sensitive
1913                  / %x54.75.65 ; "Tue", case-sensitive
1914                  / %x57.65.64 ; "Wed", case-sensitive
1915                  / %x54.68.75 ; "Thu", case-sensitive
1916                  / %x46.72.69 ; "Fri", case-sensitive
1917                  / %x53.61.74 ; "Sat", case-sensitive
1918                  / %x53.75.6E ; "Sun", case-sensitive
1919
1920     date1        = day SP month SP year
1921                  ; e.g., 02 Jun 1982
1922
1923     day          = 2DIGIT
1924     month        = %x4A.61.6E ; "Jan", case-sensitive
1925                  / %x46.65.62 ; "Feb", case-sensitive
1926                  / %x4D.61.72 ; "Mar", case-sensitive
1927                  / %x41.70.72 ; "Apr", case-sensitive
1928                  / %x4D.61.79 ; "May", case-sensitive
1929                  / %x4A.75.6E ; "Jun", case-sensitive
1930                  / %x4A.75.6C ; "Jul", case-sensitive
1931                  / %x41.75.67 ; "Aug", case-sensitive
1932                  / %x53.65.70 ; "Sep", case-sensitive
1933                  / %x4F.63.74 ; "Oct", case-sensitive
1934                  / %x4E.6F.76 ; "Nov", case-sensitive
1935                  / %x44.65.63 ; "Dec", case-sensitive
1936     year         = 4DIGIT
1937
1938     GMT   = %x47.4D.54 ; "GMT", case-sensitive
1939
1940     time-of-day  = hour ":" minute ":" second
1941                    ; 00:00:00 - 23:59:59
1942
1943     hour         = 2DIGIT
1944     minute       = 2DIGIT
1945     second       = 2DIGIT
1946
1947   The semantics of day-name, day, month, year, and time-of-day are the
1948   same as those defined for the RFC 5322 constructs with the
1949   corresponding name ([RFC5322], Section 3.3).
1950
1951   Obsolete formats:
1952
1953     obs-date     = rfc850-date / asctime-date
1954
1955
1956
1957
1958
1959Fielding, et al.        Expires October 20, 2011               [Page 35]
1960
1961Internet-Draft              HTTP/1.1, Part 1                  April 2011
1962
1963
1964     rfc850-date  = day-name-l "," SP date2 SP time-of-day SP GMT
1965     date2        = day "-" month "-" 2DIGIT
1966                    ; day-month-year (e.g., 02-Jun-82)
1967
1968     day-name-l   = %x4D.6F.6E.64.61.79 ; "Monday", case-sensitive
1969            / %x54.75.65.73.64.61.79 ; "Tuesday", case-sensitive
1970            / %x57.65.64.6E.65.73.64.61.79 ; "Wednesday", case-sensitive
1971            / %x54.68.75.72.73.64.61.79 ; "Thursday", case-sensitive
1972            / %x46.72.69.64.61.79 ; "Friday", case-sensitive
1973            / %x53.61.74.75.72.64.61.79 ; "Saturday", case-sensitive
1974            / %x53.75.6E.64.61.79 ; "Sunday", case-sensitive
1975
1976
1977     asctime-date = day-name SP date3 SP time-of-day SP year
1978     date3        = month SP ( 2DIGIT / ( SP 1DIGIT ))
1979                    ; month day (e.g., Jun  2)
1980
1981      Note: Recipients of date values are encouraged to be robust in
1982      accepting date values that might have been sent by non-HTTP
1983      applications, as is sometimes the case when retrieving or posting
1984      messages via proxies/gateways to SMTP or NNTP.
1985
1986      Note: HTTP requirements for the date/time stamp format apply only
1987      to their usage within the protocol stream.  Clients and servers
1988      are not required to use these formats for user presentation,
1989      request logging, etc.
1990
19916.2.  Transfer Codings
1992
1993   Transfer-coding values are used to indicate an encoding
1994   transformation that has been, can be, or might need to be applied to
1995   a payload body in order to ensure "safe transport" through the
1996   network.  This differs from a content coding in that the transfer-
1997   coding is a property of the message rather than a property of the
1998   representation that is being transferred.
1999
2000     transfer-coding         = "chunked" ; Section 6.2.1
2001                             / "compress" ; Section 6.2.2.1
2002                             / "deflate" ; Section 6.2.2.2
2003                             / "gzip" ; Section 6.2.2.3
2004                             / transfer-extension
2005     transfer-extension      = token *( OWS ";" OWS transfer-parameter )
2006
2007   Parameters are in the form of attribute/value pairs.
2008
2009     transfer-parameter      = attribute BWS "=" BWS value
2010     attribute               = token
2011     value                   = word
2012
2013
2014
2015Fielding, et al.        Expires October 20, 2011               [Page 36]
2016
2017Internet-Draft              HTTP/1.1, Part 1                  April 2011
2018
2019
2020   All transfer-coding values are case-insensitive.  HTTP/1.1 uses
2021   transfer-coding values in the TE header field (Section 9.5) and in
2022   the Transfer-Encoding header field (Section 9.7).
2023
2024   Transfer-codings are analogous to the Content-Transfer-Encoding
2025   values of MIME, which were designed to enable safe transport of
2026   binary data over a 7-bit transport service ([RFC2045], Section 6).
2027   However, safe transport has a different focus for an 8bit-clean
2028   transfer protocol.  In HTTP, the only unsafe characteristic of
2029   message-bodies is the difficulty in determining the exact message
2030   body length (Section 3.3), or the desire to encrypt data over a
2031   shared transport.
2032
2033   A server that receives a request message with a transfer-coding it
2034   does not understand SHOULD respond with 501 (Not Implemented) and
2035   then close the connection.  A server MUST NOT send transfer-codings
2036   to an HTTP/1.0 client.
2037
20386.2.1.  Chunked Transfer Coding
2039
2040   The chunked encoding modifies the body of a message in order to
2041   transfer it as a series of chunks, each with its own size indicator,
2042   followed by an OPTIONAL trailer containing header fields.  This
2043   allows dynamically produced content to be transferred along with the
2044   information necessary for the recipient to verify that it has
2045   received the full message.
2046
2047     Chunked-Body   = *chunk
2048                      last-chunk
2049                      trailer-part
2050                      CRLF
2051
2052     chunk          = chunk-size *WSP [ chunk-ext ] CRLF
2053                      chunk-data CRLF
2054     chunk-size     = 1*HEXDIG
2055     last-chunk     = 1*("0") *WSP [ chunk-ext ] CRLF
2056
2057     chunk-ext      = *( ";" *WSP chunk-ext-name
2058                         [ "=" chunk-ext-val ] *WSP )
2059     chunk-ext-name = token
2060     chunk-ext-val  = token / quoted-str-nf
2061     chunk-data     = 1*OCTET ; a sequence of chunk-size octets
2062     trailer-part   = *( header-field CRLF )
2063
2064     quoted-str-nf  = DQUOTE *( qdtext-nf / quoted-pair ) DQUOTE
2065                    ; like quoted-string, but disallowing line folding
2066     qdtext-nf      = WSP / %x21 / %x23-5B / %x5D-7E / obs-text
2067                    ; WSP / <VCHAR except DQUOTE and "\"> / obs-text
2068
2069
2070
2071Fielding, et al.        Expires October 20, 2011               [Page 37]
2072
2073Internet-Draft              HTTP/1.1, Part 1                  April 2011
2074
2075
2076   The chunk-size field is a string of hex digits indicating the size of
2077   the chunk-data in octets.  The chunked encoding is ended by any chunk
2078   whose size is zero, followed by the trailer, which is terminated by
2079   an empty line.
2080
2081   The trailer allows the sender to include additional HTTP header
2082   fields at the end of the message.  The Trailer header field can be
2083   used to indicate which header fields are included in a trailer (see
2084   Section 9.6).
2085
2086   A server using chunked transfer-coding in a response MUST NOT use the
2087   trailer for any header fields unless at least one of the following is
2088   true:
2089
2090   1.  the request included a TE header field that indicates "trailers"
2091       is acceptable in the transfer-coding of the response, as
2092       described in Section 9.5; or,
2093
2094   2.  the trailer fields consist entirely of optional metadata, and the
2095       recipient could use the message (in a manner acceptable to the
2096       server where the field originated) without receiving it.  In
2097       other words, the server that generated the header (often but not
2098       always the origin server) is willing to accept the possibility
2099       that the trailer fields might be silently discarded along the
2100       path to the client.
2101
2102   This requirement prevents an interoperability failure when the
2103   message is being received by an HTTP/1.1 (or later) proxy and
2104   forwarded to an HTTP/1.0 recipient.  It avoids a situation where
2105   compliance with the protocol would have necessitated a possibly
2106   infinite buffer on the proxy.
2107
2108   A process for decoding the "chunked" transfer-coding can be
2109   represented in pseudo-code as:
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127Fielding, et al.        Expires October 20, 2011               [Page 38]
2128
2129Internet-Draft              HTTP/1.1, Part 1                  April 2011
2130
2131
2132     length := 0
2133     read chunk-size, chunk-ext (if any) and CRLF
2134     while (chunk-size > 0) {
2135        read chunk-data and CRLF
2136        append chunk-data to decoded-body
2137        length := length + chunk-size
2138        read chunk-size and CRLF
2139     }
2140     read header-field
2141     while (header-field not empty) {
2142        append header-field to existing header fields
2143        read header-field
2144     }
2145     Content-Length := length
2146     Remove "chunked" from Transfer-Encoding
2147
2148   All HTTP/1.1 applications MUST be able to receive and decode the
2149   "chunked" transfer-coding and MUST ignore chunk-ext extensions they
2150   do not understand.
2151
2152   Since "chunked" is the only transfer-coding required to be understood
2153   by HTTP/1.1 recipients, it plays a crucial role in delimiting
2154   messages on a persistent connection.  Whenever a transfer-coding is
2155   applied to a payload body in a request, the final transfer-coding
2156   applied MUST be "chunked".  If a transfer-coding is applied to a
2157   response payload body, then either the final transfer-coding applied
2158   MUST be "chunked" or the message MUST be terminated by closing the
2159   connection.  When the "chunked" transfer-coding is used, it MUST be
2160   the last transfer-coding applied to form the message-body.  The
2161   "chunked" transfer-coding MUST NOT be applied more than once in a
2162   message-body.
2163
21646.2.2.  Compression Codings
2165
2166   The codings defined below can be used to compress the payload of a
2167   message.
2168
2169      Note: Use of program names for the identification of encoding
2170      formats is not desirable and is discouraged for future encodings.
2171      Their use here is representative of historical practice, not good
2172      design.
2173
2174      Note: For compatibility with previous implementations of HTTP,
2175      applications SHOULD consider "x-gzip" and "x-compress" to be
2176      equivalent to "gzip" and "compress" respectively.
2177
2178
2179
2180
2181
2182
2183Fielding, et al.        Expires October 20, 2011               [Page 39]
2184
2185Internet-Draft              HTTP/1.1, Part 1                  April 2011
2186
2187
21886.2.2.1.  Compress Coding
2189
2190   The "compress" format is produced by the common UNIX file compression
2191   program "compress".  This format is an adaptive Lempel-Ziv-Welch
2192   coding (LZW).
2193
21946.2.2.2.  Deflate Coding
2195
2196   The "deflate" format is defined as the "deflate" compression
2197   mechanism (described in [RFC1951]) used inside the "zlib" data format
2198   ([RFC1950]).
2199
2200      Note: Some incorrect implementations send the "deflate" compressed
2201      data without the zlib wrapper.
2202
22036.2.2.3.  Gzip Coding
2204
2205   The "gzip" format is produced by the file compression program "gzip"
2206   (GNU zip), as described in [RFC1952].  This format is a Lempel-Ziv
2207   coding (LZ77) with a 32 bit CRC.
2208
22096.2.3.  Transfer Coding Registry
2210
2211   The HTTP Transfer Coding Registry defines the name space for the
2212   transfer coding names.
2213
2214   Registrations MUST include the following fields:
2215
2216   o  Name
2217
2218   o  Description
2219
2220   o  Pointer to specification text
2221
2222   Names of transfer codings MUST NOT overlap with names of content
2223   codings (Section 2.2 of [Part3]), unless the encoding transformation
2224   is identical (as it is the case for the compression codings defined
2225   in Section 6.2.2).
2226
2227   Values to be added to this name space require a specification (see
2228   "Specification Required" in Section 4.1 of [RFC5226]), and MUST
2229   conform to the purpose of transfer coding defined in this section.
2230
2231   The registry itself is maintained at
2232   <http://www.iana.org/assignments/http-parameters>.
2233
2234
2235
2236
2237
2238
2239Fielding, et al.        Expires October 20, 2011               [Page 40]
2240
2241Internet-Draft              HTTP/1.1, Part 1                  April 2011
2242
2243
22446.3.  Product Tokens
2245
2246   Product tokens are used to allow communicating applications to
2247   identify themselves by software name and version.  Most fields using
2248   product tokens also allow sub-products which form a significant part
2249   of the application to be listed, separated by whitespace.  By
2250   convention, the products are listed in order of their significance
2251   for identifying the application.
2252
2253     product         = token ["/" product-version]
2254     product-version = token
2255
2256   Examples:
2257
2258     User-Agent: CERN-LineMode/2.15 libwww/2.17b3
2259     Server: Apache/0.8.4
2260
2261   Product tokens SHOULD be short and to the point.  They MUST NOT be
2262   used for advertising or other non-essential information.  Although
2263   any token octet MAY appear in a product-version, this token SHOULD
2264   only be used for a version identifier (i.e., successive versions of
2265   the same product SHOULD only differ in the product-version portion of
2266   the product value).
2267
22686.4.  Quality Values
2269
2270   Both transfer codings (TE request header field, Section 9.5) and
2271   content negotiation (Section 5 of [Part3]) use short "floating point"
2272   numbers to indicate the relative importance ("weight") of various
2273   negotiable parameters.  A weight is normalized to a real number in
2274   the range 0 through 1, where 0 is the minimum and 1 the maximum
2275   value.  If a parameter has a quality value of 0, then content with
2276   this parameter is "not acceptable" for the client.  HTTP/1.1
2277   applications MUST NOT generate more than three digits after the
2278   decimal point.  User configuration of these values SHOULD also be
2279   limited in this fashion.
2280
2281     qvalue         = ( "0" [ "." 0*3DIGIT ] )
2282                    / ( "1" [ "." 0*3("0") ] )
2283
2284      Note: "Quality values" is a misnomer, since these values merely
2285      represent relative degradation in desired quality.
2286
22877.  Connections
2288
2289
2290
2291
2292
2293
2294
2295Fielding, et al.        Expires October 20, 2011               [Page 41]
2296
2297Internet-Draft              HTTP/1.1, Part 1                  April 2011
2298
2299
23007.1.  Persistent Connections
2301
23027.1.1.  Purpose
2303
2304   Prior to persistent connections, a separate TCP connection was
2305   established for each request, increasing the load on HTTP servers and
2306   causing congestion on the Internet.  The use of inline images and
2307   other associated data often requires a client to make multiple
2308   requests of the same server in a short amount of time.  Analysis of
2309   these performance problems and results from a prototype
2310   implementation are available [Pad1995] [Spe].  Implementation
2311   experience and measurements of actual HTTP/1.1 implementations show
2312   good results [Nie1997].  Alternatives have also been explored, for
2313   example, T/TCP [Tou1998].
2314
2315   Persistent HTTP connections have a number of advantages:
2316
2317   o  By opening and closing fewer TCP connections, CPU time is saved in
2318      routers and hosts (clients, servers, proxies, gateways, tunnels,
2319      or caches), and memory used for TCP protocol control blocks can be
2320      saved in hosts.
2321
2322   o  HTTP requests and responses can be pipelined on a connection.
2323      Pipelining allows a client to make multiple requests without
2324      waiting for each response, allowing a single TCP connection to be
2325      used much more efficiently, with much lower elapsed time.
2326
2327   o  Network congestion is reduced by reducing the number of packets
2328      caused by TCP opens, and by allowing TCP sufficient time to
2329      determine the congestion state of the network.
2330
2331   o  Latency on subsequent requests is reduced since there is no time
2332      spent in TCP's connection opening handshake.
2333
2334   o  HTTP can evolve more gracefully, since errors can be reported
2335      without the penalty of closing the TCP connection.  Clients using
2336      future versions of HTTP might optimistically try a new feature,
2337      but if communicating with an older server, retry with old
2338      semantics after an error is reported.
2339
2340   HTTP implementations SHOULD implement persistent connections.
2341
23427.1.2.  Overall Operation
2343
2344   A significant difference between HTTP/1.1 and earlier versions of
2345   HTTP is that persistent connections are the default behavior of any
2346   HTTP connection.  That is, unless otherwise indicated, the client
2347   SHOULD assume that the server will maintain a persistent connection,
2348
2349
2350
2351Fielding, et al.        Expires October 20, 2011               [Page 42]
2352
2353Internet-Draft              HTTP/1.1, Part 1                  April 2011
2354
2355
2356   even after error responses from the server.
2357
2358   Persistent connections provide a mechanism by which a client and a
2359   server can signal the close of a TCP connection.  This signaling
2360   takes place using the Connection header field (Section 9.1).  Once a
2361   close has been signaled, the client MUST NOT send any more requests
2362   on that connection.
2363
23647.1.2.1.  Negotiation
2365
2366   An HTTP/1.1 server MAY assume that a HTTP/1.1 client intends to
2367   maintain a persistent connection unless a Connection header field
2368   including the connection-token "close" was sent in the request.  If
2369   the server chooses to close the connection immediately after sending
2370   the response, it SHOULD send a Connection header field including the
2371   connection-token "close".
2372
2373   An HTTP/1.1 client MAY expect a connection to remain open, but would
2374   decide to keep it open based on whether the response from a server
2375   contains a Connection header field with the connection-token close.
2376   In case the client does not want to maintain a connection for more
2377   than that request, it SHOULD send a Connection header field including
2378   the connection-token close.
2379
2380   If either the client or the server sends the close token in the
2381   Connection header field, that request becomes the last one for the
2382   connection.
2383
2384   Clients and servers SHOULD NOT assume that a persistent connection is
2385   maintained for HTTP versions less than 1.1 unless it is explicitly
2386   signaled.  See Appendix B.1.2 for more information on backward
2387   compatibility with HTTP/1.0 clients.
2388
2389   In order to remain persistent, all messages on the connection MUST
2390   have a self-defined message length (i.e., one not defined by closure
2391   of the connection), as described in Section 3.3.
2392
23937.1.2.2.  Pipelining
2394
2395   A client that supports persistent connections MAY "pipeline" its
2396   requests (i.e., send multiple requests without waiting for each
2397   response).  A server MUST send its responses to those requests in the
2398   same order that the requests were received.
2399
2400   Clients which assume persistent connections and pipeline immediately
2401   after connection establishment SHOULD be prepared to retry their
2402   connection if the first pipelined attempt fails.  If a client does
2403   such a retry, it MUST NOT pipeline before it knows the connection is
2404
2405
2406
2407Fielding, et al.        Expires October 20, 2011               [Page 43]
2408
2409Internet-Draft              HTTP/1.1, Part 1                  April 2011
2410
2411
2412   persistent.  Clients MUST also be prepared to resend their requests
2413   if the server closes the connection before sending all of the
2414   corresponding responses.
2415
2416   Clients SHOULD NOT pipeline requests using non-idempotent request
2417   methods or non-idempotent sequences of request methods (see Section
2418   7.1.2 of [Part2]).  Otherwise, a premature termination of the
2419   transport connection could lead to indeterminate results.  A client
2420   wishing to send a non-idempotent request SHOULD wait to send that
2421   request until it has received the response status line for the
2422   previous request.
2423
24247.1.3.  Proxy Servers
2425
2426   It is especially important that proxies correctly implement the
2427   properties of the Connection header field as specified in
2428   Section 9.1.
2429
2430   The proxy server MUST signal persistent connections separately with
2431   its clients and the origin servers (or other proxy servers) that it
2432   connects to.  Each persistent connection applies to only one
2433   transport link.
2434
2435   A proxy server MUST NOT establish a HTTP/1.1 persistent connection
2436   with an HTTP/1.0 client (but see Section 19.7.1 of [RFC2068] for
2437   information and discussion of the problems with the Keep-Alive header
2438   field implemented by many HTTP/1.0 clients).
2439
24407.1.3.1.  End-to-end and Hop-by-hop Header Fields
2441
2442   For the purpose of defining the behavior of caches and non-caching
2443   proxies, we divide HTTP header fields into two categories:
2444
2445   o  End-to-end header fields, which are transmitted to the ultimate
2446      recipient of a request or response.  End-to-end header fields in
2447      responses MUST be stored as part of a cache entry and MUST be
2448      transmitted in any response formed from a cache entry.
2449
2450   o  Hop-by-hop header fields, which are meaningful only for a single
2451      transport-level connection, and are not stored by caches or
2452      forwarded by proxies.
2453
2454   The following HTTP/1.1 header fields are hop-by-hop header fields:
2455
2456   o  Connection
2457
2458   o  Keep-Alive
2459
2460
2461
2462
2463Fielding, et al.        Expires October 20, 2011               [Page 44]
2464
2465Internet-Draft              HTTP/1.1, Part 1                  April 2011
2466
2467
2468   o  Proxy-Authenticate
2469
2470   o  Proxy-Authorization
2471
2472   o  TE
2473
2474   o  Trailer
2475
2476   o  Transfer-Encoding
2477
2478   o  Upgrade
2479
2480   All other header fields defined by HTTP/1.1 are end-to-end header
2481   fields.
2482
2483   Other hop-by-hop header fields MUST be listed in a Connection header
2484   field (Section 9.1).
2485
24867.1.3.2.  Non-modifiable Header Fields
2487
2488   Some features of HTTP/1.1, such as Digest Authentication, depend on
2489   the value of certain end-to-end header fields.  A non-transforming
2490   proxy SHOULD NOT modify an end-to-end header field unless the
2491   definition of that header field requires or specifically allows that.
2492
2493   A non-transforming proxy MUST NOT modify any of the following fields
2494   in a request or response, and it MUST NOT add any of these fields if
2495   not already present:
2496
2497   o  Allow
2498
2499   o  Content-Location
2500
2501   o  Content-MD5
2502
2503   o  ETag
2504
2505   o  Last-Modified
2506
2507   o  Server
2508
2509   A non-transforming proxy MUST NOT modify any of the following fields
2510   in a response:
2511
2512   o  Expires
2513
2514   but it MAY add any of these fields if not already present.  If an
2515   Expires header field is added, it MUST be given a field-value
2516
2517
2518
2519Fielding, et al.        Expires October 20, 2011               [Page 45]
2520
2521Internet-Draft              HTTP/1.1, Part 1                  April 2011
2522
2523
2524   identical to that of the Date header field in that response.
2525
2526   A proxy MUST NOT modify or add any of the following fields in a
2527   message that contains the no-transform cache-control directive, or in
2528   any request:
2529
2530   o  Content-Encoding
2531
2532   o  Content-Range
2533
2534   o  Content-Type
2535
2536   A transforming proxy MAY modify or add these fields to a message that
2537   does not include no-transform, but if it does so, it MUST add a
2538   Warning 214 (Transformation applied) if one does not already appear
2539   in the message (see Section 3.6 of [Part6]).
2540
2541      Warning: Unnecessary modification of end-to-end header fields
2542      might cause authentication failures if stronger authentication
2543      mechanisms are introduced in later versions of HTTP.  Such
2544      authentication mechanisms MAY rely on the values of header fields
2545      not listed here.
2546
2547   A non-transforming proxy MUST preserve the message payload ([Part3]),
2548   though it MAY change the message-body through application or removal
2549   of a transfer-coding (Section 6.2).
2550
25517.1.4.  Practical Considerations
2552
2553   Servers will usually have some time-out value beyond which they will
2554   no longer maintain an inactive connection.  Proxy servers might make
2555   this a higher value since it is likely that the client will be making
2556   more connections through the same server.  The use of persistent
2557   connections places no requirements on the length (or existence) of
2558   this time-out for either the client or the server.
2559
2560   When a client or server wishes to time-out it SHOULD issue a graceful
2561   close on the transport connection.  Clients and servers SHOULD both
2562   constantly watch for the other side of the transport close, and
2563   respond to it as appropriate.  If a client or server does not detect
2564   the other side's close promptly it could cause unnecessary resource
2565   drain on the network.
2566
2567   A client, server, or proxy MAY close the transport connection at any
2568   time.  For example, a client might have started to send a new request
2569   at the same time that the server has decided to close the "idle"
2570   connection.  From the server's point of view, the connection is being
2571   closed while it was idle, but from the client's point of view, a
2572
2573
2574
2575Fielding, et al.        Expires October 20, 2011               [Page 46]
2576
2577Internet-Draft              HTTP/1.1, Part 1                  April 2011
2578
2579
2580   request is in progress.
2581
2582   This means that clients, servers, and proxies MUST be able to recover
2583   from asynchronous close events.  Client software SHOULD reopen the
2584   transport connection and retransmit the aborted sequence of requests
2585   without user interaction so long as the request sequence is
2586   idempotent (see Section 7.1.2 of [Part2]).  Non-idempotent request
2587   methods or sequences MUST NOT be automatically retried, although user
2588   agents MAY offer a human operator the choice of retrying the
2589   request(s).  Confirmation by user-agent software with semantic
2590   understanding of the application MAY substitute for user
2591   confirmation.  The automatic retry SHOULD NOT be repeated if the
2592   second sequence of requests fails.
2593
2594   Servers SHOULD always respond to at least one request per connection,
2595   if at all possible.  Servers SHOULD NOT close a connection in the
2596   middle of transmitting a response, unless a network or client failure
2597   is suspected.
2598
2599   Clients (including proxies) SHOULD limit the number of simultaneous
2600   connections that they maintain to a given server (including proxies).
2601
2602   Previous revisions of HTTP gave a specific number of connections as a
2603   ceiling, but this was found to be impractical for many applications.
2604   As a result, this specification does not mandate a particular maximum
2605   number of connections, but instead encourages clients to be
2606   conservative when opening multiple connections.
2607
2608   In particular, while using multiple connections avoids the "head-of-
2609   line blocking" problem (whereby a request that takes significant
2610   server-side processing and/or has a large payload can block
2611   subsequent requests on the same connection), each connection used
2612   consumes server resources (sometimes significantly), and furthermore
2613   using multiple connections can cause undesirable side effects in
2614   congested networks.
2615
2616   Note that servers might reject traffic that they deem abusive,
2617   including an excessive number of connections from a client.
2618
26197.2.  Message Transmission Requirements
2620
26217.2.1.  Persistent Connections and Flow Control
2622
2623   HTTP/1.1 servers SHOULD maintain persistent connections and use TCP's
2624   flow control mechanisms to resolve temporary overloads, rather than
2625   terminating connections with the expectation that clients will retry.
2626   The latter technique can exacerbate network congestion.
2627
2628
2629
2630
2631Fielding, et al.        Expires October 20, 2011               [Page 47]
2632
2633Internet-Draft              HTTP/1.1, Part 1                  April 2011
2634
2635
26367.2.2.  Monitoring Connections for Error Status Messages
2637
2638   An HTTP/1.1 (or later) client sending a message-body SHOULD monitor
2639   the network connection for an error status code while it is
2640   transmitting the request.  If the client sees an error status code,
2641   it SHOULD immediately cease transmitting the body.  If the body is
2642   being sent using a "chunked" encoding (Section 6.2), a zero length
2643   chunk and empty trailer MAY be used to prematurely mark the end of
2644   the message.  If the body was preceded by a Content-Length header
2645   field, the client MUST close the connection.
2646
26477.2.3.  Use of the 100 (Continue) Status
2648
2649   The purpose of the 100 (Continue) status code (see Section 8.1.1 of
2650   [Part2]) is to allow a client that is sending a request message with
2651   a request body to determine if the origin server is willing to accept
2652   the request (based on the request header fields) before the client
2653   sends the request body.  In some cases, it might either be
2654   inappropriate or highly inefficient for the client to send the body
2655   if the server will reject the message without looking at the body.
2656
2657   Requirements for HTTP/1.1 clients:
2658
2659   o  If a client will wait for a 100 (Continue) response before sending
2660      the request body, it MUST send an Expect header field (Section 9.2
2661      of [Part2]) with the "100-continue" expectation.
2662
2663   o  A client MUST NOT send an Expect header field (Section 9.2 of
2664      [Part2]) with the "100-continue" expectation if it does not intend
2665      to send a request body.
2666
2667   Because of the presence of older implementations, the protocol allows
2668   ambiguous situations in which a client might send "Expect: 100-
2669   continue" without receiving either a 417 (Expectation Failed) or a
2670   100 (Continue) status code.  Therefore, when a client sends this
2671   header field to an origin server (possibly via a proxy) from which it
2672   has never seen a 100 (Continue) status code, the client SHOULD NOT
2673   wait for an indefinite period before sending the request body.
2674
2675   Requirements for HTTP/1.1 origin servers:
2676
2677   o  Upon receiving a request which includes an Expect header field
2678      with the "100-continue" expectation, an origin server MUST either
2679      respond with 100 (Continue) status code and continue to read from
2680      the input stream, or respond with a final status code.  The origin
2681      server MUST NOT wait for the request body before sending the 100
2682      (Continue) response.  If it responds with a final status code, it
2683      MAY close the transport connection or it MAY continue to read and
2684
2685
2686
2687Fielding, et al.        Expires October 20, 2011               [Page 48]
2688
2689Internet-Draft              HTTP/1.1, Part 1                  April 2011
2690
2691
2692      discard the rest of the request.  It MUST NOT perform the request
2693      method if it returns a final status code.
2694
2695   o  An origin server SHOULD NOT send a 100 (Continue) response if the
2696      request message does not include an Expect header field with the
2697      "100-continue" expectation, and MUST NOT send a 100 (Continue)
2698      response if such a request comes from an HTTP/1.0 (or earlier)
2699      client.  There is an exception to this rule: for compatibility
2700      with [RFC2068], a server MAY send a 100 (Continue) status code in
2701      response to an HTTP/1.1 PUT or POST request that does not include
2702      an Expect header field with the "100-continue" expectation.  This
2703      exception, the purpose of which is to minimize any client
2704      processing delays associated with an undeclared wait for 100
2705      (Continue) status code, applies only to HTTP/1.1 requests, and not
2706      to requests with any other HTTP-version value.
2707
2708   o  An origin server MAY omit a 100 (Continue) response if it has
2709      already received some or all of the request body for the
2710      corresponding request.
2711
2712   o  An origin server that sends a 100 (Continue) response MUST
2713      ultimately send a final status code, once the request body is
2714      received and processed, unless it terminates the transport
2715      connection prematurely.
2716
2717   o  If an origin server receives a request that does not include an
2718      Expect header field with the "100-continue" expectation, the
2719      request includes a request body, and the server responds with a
2720      final status code before reading the entire request body from the
2721      transport connection, then the server SHOULD NOT close the
2722      transport connection until it has read the entire request, or
2723      until the client closes the connection.  Otherwise, the client
2724      might not reliably receive the response message.  However, this
2725      requirement is not be construed as preventing a server from
2726      defending itself against denial-of-service attacks, or from badly
2727      broken client implementations.
2728
2729   Requirements for HTTP/1.1 proxies:
2730
2731   o  If a proxy receives a request that includes an Expect header field
2732      with the "100-continue" expectation, and the proxy either knows
2733      that the next-hop server complies with HTTP/1.1 or higher, or does
2734      not know the HTTP version of the next-hop server, it MUST forward
2735      the request, including the Expect header field.
2736
2737   o  If the proxy knows that the version of the next-hop server is
2738      HTTP/1.0 or lower, it MUST NOT forward the request, and it MUST
2739      respond with a 417 (Expectation Failed) status code.
2740
2741
2742
2743Fielding, et al.        Expires October 20, 2011               [Page 49]
2744
2745Internet-Draft              HTTP/1.1, Part 1                  April 2011
2746
2747
2748   o  Proxies SHOULD maintain a cache recording the HTTP version numbers
2749      received from recently-referenced next-hop servers.
2750
2751   o  A proxy MUST NOT forward a 100 (Continue) response if the request
2752      message was received from an HTTP/1.0 (or earlier) client and did
2753      not include an Expect header field with the "100-continue"
2754      expectation.  This requirement overrides the general rule for
2755      forwarding of 1xx responses (see Section 8.1 of [Part2]).
2756
27577.2.4.  Client Behavior if Server Prematurely Closes Connection
2758
2759   If an HTTP/1.1 client sends a request which includes a request body,
2760   but which does not include an Expect header field with the "100-
2761   continue" expectation, and if the client is not directly connected to
2762   an HTTP/1.1 origin server, and if the client sees the connection
2763   close before receiving a status line from the server, the client
2764   SHOULD retry the request.  If the client does retry this request, it
2765   MAY use the following "binary exponential backoff" algorithm to be
2766   assured of obtaining a reliable response:
2767
2768   1.  Initiate a new connection to the server
2769
2770   2.  Transmit the request-line, header fields, and the CRLF that
2771       indicates the end of header fields.
2772
2773   3.  Initialize a variable R to the estimated round-trip time to the
2774       server (e.g., based on the time it took to establish the
2775       connection), or to a constant value of 5 seconds if the round-
2776       trip time is not available.
2777
2778   4.  Compute T = R * (2**N), where N is the number of previous retries
2779       of this request.
2780
2781   5.  Wait either for an error response from the server, or for T
2782       seconds (whichever comes first)
2783
2784   6.  If no error response is received, after T seconds transmit the
2785       body of the request.
2786
2787   7.  If client sees that the connection is closed prematurely, repeat
2788       from step 1 until the request is accepted, an error response is
2789       received, or the user becomes impatient and terminates the retry
2790       process.
2791
2792   If at any point an error status code is received, the client
2793
2794   o  SHOULD NOT continue and
2795
2796
2797
2798
2799Fielding, et al.        Expires October 20, 2011               [Page 50]
2800
2801Internet-Draft              HTTP/1.1, Part 1                  April 2011
2802
2803
2804   o  SHOULD close the connection if it has not completed sending the
2805      request message.
2806
28078.  Miscellaneous notes that might disappear
2808
28098.1.  Scheme aliases considered harmful
2810
2811   [[TBD-aliases-harmful: describe why aliases like webcal are
2812   harmful.]]
2813
28148.2.  Use of HTTP for proxy communication
2815
2816   [[TBD-proxy-other: Configured to use HTTP to proxy HTTP or other
2817   protocols.]]
2818
28198.3.  Interception of HTTP for access control
2820
2821   [[TBD-intercept: Interception of HTTP traffic for initiating access
2822   control.]]
2823
28248.4.  Use of HTTP by other protocols
2825
2826   [[TBD-profiles: Profiles of HTTP defined by other protocol.
2827   Extensions of HTTP like WebDAV.]]
2828
28298.5.  Use of HTTP by media type specification
2830
2831   [[TBD-hypertext: Instructions on composing HTTP requests via
2832   hypertext formats.]]
2833
28349.  Header Field Definitions
2835
2836   This section defines the syntax and semantics of HTTP header fields
2837   related to message framing and transport protocols.
2838
28399.1.  Connection
2840
2841   The "Connection" header field allows the sender to specify options
2842   that are desired only for that particular connection.  Such
2843   connection options MUST be removed or replaced before the message can
2844   be forwarded downstream by a proxy or gateway.  This mechanism also
2845   allows the sender to indicate which HTTP header fields used in the
2846   message are only intended for the immediate recipient ("hop-by-hop"),
2847   as opposed to all recipients on the chain ("end-to-end"), enabling
2848   the message to be self-descriptive and allowing future connection-
2849   specific extensions to be deployed in HTTP without fear that they
2850   will be blindly forwarded by previously deployed intermediaries.
2851
2852
2853
2854
2855Fielding, et al.        Expires October 20, 2011               [Page 51]
2856
2857Internet-Draft              HTTP/1.1, Part 1                  April 2011
2858
2859
2860   The Connection header field's value has the following grammar:
2861
2862     Connection       = 1#connection-token
2863     connection-token = token
2864
2865   A proxy or gateway MUST parse a received Connection header field
2866   before a message is forwarded and, for each connection-token in this
2867   field, remove any header field(s) from the message with the same name
2868   as the connection-token, and then remove the Connection header field
2869   itself or replace it with the sender's own connection options for the
2870   forwarded message.
2871
2872   A sender MUST NOT include field-names in the Connection header field-
2873   value for fields that are defined as expressing constraints for all
2874   recipients in the request or response chain, such as the Cache-
2875   Control header field (Section 3.2 of [Part6]).
2876
2877   The connection options do not have to correspond to a header field
2878   present in the message, since a connection-specific header field
2879   might not be needed if there are no parameters associated with that
2880   connection option.  Recipients that trigger certain connection
2881   behavior based on the presence of connection options MUST do so based
2882   on the presence of the connection-token rather than only the presence
2883   of the optional header field.  In other words, if the connection
2884   option is received as a header field but not indicated within the
2885   Connection field-value, then the recipient MUST ignore the
2886   connection-specific header field because it has likely been forwarded
2887   by an intermediary that is only partially compliant.
2888
2889   When defining new connection options, specifications ought to
2890   carefully consider existing deployed header fields and ensure that
2891   the new connection-token does not share the same name as an unrelated
2892   header field that might already be deployed.  Defining a new
2893   connection-token essentially reserves that potential field-name for
2894   carrying additional information related to the connection option,
2895   since it would be unwise for senders to use that field-name for
2896   anything else.
2897
2898   HTTP/1.1 defines the "close" connection option for the sender to
2899   signal that the connection will be closed after completion of the
2900   response.  For example,
2901
2902     Connection: close
2903
2904   in either the request or the response header fields indicates that
2905   the connection SHOULD NOT be considered "persistent" (Section 7.1)
2906   after the current request/response is complete.
2907
2908
2909
2910
2911Fielding, et al.        Expires October 20, 2011               [Page 52]
2912
2913Internet-Draft              HTTP/1.1, Part 1                  April 2011
2914
2915
2916   An HTTP/1.1 client that does not support persistent connections MUST
2917   include the "close" connection option in every request message.
2918
2919   An HTTP/1.1 server that does not support persistent connections MUST
2920   include the "close" connection option in every response message that
2921   does not have a 1xx (Informational) status code.
2922
29239.2.  Content-Length
2924
2925   The "Content-Length" header field indicates the size of the message-
2926   body, in decimal number of octets, for any message other than a
2927   response to a HEAD request or a response with a status code of 304.
2928   In the case of a response to a HEAD request, Content-Length indicates
2929   the size of the payload body (not including any potential transfer-
2930   coding) that would have been sent had the request been a GET.  In the
2931   case of a 304 (Not Modified) response to a GET request, Content-
2932   Length indicates the size of the payload body (not including any
2933   potential transfer-coding) that would have been sent in a 200 (OK)
2934   response.
2935
2936     Content-Length = 1*DIGIT
2937
2938   An example is
2939
2940     Content-Length: 3495
2941
2942   Implementations SHOULD use this field to indicate the message-body
2943   length when no transfer-coding is being applied and the payload's
2944   body length can be determined prior to being transferred.
2945   Section 3.3 describes how recipients determine the length of a
2946   message-body.
2947
2948   Any Content-Length greater than or equal to zero is a valid value.
2949
2950   Note that the use of this field in HTTP is significantly different
2951   from the corresponding definition in MIME, where it is an optional
2952   field used within the "message/external-body" content-type.
2953
29549.3.  Date
2955
2956   The "Date" header field represents the date and time at which the
2957   message was originated, having the same semantics as the Origination
2958   Date Field (orig-date) defined in Section 3.6.1 of [RFC5322].  The
2959   field value is an HTTP-date, as described in Section 6.1; it MUST be
2960   sent in rfc1123-date format.
2961
2962     Date = HTTP-date
2963
2964
2965
2966
2967Fielding, et al.        Expires October 20, 2011               [Page 53]
2968
2969Internet-Draft              HTTP/1.1, Part 1                  April 2011
2970
2971
2972   An example is
2973
2974     Date: Tue, 15 Nov 1994 08:12:31 GMT
2975
2976   Origin servers MUST include a Date header field in all responses,
2977   except in these cases:
2978
2979   1.  If the response status code is 100 (Continue) or 101 (Switching
2980       Protocols), the response MAY include a Date header field, at the
2981       server's option.
2982
2983   2.  If the response status code conveys a server error, e.g., 500
2984       (Internal Server Error) or 503 (Service Unavailable), and it is
2985       inconvenient or impossible to generate a valid Date.
2986
2987   3.  If the server does not have a clock that can provide a reasonable
2988       approximation of the current time, its responses MUST NOT include
2989       a Date header field.  In this case, the rules in Section 9.3.1
2990       MUST be followed.
2991
2992   A received message that does not have a Date header field MUST be
2993   assigned one by the recipient if the message will be cached by that
2994   recipient.
2995
2996   Clients can use the Date header field as well; in order to keep
2997   request messages small, they are advised not to include it when it
2998   doesn't convey any useful information (as it is usually the case for
2999   requests that do not contain a payload).
3000
3001   The HTTP-date sent in a Date header field SHOULD NOT represent a date
3002   and time subsequent to the generation of the message.  It SHOULD
3003   represent the best available approximation of the date and time of
3004   message generation, unless the implementation has no means of
3005   generating a reasonably accurate date and time.  In theory, the date
3006   ought to represent the moment just before the payload is generated.
3007   In practice, the date can be generated at any time during the message
3008   origination without affecting its semantic value.
3009
30109.3.1.  Clockless Origin Server Operation
3011
3012   Some origin server implementations might not have a clock available.
3013   An origin server without a clock MUST NOT assign Expires or Last-
3014   Modified values to a response, unless these values were associated
3015   with the resource by a system or user with a reliable clock.  It MAY
3016   assign an Expires value that is known, at or before server
3017   configuration time, to be in the past (this allows "pre-expiration"
3018   of responses without storing separate Expires values for each
3019   resource).
3020
3021
3022
3023Fielding, et al.        Expires October 20, 2011               [Page 54]
3024
3025Internet-Draft              HTTP/1.1, Part 1                  April 2011
3026
3027
30289.4.  Host
3029
3030   The "Host" header field in a request provides the host and port
3031   information from the target resource's URI, enabling the origin
3032   server to distinguish between resources while servicing requests for
3033   multiple host names on a single IP address.  Since the Host field-
3034   value is critical information for handling a request, it SHOULD be
3035   sent as the first header field following the Request-Line.
3036
3037     Host = uri-host [ ":" port ] ; Section 2.6.1
3038
3039   A client MUST send a Host header field in all HTTP/1.1 request
3040   messages.  If the target resource's URI includes an authority
3041   component, then the Host field-value MUST be identical to that
3042   authority component after excluding any userinfo (Section 2.6.1).  If
3043   the authority component is missing or undefined for the target
3044   resource's URI, then the Host header field MUST be sent with an empty
3045   field-value.
3046
3047   For example, a GET request to the origin server for
3048   <http://www.example.org/pub/WWW/> would begin with:
3049
3050     GET /pub/WWW/ HTTP/1.1
3051     Host: www.example.org
3052
3053   The Host header field MUST be sent in an HTTP/1.1 request even if the
3054   request-target is in the form of an absolute-URI, since this allows
3055   the Host information to be forwarded through ancient HTTP/1.0 proxies
3056   that might not have implemented Host.
3057
3058   When an HTTP/1.1 proxy receives a request with a request-target in
3059   the form of an absolute-URI, the proxy MUST ignore the received Host
3060   header field (if any) and instead replace it with the host
3061   information of the request-target.  When a proxy forwards a request,
3062   it MUST generate the Host header field based on the received
3063   absolute-URI rather than the received Host.
3064
3065   Since the Host header field acts as an application-level routing
3066   mechanism, it is a frequent target for malware seeking to poison a
3067   shared cache or redirect a request to an unintended server.  An
3068   interception proxy is particularly vulnerable if it relies on the
3069   Host header field value for redirecting requests to internal servers,
3070   or for use as a cache key in a shared cache, without first verifying
3071   that the intercepted connection is targeting a valid IP address for
3072   that host.
3073
3074   A server MUST respond with a 400 (Bad Request) status code to any
3075   HTTP/1.1 request message that lacks a Host header field and to any
3076
3077
3078
3079Fielding, et al.        Expires October 20, 2011               [Page 55]
3080
3081Internet-Draft              HTTP/1.1, Part 1                  April 2011
3082
3083
3084   request message that contains more than one Host header field or a
3085   Host header field with an invalid field-value.
3086
3087   See Sections 4.2 and B.1.1 for other requirements relating to Host.
3088
30899.5.  TE
3090
3091   The "TE" header field indicates what extension transfer-codings it is
3092   willing to accept in the response, and whether or not it is willing
3093   to accept trailer fields in a chunked transfer-coding.
3094
3095   Its value consists of the keyword "trailers" and/or a comma-separated
3096   list of extension transfer-coding names with optional accept
3097   parameters (as described in Section 6.2).
3098
3099     TE        = #t-codings
3100     t-codings = "trailers" / ( transfer-extension [ te-params ] )
3101     te-params = OWS ";" OWS "q=" qvalue *( te-ext )
3102     te-ext    = OWS ";" OWS token [ "=" word ]
3103
3104   The presence of the keyword "trailers" indicates that the client is
3105   willing to accept trailer fields in a chunked transfer-coding, as
3106   defined in Section 6.2.1.  This keyword is reserved for use with
3107   transfer-coding values even though it does not itself represent a
3108   transfer-coding.
3109
3110   Examples of its use are:
3111
3112     TE: deflate
3113     TE:
3114     TE: trailers, deflate;q=0.5
3115
3116   The TE header field only applies to the immediate connection.
3117   Therefore, the keyword MUST be supplied within a Connection header
3118   field (Section 9.1) whenever TE is present in an HTTP/1.1 message.
3119
3120   A server tests whether a transfer-coding is acceptable, according to
3121   a TE field, using these rules:
3122
3123   1.  The "chunked" transfer-coding is always acceptable.  If the
3124       keyword "trailers" is listed, the client indicates that it is
3125       willing to accept trailer fields in the chunked response on
3126       behalf of itself and any downstream clients.  The implication is
3127       that, if given, the client is stating that either all downstream
3128       clients are willing to accept trailer fields in the forwarded
3129       response, or that it will attempt to buffer the response on
3130       behalf of downstream recipients.
3131
3132
3133
3134
3135Fielding, et al.        Expires October 20, 2011               [Page 56]
3136
3137Internet-Draft              HTTP/1.1, Part 1                  April 2011
3138
3139
3140       Note: HTTP/1.1 does not define any means to limit the size of a
3141       chunked response such that a client can be assured of buffering
3142       the entire response.
3143
3144   2.  If the transfer-coding being tested is one of the transfer-
3145       codings listed in the TE field, then it is acceptable unless it
3146       is accompanied by a qvalue of 0.  (As defined in Section 6.4, a
3147       qvalue of 0 means "not acceptable".)
3148
3149   3.  If multiple transfer-codings are acceptable, then the acceptable
3150       transfer-coding with the highest non-zero qvalue is preferred.
3151       The "chunked" transfer-coding always has a qvalue of 1.
3152
3153   If the TE field-value is empty or if no TE field is present, the only
3154   transfer-coding is "chunked".  A message with no transfer-coding is
3155   always acceptable.
3156
31579.6.  Trailer
3158
3159   The "Trailer" header field indicates that the given set of header
3160   fields is present in the trailer of a message encoded with chunked
3161   transfer-coding.
3162
3163     Trailer = 1#field-name
3164
3165   An HTTP/1.1 message SHOULD include a Trailer header field in a
3166   message using chunked transfer-coding with a non-empty trailer.
3167   Doing so allows the recipient to know which header fields to expect
3168   in the trailer.
3169
3170   If no Trailer header field is present, the trailer SHOULD NOT include
3171   any header fields.  See Section 6.2.1 for restrictions on the use of
3172   trailer fields in a "chunked" transfer-coding.
3173
3174   Message header fields listed in the Trailer header field MUST NOT
3175   include the following header fields:
3176
3177   o  Transfer-Encoding
3178
3179   o  Content-Length
3180
3181   o  Trailer
3182
31839.7.  Transfer-Encoding
3184
3185   The "Transfer-Encoding" header field indicates what transfer-codings
3186   (if any) have been applied to the message body.  It differs from
3187   Content-Encoding (Section 2.2 of [Part3]) in that transfer-codings
3188
3189
3190
3191Fielding, et al.        Expires October 20, 2011               [Page 57]
3192
3193Internet-Draft              HTTP/1.1, Part 1                  April 2011
3194
3195
3196   are a property of the message (and therefore are removed by
3197   intermediaries), whereas content-codings are not.
3198
3199     Transfer-Encoding = 1#transfer-coding
3200
3201   Transfer-codings are defined in Section 6.2.  An example is:
3202
3203     Transfer-Encoding: chunked
3204
3205   If multiple encodings have been applied to a representation, the
3206   transfer-codings MUST be listed in the order in which they were
3207   applied.  Additional information about the encoding parameters MAY be
3208   provided by other header fields not defined by this specification.
3209
3210   Many older HTTP/1.0 applications do not understand the Transfer-
3211   Encoding header field.
3212
32139.8.  Upgrade
3214
3215   The "Upgrade" header field allows the client to specify what
3216   additional communication protocols it would like to use, if the
3217   server chooses to switch protocols.  Servers can use it to indicate
3218   what protocols they are willing to switch to.
3219
3220     Upgrade = 1#product
3221
3222   For example,
3223
3224     Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11
3225
3226   The Upgrade header field is intended to provide a simple mechanism
3227   for transition from HTTP/1.1 to some other, incompatible protocol.
3228   It does so by allowing the client to advertise its desire to use
3229   another protocol, such as a later version of HTTP with a higher major
3230   version number, even though the current request has been made using
3231   HTTP/1.1.  This eases the difficult transition between incompatible
3232   protocols by allowing the client to initiate a request in the more
3233   commonly supported protocol while indicating to the server that it
3234   would like to use a "better" protocol if available (where "better" is
3235   determined by the server, possibly according to the nature of the
3236   request method or target resource).
3237
3238   The Upgrade header field only applies to switching application-layer
3239   protocols upon the existing transport-layer connection.  Upgrade
3240   cannot be used to insist on a protocol change; its acceptance and use
3241   by the server is optional.  The capabilities and nature of the
3242   application-layer communication after the protocol change is entirely
3243   dependent upon the new protocol chosen, although the first action
3244
3245
3246
3247Fielding, et al.        Expires October 20, 2011               [Page 58]
3248
3249Internet-Draft              HTTP/1.1, Part 1                  April 2011
3250
3251
3252   after changing the protocol MUST be a response to the initial HTTP
3253   request containing the Upgrade header field.
3254
3255   The Upgrade header field only applies to the immediate connection.
3256   Therefore, the upgrade keyword MUST be supplied within a Connection
3257   header field (Section 9.1) whenever Upgrade is present in an HTTP/1.1
3258   message.
3259
3260   The Upgrade header field cannot be used to indicate a switch to a
3261   protocol on a different connection.  For that purpose, it is more
3262   appropriate to use a 3xx redirection response (Section 8.3 of
3263   [Part2]).
3264
3265   Servers MUST include the "Upgrade" header field in 101 (Switching
3266   Protocols) responses to indicate which protocol(s) are being switched
3267   to, and MUST include it in 426 (Upgrade Required) responses to
3268   indicate acceptable protocols to upgrade to.  Servers MAY include it
3269   in any other response to indicate that they are willing to upgrade to
3270   one of the specified protocols.
3271
3272   This specification only defines the protocol name "HTTP" for use by
3273   the family of Hypertext Transfer Protocols, as defined by the HTTP
3274   version rules of Section 2.5 and future updates to this
3275   specification.  Additional tokens can be registered with IANA using
3276   the registration procedure defined below.
3277
32789.8.1.  Upgrade Token Registry
3279
3280   The HTTP Upgrade Token Registry defines the name space for product
3281   tokens used to identify protocols in the Upgrade header field.  Each
3282   registered token is associated with contact information and an
3283   optional set of specifications that details how the connection will
3284   be processed after it has been upgraded.
3285
3286   Registrations are allowed on a First Come First Served basis as
3287   described in Section 4.1 of [RFC5226].  The specifications need not
3288   be IETF documents or be subject to IESG review.  Registrations are
3289   subject to the following rules:
3290
3291   1.  A token, once registered, stays registered forever.
3292
3293   2.  The registration MUST name a responsible party for the
3294       registration.
3295
3296   3.  The registration MUST name a point of contact.
3297
3298   4.  The registration MAY name a set of specifications associated with
3299       that token.  Such specifications need not be publicly available.
3300
3301
3302
3303Fielding, et al.        Expires October 20, 2011               [Page 59]
3304
3305Internet-Draft              HTTP/1.1, Part 1                  April 2011
3306
3307
3308   5.  The responsible party MAY change the registration at any time.
3309       The IANA will keep a record of all such changes, and make them
3310       available upon request.
3311
3312   6.  The responsible party for the first registration of a "product"
3313       token MUST approve later registrations of a "version" token
3314       together with that "product" token before they can be registered.
3315
3316   7.  If absolutely required, the IESG MAY reassign the responsibility
3317       for a token.  This will normally only be used in the case when a
3318       responsible party cannot be contacted.
3319
33209.9.  Via
3321
3322   The "Via" header field MUST be sent by a proxy or gateway to indicate
3323   the intermediate protocols and recipients between the user agent and
3324   the server on requests, and between the origin server and the client
3325   on responses.  It is analogous to the "Received" field used by email
3326   systems (Section 3.6.7 of [RFC5322]) and is intended to be used for
3327   tracking message forwards, avoiding request loops, and identifying
3328   the protocol capabilities of all senders along the request/response
3329   chain.
3330
3331     Via               = 1#( received-protocol RWS received-by
3332                             [ RWS comment ] )
3333     received-protocol = [ protocol-name "/" ] protocol-version
3334     protocol-name     = token
3335     protocol-version  = token
3336     received-by       = ( uri-host [ ":" port ] ) / pseudonym
3337     pseudonym         = token
3338
3339   The received-protocol indicates the protocol version of the message
3340   received by the server or client along each segment of the request/
3341   response chain.  The received-protocol version is appended to the Via
3342   field value when the message is forwarded so that information about
3343   the protocol capabilities of upstream applications remains visible to
3344   all recipients.
3345
3346   The protocol-name is excluded if and only if it would be "HTTP".  The
3347   received-by field is normally the host and optional port number of a
3348   recipient server or client that subsequently forwarded the message.
3349   However, if the real host is considered to be sensitive information,
3350   it MAY be replaced by a pseudonym.  If the port is not given, it MAY
3351   be assumed to be the default port of the received-protocol.
3352
3353   Multiple Via field values represent each proxy or gateway that has
3354   forwarded the message.  Each recipient MUST append its information
3355   such that the end result is ordered according to the sequence of
3356
3357
3358
3359Fielding, et al.        Expires October 20, 2011               [Page 60]
3360
3361Internet-Draft              HTTP/1.1, Part 1                  April 2011
3362
3363
3364   forwarding applications.
3365
3366   Comments MAY be used in the Via header field to identify the software
3367   of each recipient, analogous to the User-Agent and Server header
3368   fields.  However, all comments in the Via field are optional and MAY
3369   be removed by any recipient prior to forwarding the message.
3370
3371   For example, a request message could be sent from an HTTP/1.0 user
3372   agent to an internal proxy code-named "fred", which uses HTTP/1.1 to
3373   forward the request to a public proxy at p.example.net, which
3374   completes the request by forwarding it to the origin server at
3375   www.example.com.  The request received by www.example.com would then
3376   have the following Via header field:
3377
3378     Via: 1.0 fred, 1.1 p.example.net (Apache/1.1)
3379
3380   A proxy or gateway used as a portal through a network firewall SHOULD
3381   NOT forward the names and ports of hosts within the firewall region
3382   unless it is explicitly enabled to do so.  If not enabled, the
3383   received-by host of any host behind the firewall SHOULD be replaced
3384   by an appropriate pseudonym for that host.
3385
3386   For organizations that have strong privacy requirements for hiding
3387   internal structures, a proxy or gateway MAY combine an ordered
3388   subsequence of Via header field entries with identical received-
3389   protocol values into a single such entry.  For example,
3390
3391     Via: 1.0 ricky, 1.1 ethel, 1.1 fred, 1.0 lucy
3392
3393   could be collapsed to
3394
3395     Via: 1.0 ricky, 1.1 mertz, 1.0 lucy
3396
3397   Senders SHOULD NOT combine multiple entries unless they are all under
3398   the same organizational control and the hosts have already been
3399   replaced by pseudonyms.  Senders MUST NOT combine entries which have
3400   different received-protocol values.
3401
340210.  IANA Considerations
3403
340410.1.  Header Field Registration
3405
3406   The Message Header Field Registry located at <http://www.iana.org/
3407   assignments/message-headers/message-header-index.html> shall be
3408   updated with the permanent registrations below (see [RFC3864]):
3409
3410
3411
3412
3413
3414
3415Fielding, et al.        Expires October 20, 2011               [Page 61]
3416
3417Internet-Draft              HTTP/1.1, Part 1                  April 2011
3418
3419
3420   +-------------------+----------+----------+-------------+
3421   | Header Field Name | Protocol | Status   | Reference   |
3422   +-------------------+----------+----------+-------------+
3423   | Connection        | http     | standard | Section 9.1 |
3424   | Content-Length    | http     | standard | Section 9.2 |
3425   | Date              | http     | standard | Section 9.3 |
3426   | Host              | http     | standard | Section 9.4 |
3427   | TE                | http     | standard | Section 9.5 |
3428   | Trailer           | http     | standard | Section 9.6 |
3429   | Transfer-Encoding | http     | standard | Section 9.7 |
3430   | Upgrade           | http     | standard | Section 9.8 |
3431   | Via               | http     | standard | Section 9.9 |
3432   +-------------------+----------+----------+-------------+
3433
3434   The change controller is: "IETF (iesg@ietf.org) - Internet
3435   Engineering Task Force".
3436
343710.2.  URI Scheme Registration
3438
3439   The entries for the "http" and "https" URI Schemes in the registry
3440   located at <http://www.iana.org/assignments/uri-schemes.html> shall
3441   be updated to point to Sections 2.6.1 and 2.6.2 of this document (see
3442   [RFC4395]).
3443
344410.3.  Internet Media Type Registrations
3445
3446   This document serves as the specification for the Internet media
3447   types "message/http" and "application/http".  The following is to be
3448   registered with IANA (see [RFC4288]).
3449
345010.3.1.  Internet Media Type message/http
3451
3452   The message/http type can be used to enclose a single HTTP request or
3453   response message, provided that it obeys the MIME restrictions for
3454   all "message" types regarding line length and encodings.
3455
3456   Type name:  message
3457
3458   Subtype name:  http
3459
3460   Required parameters:  none
3461
3462   Optional parameters:  version, msgtype
3463
3464      version:  The HTTP-Version number of the enclosed message (e.g.,
3465         "1.1").  If not present, the version can be determined from the
3466         first line of the body.
3467
3468
3469
3470
3471Fielding, et al.        Expires October 20, 2011               [Page 62]
3472
3473Internet-Draft              HTTP/1.1, Part 1                  April 2011
3474
3475
3476      msgtype:  The message type -- "request" or "response".  If not
3477         present, the type can be determined from the first line of the
3478         body.
3479
3480   Encoding considerations:  only "7bit", "8bit", or "binary" are
3481      permitted
3482
3483   Security considerations:  none
3484
3485   Interoperability considerations:  none
3486
3487   Published specification:  This specification (see Section 10.3.1).
3488
3489   Applications that use this media type:
3490
3491   Additional information:
3492
3493      Magic number(s):  none
3494
3495      File extension(s):  none
3496
3497      Macintosh file type code(s):  none
3498
3499   Person and email address to contact for further information:  See
3500      Authors Section.
3501
3502   Intended usage:  COMMON
3503
3504   Restrictions on usage:  none
3505
3506   Author/Change controller:  IESG
3507
350810.3.2.  Internet Media Type application/http
3509
3510   The application/http type can be used to enclose a pipeline of one or
3511   more HTTP request or response messages (not intermixed).
3512
3513   Type name:  application
3514
3515   Subtype name:  http
3516
3517   Required parameters:  none
3518
3519   Optional parameters:  version, msgtype
3520
3521
3522
3523
3524
3525
3526
3527Fielding, et al.        Expires October 20, 2011               [Page 63]
3528
3529Internet-Draft              HTTP/1.1, Part 1                  April 2011
3530
3531
3532      version:  The HTTP-Version number of the enclosed messages (e.g.,
3533         "1.1").  If not present, the version can be determined from the
3534         first line of the body.
3535
3536      msgtype:  The message type -- "request" or "response".  If not
3537         present, the type can be determined from the first line of the
3538         body.
3539
3540   Encoding considerations:  HTTP messages enclosed by this type are in
3541      "binary" format; use of an appropriate Content-Transfer-Encoding
3542      is required when transmitted via E-mail.
3543
3544   Security considerations:  none
3545
3546   Interoperability considerations:  none
3547
3548   Published specification:  This specification (see Section 10.3.2).
3549
3550   Applications that use this media type:
3551
3552   Additional information:
3553
3554      Magic number(s):  none
3555
3556      File extension(s):  none
3557
3558      Macintosh file type code(s):  none
3559
3560   Person and email address to contact for further information:  See
3561      Authors Section.
3562
3563   Intended usage:  COMMON
3564
3565   Restrictions on usage:  none
3566
3567   Author/Change controller:  IESG
3568
356910.4.  Transfer Coding Registry
3570
3571   The registration procedure for HTTP Transfer Codings is now defined
3572   by Section 6.2.3 of this document.
3573
3574   The HTTP Transfer Codings Registry located at
3575   <http://www.iana.org/assignments/http-parameters> shall be updated
3576   with the registrations below:
3577
3578
3579
3580
3581
3582
3583Fielding, et al.        Expires October 20, 2011               [Page 64]
3584
3585Internet-Draft              HTTP/1.1, Part 1                  April 2011
3586
3587
3588   +----------+--------------------------------------+-----------------+
3589   | Name     | Description                          | Reference       |
3590   +----------+--------------------------------------+-----------------+
3591   | chunked  | Transfer in a series of chunks       | Section 6.2.1   |
3592   | compress | UNIX "compress" program method       | Section 6.2.2.1 |
3593   | deflate  | "deflate" compression mechanism      | Section 6.2.2.2 |
3594   |          | ([RFC1951]) used inside the "zlib"   |                 |
3595   |          | data format ([RFC1950])              |                 |
3596   | gzip     | Same as GNU zip [RFC1952]            | Section 6.2.2.3 |
3597   +----------+--------------------------------------+-----------------+
3598
359910.5.  Upgrade Token Registration
3600
3601   The registration procedure for HTTP Upgrade Tokens -- previously
3602   defined in Section 7.2 of [RFC2817] -- is now defined by
3603   Section 9.8.1 of this document.
3604
3605   The HTTP Status Code Registry located at
3606   <http://www.iana.org/assignments/http-upgrade-tokens/> shall be
3607   updated with the registration below:
3608
3609   +-------+---------------------------+-------------------------------+
3610   | Value | Description               | Reference                     |
3611   +-------+---------------------------+-------------------------------+
3612   | HTTP  | Hypertext Transfer        | Section 2.5 of this           |
3613   |       | Protocol                  | specification                 |
3614   +-------+---------------------------+-------------------------------+
3615
361611.  Security Considerations
3617
3618   This section is meant to inform application developers, information
3619   providers, and users of the security limitations in HTTP/1.1 as
3620   described by this document.  The discussion does not include
3621   definitive solutions to the problems revealed, though it does make
3622   some suggestions for reducing security risks.
3623
362411.1.  Personal Information
3625
3626   HTTP clients are often privy to large amounts of personal information
3627   (e.g., the user's name, location, mail address, passwords, encryption
3628   keys, etc.), and SHOULD be very careful to prevent unintentional
3629   leakage of this information.  We very strongly recommend that a
3630   convenient interface be provided for the user to control
3631   dissemination of such information, and that designers and
3632   implementors be particularly careful in this area.  History shows
3633   that errors in this area often create serious security and/or privacy
3634   problems and generate highly adverse publicity for the implementor's
3635   company.
3636
3637
3638
3639Fielding, et al.        Expires October 20, 2011               [Page 65]
3640
3641Internet-Draft              HTTP/1.1, Part 1                  April 2011
3642
3643
364411.2.  Abuse of Server Log Information
3645
3646   A server is in the position to save personal data about a user's
3647   requests which might identify their reading patterns or subjects of
3648   interest.  This information is clearly confidential in nature and its
3649   handling can be constrained by law in certain countries.  People
3650   using HTTP to provide data are responsible for ensuring that such
3651   material is not distributed without the permission of any individuals
3652   that are identifiable by the published results.
3653
365411.3.  Attacks Based On File and Path Names
3655
3656   Implementations of HTTP origin servers SHOULD be careful to restrict
3657   the documents returned by HTTP requests to be only those that were
3658   intended by the server administrators.  If an HTTP server translates
3659   HTTP URIs directly into file system calls, the server MUST take
3660   special care not to serve files that were not intended to be
3661   delivered to HTTP clients.  For example, UNIX, Microsoft Windows, and
3662   other operating systems use ".." as a path component to indicate a
3663   directory level above the current one.  On such a system, an HTTP
3664   server MUST disallow any such construct in the request-target if it
3665   would otherwise allow access to a resource outside those intended to
3666   be accessible via the HTTP server.  Similarly, files intended for
3667   reference only internally to the server (such as access control
3668   files, configuration files, and script code) MUST be protected from
3669   inappropriate retrieval, since they might contain sensitive
3670   information.  Experience has shown that minor bugs in such HTTP
3671   server implementations have turned into security risks.
3672
367311.4.  DNS Spoofing
3674
3675   Clients using HTTP rely heavily on the Domain Name Service, and are
3676   thus generally prone to security attacks based on the deliberate mis-
3677   association of IP addresses and DNS names.  Clients need to be
3678   cautious in assuming the continuing validity of an IP number/DNS name
3679   association.
3680
3681   In particular, HTTP clients SHOULD rely on their name resolver for
3682   confirmation of an IP number/DNS name association, rather than
3683   caching the result of previous host name lookups.  Many platforms
3684   already can cache host name lookups locally when appropriate, and
3685   they SHOULD be configured to do so.  It is proper for these lookups
3686   to be cached, however, only when the TTL (Time To Live) information
3687   reported by the name server makes it likely that the cached
3688   information will remain useful.
3689
3690   If HTTP clients cache the results of host name lookups in order to
3691   achieve a performance improvement, they MUST observe the TTL
3692
3693
3694
3695Fielding, et al.        Expires October 20, 2011               [Page 66]
3696
3697Internet-Draft              HTTP/1.1, Part 1                  April 2011
3698
3699
3700   information reported by DNS.
3701
3702   If HTTP clients do not observe this rule, they could be spoofed when
3703   a previously-accessed server's IP address changes.  As network
3704   renumbering is expected to become increasingly common [RFC1900], the
3705   possibility of this form of attack will grow.  Observing this
3706   requirement thus reduces this potential security vulnerability.
3707
3708   This requirement also improves the load-balancing behavior of clients
3709   for replicated servers using the same DNS name and reduces the
3710   likelihood of a user's experiencing failure in accessing sites which
3711   use that strategy.
3712
371311.5.  Proxies and Caching
3714
3715   By their very nature, HTTP proxies are men-in-the-middle, and
3716   represent an opportunity for man-in-the-middle attacks.  Compromise
3717   of the systems on which the proxies run can result in serious
3718   security and privacy problems.  Proxies have access to security-
3719   related information, personal information about individual users and
3720   organizations, and proprietary information belonging to users and
3721   content providers.  A compromised proxy, or a proxy implemented or
3722   configured without regard to security and privacy considerations,
3723   might be used in the commission of a wide range of potential attacks.
3724
3725   Proxy operators need to protect the systems on which proxies run as
3726   they would protect any system that contains or transports sensitive
3727   information.  In particular, log information gathered at proxies
3728   often contains highly sensitive personal information, and/or
3729   information about organizations.  Log information needs to be
3730   carefully guarded, and appropriate guidelines for use need to be
3731   developed and followed.  (Section 11.2).
3732
3733   Proxy implementors need to consider the privacy and security
3734   implications of their design and coding decisions, and of the
3735   configuration options they provide to proxy operators (especially the
3736   default configuration).
3737
3738   Users of a proxy need to be aware that proxies are no trustworthier
3739   than the people who run them; HTTP itself cannot solve this problem.
3740
3741   The judicious use of cryptography, when appropriate, might suffice to
3742   protect against a broad range of security and privacy attacks.  Such
3743   cryptography is beyond the scope of the HTTP/1.1 specification.
3744
3745
3746
3747
3748
3749
3750
3751Fielding, et al.        Expires October 20, 2011               [Page 67]
3752
3753Internet-Draft              HTTP/1.1, Part 1                  April 2011
3754
3755
375611.6.  Denial of Service Attacks on Proxies
3757
3758   They exist.  They are hard to defend against.  Research continues.
3759   Beware.
3760
376112.  Acknowledgments
3762
3763   HTTP has evolved considerably over the years.  It has benefited from
3764   a large and active developer community -- the many people who have
3765   participated on the www-talk mailing list -- and it is that community
3766   which has been most responsible for the success of HTTP and of the
3767   World-Wide Web in general.  Marc Andreessen, Robert Cailliau, Daniel
3768   W. Connolly, Bob Denny, John Franks, Jean-Francois Groff, Phillip M.
3769   Hallam-Baker, Hakon W. Lie, Ari Luotonen, Rob McCool, Lou Montulli,
3770   Dave Raggett, Tony Sanders, and Marc VanHeyningen deserve special
3771   recognition for their efforts in defining early aspects of the
3772   protocol.
3773
3774   This document has benefited greatly from the comments of all those
3775   participating in the HTTP-WG.  In addition to those already
3776   mentioned, the following individuals have contributed to this
3777   specification:
3778
3779   Gary Adams, Harald Tveit Alvestrand, Keith Ball, Brian Behlendorf,
3780   Paul Burchard, Maurizio Codogno, Josh Cohen, Mike Cowlishaw, Roman
3781   Czyborra, Michael A. Dolan, Daniel DuBois, David J. Fiander, Alan
3782   Freier, Marc Hedlund, Greg Herlihy, Koen Holtman, Alex Hopmann, Bob
3783   Jernigan, Shel Kaphan, Rohit Khare, John Klensin, Martijn Koster,
3784   Alexei Kosut, David M. Kristol, Daniel LaLiberte, Ben Laurie, Paul J.
3785   Leach, Albert Lunde, John C. Mallery, Jean-Philippe Martin-Flatin,
3786   Mitra, David Morris, Gavin Nicol, Ross Patterson, Bill Perry, Jeffrey
3787   Perry, Scott Powers, Owen Rees, Luigi Rizzo, David Robinson, Marc
3788   Salomon, Rich Salz, Allan M. Schiffman, Jim Seidman, Chuck Shotton,
3789   Eric W. Sink, Simon E. Spero, Richard N. Taylor, Robert S. Thau, Bill
3790   (BearHeart) Weinman, Francois Yergeau, Mary Ellen Zurko.
3791
3792   Thanks to the "cave men" of Palo Alto.  You know who you are.
3793
3794   Jim Gettys (the editor of [RFC2616]) wishes particularly to thank Roy
3795   Fielding, the editor of [RFC2068], along with John Klensin, Jeff
3796   Mogul, Paul Leach, Dave Kristol, Koen Holtman, John Franks, Josh
3797   Cohen, Alex Hopmann, Scott Lawrence, and Larry Masinter for their
3798   help.  And thanks go particularly to Jeff Mogul and Scott Lawrence
3799   for performing the "MUST/MAY/SHOULD" audit.
3800
3801   The Apache Group, Anselm Baird-Smith, author of Jigsaw, and Henrik
3802   Frystyk implemented RFC 2068 early, and we wish to thank them for the
3803   discovery of many of the problems that this document attempts to
3804
3805
3806
3807Fielding, et al.        Expires October 20, 2011               [Page 68]
3808
3809Internet-Draft              HTTP/1.1, Part 1                  April 2011
3810
3811
3812   rectify.
3813
3814   This specification makes heavy use of the augmented BNF and generic
3815   constructs defined by David H. Crocker for [RFC5234].  Similarly, it
3816   reuses many of the definitions provided by Nathaniel Borenstein and
3817   Ned Freed for MIME [RFC2045].  We hope that their inclusion in this
3818   specification will help reduce past confusion over the relationship
3819   between HTTP and Internet mail message formats.
3820
382113.  References
3822
382313.1.  Normative References
3824
3825   [ISO-8859-1]                   International Organization for
3826                                  Standardization, "Information
3827                                  technology -- 8-bit single-byte coded
3828                                  graphic character sets -- Part 1:
3829                                  Latin alphabet No. 1", ISO/
3830                                  IEC 8859-1:1998, 1998.
3831
3832   [Part2]                        Fielding, R., Ed., Gettys, J., Mogul,
3833                                  J., Frystyk, H., Masinter, L., Leach,
3834                                  P., Berners-Lee, T., Lafon, Y., Ed.,
3835                                  and J. Reschke, Ed., "HTTP/1.1, part
3836                                  2: Message Semantics",
3837                                  draft-ietf-httpbis-p2-semantics-14
3838                                  (work in progress), April 2011.
3839
3840   [Part3]                        Fielding, R., Ed., Gettys, J., Mogul,
3841                                  J., Frystyk, H., Masinter, L., Leach,
3842                                  P., Berners-Lee, T., Lafon, Y., Ed.,
3843                                  and J. Reschke, Ed., "HTTP/1.1, part
3844                                  3: Message Payload and Content
3845                                  Negotiation",
3846                                  draft-ietf-httpbis-p3-payload-14 (work
3847                                  in progress), April 2011.
3848
3849   [Part6]                        Fielding, R., Ed., Gettys, J., Mogul,
3850                                  J., Frystyk, H., Masinter, L., Leach,
3851                                  P., Berners-Lee, T., Lafon, Y., Ed.,
3852                                  Nottingham, M., Ed., and J. Reschke,
3853                                  Ed., "HTTP/1.1, part 6: Caching",
3854                                  draft-ietf-httpbis-p6-cache-14 (work
3855                                  in progress), April 2011.
3856
3857   [RFC1950]                      Deutsch, L. and J-L. Gailly, "ZLIB
3858                                  Compressed Data Format Specification
3859                                  version 3.3", RFC 1950, May 1996.
3860
3861
3862
3863Fielding, et al.        Expires October 20, 2011               [Page 69]
3864
3865Internet-Draft              HTTP/1.1, Part 1                  April 2011
3866
3867
3868                                  RFC 1950 is an Informational RFC, thus
3869                                  it might be less stable than this
3870                                  specification.  On the other hand,
3871                                  this downward reference was present
3872                                  since the publication of RFC 2068 in
3873                                  1997 ([RFC2068]), therefore it is
3874                                  unlikely to cause problems in
3875                                  practice.  See also [BCP97].
3876
3877   [RFC1951]                      Deutsch, P., "DEFLATE Compressed Data
3878                                  Format Specification version 1.3",
3879                                  RFC 1951, May 1996.
3880
3881                                  RFC 1951 is an Informational RFC, thus
3882                                  it might be less stable than this
3883                                  specification.  On the other hand,
3884                                  this downward reference was present
3885                                  since the publication of RFC 2068 in
3886                                  1997 ([RFC2068]), therefore it is
3887                                  unlikely to cause problems in
3888                                  practice.  See also [BCP97].
3889
3890   [RFC1952]                      Deutsch, P., Gailly, J-L., Adler, M.,
3891                                  Deutsch, L., and G. Randers-Pehrson,
3892                                  "GZIP file format specification
3893                                  version 4.3", RFC 1952, May 1996.
3894
3895                                  RFC 1952 is an Informational RFC, thus
3896                                  it might be less stable than this
3897                                  specification.  On the other hand,
3898                                  this downward reference was present
3899                                  since the publication of RFC 2068 in
3900                                  1997 ([RFC2068]), therefore it is
3901                                  unlikely to cause problems in
3902                                  practice.  See also [BCP97].
3903
3904   [RFC2119]                      Bradner, S., "Key words for use in
3905                                  RFCs to Indicate Requirement Levels",
3906                                  BCP 14, RFC 2119, March 1997.
3907
3908   [RFC3986]                      Berners-Lee, T., Fielding, R., and L.
3909                                  Masinter, "Uniform Resource Identifier
3910                                  (URI): Generic Syntax", STD 66,
3911                                  RFC 3986, January 2005.
3912
3913   [RFC5234]                      Crocker, D., Ed. and P. Overell,
3914                                  "Augmented BNF for Syntax
3915                                  Specifications: ABNF", STD 68,
3916
3917
3918
3919Fielding, et al.        Expires October 20, 2011               [Page 70]
3920
3921Internet-Draft              HTTP/1.1, Part 1                  April 2011
3922
3923
3924                                  RFC 5234, January 2008.
3925
3926   [USASCII]                      American National Standards Institute,
3927                                  "Coded Character Set -- 7-bit American
3928                                  Standard Code for Information
3929                                  Interchange", ANSI X3.4, 1986.
3930
393113.2.  Informative References
3932
3933   [BCP97]                        Klensin, J. and S. Hartman, "Handling
3934                                  Normative References to Standards-
3935                                  Track Documents", BCP 97, RFC 4897,
3936                                  June 2007.
3937
3938   [Kri2001]                      Kristol, D., "HTTP Cookies: Standards,
3939                                  Privacy, and Politics", ACM
3940                                  Transactions on Internet
3941                                  Technology Vol. 1, #2, November 2001,
3942                                  <http://arxiv.org/abs/cs.SE/0105018>.
3943
3944   [Nie1997]                      Frystyk, H., Gettys, J.,
3945                                  Prud'hommeaux, E., Lie, H., and C.
3946                                  Lilley, "Network Performance Effects
3947                                  of HTTP/1.1, CSS1, and PNG",
3948                                  ACM Proceedings of the ACM SIGCOMM '97
3949                                  conference on Applications,
3950                                  technologies, architectures, and
3951                                  protocols for computer communication
3952                                  SIGCOMM '97, September 1997, <http://
3953                                  doi.acm.org/10.1145/263105.263157>.
3954
3955   [Pad1995]                      Padmanabhan, V. and J. Mogul,
3956                                  "Improving HTTP Latency", Computer
3957                                  Networks and ISDN Systems v. 28, pp.
3958                                  25-35, December 1995, <http://
3959                                  portal.acm.org/
3960                                  citation.cfm?id=219094>.
3961
3962   [RFC1123]                      Braden, R., "Requirements for Internet
3963                                  Hosts - Application and Support",
3964                                  STD 3, RFC 1123, October 1989.
3965
3966   [RFC1900]                      Carpenter, B. and Y. Rekhter,
3967                                  "Renumbering Needs Work", RFC 1900,
3968                                  February 1996.
3969
3970   [RFC1919]                      Chatel, M., "Classical versus
3971                                  Transparent IP Proxies", RFC 1919,
3972
3973
3974
3975Fielding, et al.        Expires October 20, 2011               [Page 71]
3976
3977Internet-Draft              HTTP/1.1, Part 1                  April 2011
3978
3979
3980                                  March 1996.
3981
3982   [RFC1945]                      Berners-Lee, T., Fielding, R., and H.
3983                                  Nielsen, "Hypertext Transfer Protocol
3984                                  -- HTTP/1.0", RFC 1945, May 1996.
3985
3986   [RFC2045]                      Freed, N. and N. Borenstein,
3987                                  "Multipurpose Internet Mail Extensions
3988                                  (MIME) Part One: Format of Internet
3989                                  Message Bodies", RFC 2045,
3990                                  November 1996.
3991
3992   [RFC2047]                      Moore, K., "MIME (Multipurpose
3993                                  Internet Mail Extensions) Part Three:
3994                                  Message Header Extensions for Non-
3995                                  ASCII Text", RFC 2047, November 1996.
3996
3997   [RFC2068]                      Fielding, R., Gettys, J., Mogul, J.,
3998                                  Nielsen, H., and T. Berners-Lee,
3999                                  "Hypertext Transfer Protocol --
4000                                  HTTP/1.1", RFC 2068, January 1997.
4001
4002   [RFC2145]                      Mogul, J., Fielding, R., Gettys, J.,
4003                                  and H. Nielsen, "Use and
4004                                  Interpretation of HTTP Version
4005                                  Numbers", RFC 2145, May 1997.
4006
4007   [RFC2616]                      Fielding, R., Gettys, J., Mogul, J.,
4008                                  Frystyk, H., Masinter, L., Leach, P.,
4009                                  and T. Berners-Lee, "Hypertext
4010                                  Transfer Protocol -- HTTP/1.1",
4011                                  RFC 2616, June 1999.
4012
4013   [RFC2817]                      Khare, R. and S. Lawrence, "Upgrading
4014                                  to TLS Within HTTP/1.1", RFC 2817,
4015                                  May 2000.
4016
4017   [RFC2818]                      Rescorla, E., "HTTP Over TLS",
4018                                  RFC 2818, May 2000.
4019
4020   [RFC2965]                      Kristol, D. and L. Montulli, "HTTP
4021                                  State Management Mechanism", RFC 2965,
4022                                  October 2000.
4023
4024   [RFC3040]                      Cooper, I., Melve, I., and G.
4025                                  Tomlinson, "Internet Web Replication
4026                                  and Caching Taxonomy", RFC 3040,
4027                                  January 2001.
4028
4029
4030
4031Fielding, et al.        Expires October 20, 2011               [Page 72]
4032
4033Internet-Draft              HTTP/1.1, Part 1                  April 2011
4034
4035
4036   [RFC3864]                      Klyne, G., Nottingham, M., and J.
4037                                  Mogul, "Registration Procedures for
4038                                  Message Header Fields", BCP 90,
4039                                  RFC 3864, September 2004.
4040
4041   [RFC4288]                      Freed, N. and J. Klensin, "Media Type
4042                                  Specifications and Registration
4043                                  Procedures", BCP 13, RFC 4288,
4044                                  December 2005.
4045
4046   [RFC4395]                      Hansen, T., Hardie, T., and L.
4047                                  Masinter, "Guidelines and Registration
4048                                  Procedures for New URI Schemes",
4049                                  BCP 115, RFC 4395, February 2006.
4050
4051   [RFC5226]                      Narten, T. and H. Alvestrand,
4052                                  "Guidelines for Writing an IANA
4053                                  Considerations Section in RFCs",
4054                                  BCP 26, RFC 5226, May 2008.
4055
4056   [RFC5322]                      Resnick, P., "Internet Message
4057                                  Format", RFC 5322, October 2008.
4058
4059   [Spe]                          Spero, S., "Analysis of HTTP
4060                                  Performance Problems", <http://
4061                                  sunsite.unc.edu/mdma-release/
4062                                  http-prob.html>.
4063
4064   [Tou1998]                      Touch, J., Heidemann, J., and K.
4065                                  Obraczka, "Analysis of HTTP
4066                                  Performance", ISI Research Report ISI/
4067                                  RR-98-463, Aug 1998, <http://
4068                                  www.isi.edu/touch/pubs/http-perf96/>.
4069
4070                                  (original report dated Aug. 1996)
4071
4072   [draft-ietf-httpstate-cookie]  Barth, A., "HTTP State Management
4073                                  Mechanism",
4074                                  draft-ietf-httpstate-cookie-23 (work
4075                                  in progress), March 2011.
4076
4077Appendix A.  Tolerant Applications
4078
4079   Although this document specifies the requirements for the generation
4080   of HTTP/1.1 messages, not all applications will be correct in their
4081   implementation.  We therefore recommend that operational applications
4082   be tolerant of deviations whenever those deviations can be
4083   interpreted unambiguously.
4084
4085
4086
4087Fielding, et al.        Expires October 20, 2011               [Page 73]
4088
4089Internet-Draft              HTTP/1.1, Part 1                  April 2011
4090
4091
4092   The line terminator for header fields is the sequence CRLF.  However,
4093   we recommend that applications, when parsing such headers fields,
4094   recognize a single LF as a line terminator and ignore the leading CR.
4095
4096   The character encoding of a representation SHOULD be labeled as the
4097   lowest common denominator of the character codes used within that
4098   representation, with the exception that not labeling the
4099   representation is preferred over labeling the representation with the
4100   labels US-ASCII or ISO-8859-1.  See [Part3].
4101
4102   Additional rules for requirements on parsing and encoding of dates
4103   and other potential problems with date encodings include:
4104
4105   o  HTTP/1.1 clients and caches SHOULD assume that an RFC-850 date
4106      which appears to be more than 50 years in the future is in fact in
4107      the past (this helps solve the "year 2000" problem).
4108
4109   o  Although all date formats are specified to be case-sensitive,
4110      recipients SHOULD match day, week and timezone names case-
4111      insensitively.
4112
4113   o  An HTTP/1.1 implementation MAY internally represent a parsed
4114      Expires date as earlier than the proper value, but MUST NOT
4115      internally represent a parsed Expires date as later than the
4116      proper value.
4117
4118   o  All expiration-related calculations MUST be done in GMT.  The
4119      local time zone MUST NOT influence the calculation or comparison
4120      of an age or expiration time.
4121
4122   o  If an HTTP header field incorrectly carries a date value with a
4123      time zone other than GMT, it MUST be converted into GMT using the
4124      most conservative possible conversion.
4125
4126Appendix B.  HTTP Version History
4127
4128   HTTP has been in use by the World-Wide Web global information
4129   initiative since 1990.  The first version of HTTP, later referred to
4130   as HTTP/0.9, was a simple protocol for hypertext data transfer across
4131   the Internet with only a single request method (GET) and no metadata.
4132   HTTP/1.0, as defined by [RFC1945], added a range of request methods
4133   and MIME-like messaging that could include metadata about the data
4134   transferred and modifiers on the request/response semantics.
4135   However, HTTP/1.0 did not sufficiently take into consideration the
4136   effects of hierarchical proxies, caching, the need for persistent
4137   connections, or name-based virtual hosts.  The proliferation of
4138   incompletely-implemented applications calling themselves "HTTP/1.0"
4139   further necessitated a protocol version change in order for two
4140
4141
4142
4143Fielding, et al.        Expires October 20, 2011               [Page 74]
4144
4145Internet-Draft              HTTP/1.1, Part 1                  April 2011
4146
4147
4148   communicating applications to determine each other's true
4149   capabilities.
4150
4151   HTTP/1.1 remains compatible with HTTP/1.0 by including more stringent
4152   requirements that enable reliable implementations, adding only those
4153   new features that will either be safely ignored by an HTTP/1.0
4154   recipient or only sent when communicating with a party advertising
4155   compliance with HTTP/1.1.
4156
4157   It is beyond the scope of a protocol specification to mandate
4158   compliance with previous versions.  HTTP/1.1 was deliberately
4159   designed, however, to make supporting previous versions easy.  We
4160   would expect a general-purpose HTTP/1.1 server to understand any
4161   valid request in the format of HTTP/1.0 and respond appropriately
4162   with an HTTP/1.1 message that only uses features understood (or
4163   safely ignored) by HTTP/1.0 clients.  Likewise, would expect an
4164   HTTP/1.1 client to understand any valid HTTP/1.0 response.
4165
4166   Since HTTP/0.9 did not support header fields in a request, there is
4167   no mechanism for it to support name-based virtual hosts (selection of
4168   resource by inspection of the Host header field).  Any server that
4169   implements name-based virtual hosts ought to disable support for
4170   HTTP/0.9.  Most requests that appear to be HTTP/0.9 are, in fact,
4171   badly constructed HTTP/1.x requests wherein a buggy client failed to
4172   properly encode linear whitespace found in a URI reference and placed
4173   in the request-target.
4174
4175B.1.  Changes from HTTP/1.0
4176
4177   This section summarizes major differences between versions HTTP/1.0
4178   and HTTP/1.1.
4179
4180B.1.1.  Multi-homed Web Servers
4181
4182   The requirements that clients and servers support the Host header
4183   field (Section 9.4), report an error if it is missing from an
4184   HTTP/1.1 request, and accept absolute URIs (Section 4.1.2) are among
4185   the most important changes defined by HTTP/1.1.
4186
4187   Older HTTP/1.0 clients assumed a one-to-one relationship of IP
4188   addresses and servers; there was no other established mechanism for
4189   distinguishing the intended server of a request than the IP address
4190   to which that request was directed.  The Host header field was
4191   introduced during the development of HTTP/1.1 and, though it was
4192   quickly implemented by most HTTP/1.0 browsers, additional
4193   requirements were placed on all HTTP/1.1 requests in order to ensure
4194   complete adoption.  At the time of this writing, most HTTP-based
4195   services are dependent upon the Host header field for targeting
4196
4197
4198
4199Fielding, et al.        Expires October 20, 2011               [Page 75]
4200
4201Internet-Draft              HTTP/1.1, Part 1                  April 2011
4202
4203
4204   requests.
4205
4206B.1.2.  Keep-Alive Connections
4207
4208   For most implementations of HTTP/1.0, each connection is established
4209   by the client prior to the request and closed by the server after
4210   sending the response.  However, some implementations implement the
4211   Keep-Alive version of persistent connections described in Section
4212   19.7.1 of [RFC2068].
4213
4214   Some clients and servers might wish to be compatible with some
4215   previous implementations of persistent connections in HTTP/1.0
4216   clients and servers.  Persistent connections in HTTP/1.0 are
4217   explicitly negotiated as they are not the default behavior.  HTTP/1.0
4218   experimental implementations of persistent connections are faulty,
4219   and the new facilities in HTTP/1.1 are designed to rectify these
4220   problems.  The problem was that some existing HTTP/1.0 clients might
4221   send Keep-Alive to a proxy server that doesn't understand Connection,
4222   which would then erroneously forward it to the next inbound server,
4223   which would establish the Keep-Alive connection and result in a hung
4224   HTTP/1.0 proxy waiting for the close on the response.  The result is
4225   that HTTP/1.0 clients must be prevented from using Keep-Alive when
4226   talking to proxies.
4227
4228   However, talking to proxies is the most important use of persistent
4229   connections, so that prohibition is clearly unacceptable.  Therefore,
4230   we need some other mechanism for indicating a persistent connection
4231   is desired, which is safe to use even when talking to an old proxy
4232   that ignores Connection.  Persistent connections are the default for
4233   HTTP/1.1 messages; we introduce a new keyword (Connection: close) for
4234   declaring non-persistence.  See Section 9.1.
4235
4236B.2.  Changes from RFC 2616
4237
4238   Empty list elements in list productions have been deprecated.
4239   (Section 1.2.1)
4240
4241   Rules about implicit linear whitespace between certain grammar
4242   productions have been removed; now it's only allowed when
4243   specifically pointed out in the ABNF.  The NUL octet is no longer
4244   allowed in comment and quoted-string text.  The quoted-pair rule no
4245   longer allows escaping control characters other than HTAB.  Non-ASCII
4246   content in header fields and reason phrase has been obsoleted and
4247   made opaque (the TEXT rule was removed) (Section 1.2.2)
4248
4249   Clarify that HTTP-Version is case sensitive.  (Section 2.5)
4250
4251   Require that invalid whitespace around field-names be rejected.
4252
4253
4254
4255Fielding, et al.        Expires October 20, 2011               [Page 76]
4256
4257Internet-Draft              HTTP/1.1, Part 1                  April 2011
4258
4259
4260   (Section 3.2)
4261
4262   Require recipients to handle bogus Content-Length header fields as
4263   errors.  (Section 3.3)
4264
4265   Remove reference to non-existent identity transfer-coding value
4266   tokens.  (Sections 3.3 and 6.2)
4267
4268   Update use of abs_path production from RFC 1808 to the path-absolute
4269   + query components of RFC 3986.  State that the asterisk form is
4270   allowed for the OPTIONS request method only.  (Section 4.1.2)
4271
4272   Clarification that the chunk length does not include the count of the
4273   octets in the chunk header and trailer.  Furthermore disallowed line
4274   folding in chunk extensions.  (Section 6.2.1)
4275
4276   Remove hard limit of two connections per server.  (Section 7.1.4)
4277
4278   Change ABNF productions for header fields to only define the field
4279   value.  (Section 9)
4280
4281   Clarify exactly when close connection options must be sent.
4282   (Section 9.1)
4283
4284   Define the semantics of the "Upgrade" header field in responses other
4285   than 101 (this was incorporated from [RFC2817]).  (Section 9.8)
4286
4287Appendix C.  Collected ABNF
4288
4289   BWS = OWS
4290
4291   Chunked-Body = *chunk last-chunk trailer-part CRLF
4292   Connection = *( "," OWS ) connection-token *( OWS "," [ OWS
4293    connection-token ] )
4294   Content-Length = 1*DIGIT
4295
4296   Date = HTTP-date
4297
4298   GMT = %x47.4D.54 ; GMT
4299
4300   HTTP-Prot-Name = %x48.54.54.50 ; HTTP
4301   HTTP-Version = HTTP-Prot-Name "/" 1*DIGIT "." 1*DIGIT
4302   HTTP-date = rfc1123-date / obs-date
4303   HTTP-message = start-line *( header-field CRLF ) CRLF [ message-body
4304    ]
4305   Host = uri-host [ ":" port ]
4306
4307   Method = token
4308
4309
4310
4311Fielding, et al.        Expires October 20, 2011               [Page 77]
4312
4313Internet-Draft              HTTP/1.1, Part 1                  April 2011
4314
4315
4316   OWS = *( [ obs-fold ] WSP )
4317
4318   RWS = 1*( [ obs-fold ] WSP )
4319   Reason-Phrase = *( WSP / VCHAR / obs-text )
4320   Request = Request-Line *( header-field CRLF ) CRLF [ message-body ]
4321   Request-Line = Method SP request-target SP HTTP-Version CRLF
4322   Response = Status-Line *( header-field CRLF ) CRLF [ message-body ]
4323
4324   Status-Code = 3DIGIT
4325   Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
4326
4327   TE = [ ( "," / t-codings ) *( OWS "," [ OWS t-codings ] ) ]
4328   Trailer = *( "," OWS ) field-name *( OWS "," [ OWS field-name ] )
4329   Transfer-Encoding = *( "," OWS ) transfer-coding *( OWS "," [ OWS
4330    transfer-coding ] )
4331
4332   URI-reference = <URI-reference, defined in [RFC3986], Section 4.1>
4333   Upgrade = *( "," OWS ) product *( OWS "," [ OWS product ] )
4334
4335   Via = *( "," OWS ) received-protocol RWS received-by [ RWS comment ]
4336    *( OWS "," [ OWS received-protocol RWS received-by [ RWS comment ] ]
4337    )
4338
4339   absolute-URI = <absolute-URI, defined in [RFC3986], Section 4.3>
4340   asctime-date = day-name SP date3 SP time-of-day SP year
4341   attribute = token
4342   authority = <authority, defined in [RFC3986], Section 3.2>
4343
4344   chunk = chunk-size *WSP [ chunk-ext ] CRLF chunk-data CRLF
4345   chunk-data = 1*OCTET
4346   chunk-ext = *( ";" *WSP chunk-ext-name [ "=" chunk-ext-val ] *WSP )
4347   chunk-ext-name = token
4348   chunk-ext-val = token / quoted-str-nf
4349   chunk-size = 1*HEXDIG
4350   comment = "(" *( ctext / quoted-cpair / comment ) ")"
4351   connection-token = token
4352   ctext = OWS / %x21-27 ; '!'-'''
4353    / %x2A-5B ; '*'-'['
4354    / %x5D-7E ; ']'-'~'
4355    / obs-text
4356
4357   date1 = day SP month SP year
4358   date2 = day "-" month "-" 2DIGIT
4359   date3 = month SP ( 2DIGIT / ( SP DIGIT ) )
4360   day = 2DIGIT
4361
4362
4363
4364
4365
4366
4367Fielding, et al.        Expires October 20, 2011               [Page 78]
4368
4369Internet-Draft              HTTP/1.1, Part 1                  April 2011
4370
4371
4372   day-name = %x4D.6F.6E ; Mon
4373    / %x54.75.65 ; Tue
4374    / %x57.65.64 ; Wed
4375    / %x54.68.75 ; Thu
4376    / %x46.72.69 ; Fri
4377    / %x53.61.74 ; Sat
4378    / %x53.75.6E ; Sun
4379   day-name-l = %x4D.6F.6E.64.61.79 ; Monday
4380    / %x54.75.65.73.64.61.79 ; Tuesday
4381    / %x57.65.64.6E.65.73.64.61.79 ; Wednesday
4382    / %x54.68.75.72.73.64.61.79 ; Thursday
4383    / %x46.72.69.64.61.79 ; Friday
4384    / %x53.61.74.75.72.64.61.79 ; Saturday
4385    / %x53.75.6E.64.61.79 ; Sunday
4386
4387   field-content = *( WSP / VCHAR / obs-text )
4388   field-name = token
4389   field-value = *( field-content / OWS )
4390
4391   header-field = field-name ":" OWS [ field-value ] OWS
4392   hour = 2DIGIT
4393   http-URI = "http://" authority path-abempty [ "?" query ]
4394   https-URI = "https://" authority path-abempty [ "?" query ]
4395
4396   last-chunk = 1*"0" *WSP [ chunk-ext ] CRLF
4397
4398   message-body = *OCTET
4399   minute = 2DIGIT
4400   month = %x4A.61.6E ; Jan
4401    / %x46.65.62 ; Feb
4402    / %x4D.61.72 ; Mar
4403    / %x41.70.72 ; Apr
4404    / %x4D.61.79 ; May
4405    / %x4A.75.6E ; Jun
4406    / %x4A.75.6C ; Jul
4407    / %x41.75.67 ; Aug
4408    / %x53.65.70 ; Sep
4409    / %x4F.63.74 ; Oct
4410    / %x4E.6F.76 ; Nov
4411    / %x44.65.63 ; Dec
4412
4413   obs-date = rfc850-date / asctime-date
4414   obs-fold = CRLF
4415   obs-text = %x80-FF
4416
4417   partial-URI = relative-part [ "?" query ]
4418   path-abempty = <path-abempty, defined in [RFC3986], Section 3.3>
4419   path-absolute = <path-absolute, defined in [RFC3986], Section 3.3>
4420
4421
4422
4423Fielding, et al.        Expires October 20, 2011               [Page 79]
4424
4425Internet-Draft              HTTP/1.1, Part 1                  April 2011
4426
4427
4428   port = <port, defined in [RFC3986], Section 3.2.3>
4429   product = token [ "/" product-version ]
4430   product-version = token
4431   protocol-name = token
4432   protocol-version = token
4433   pseudonym = token
4434
4435   qdtext = OWS / "!" / %x23-5B ; '#'-'['
4436    / %x5D-7E ; ']'-'~'
4437    / obs-text
4438   qdtext-nf = WSP / "!" / %x23-5B ; '#'-'['
4439    / %x5D-7E ; ']'-'~'
4440    / obs-text
4441   query = <query, defined in [RFC3986], Section 3.4>
4442   quoted-cpair = "\" ( WSP / VCHAR / obs-text )
4443   quoted-pair = "\" ( WSP / VCHAR / obs-text )
4444   quoted-str-nf = DQUOTE *( qdtext-nf / quoted-pair ) DQUOTE
4445   quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
4446   qvalue = ( "0" [ "." *3DIGIT ] ) / ( "1" [ "." *3"0" ] )
4447
4448   received-by = ( uri-host [ ":" port ] ) / pseudonym
4449   received-protocol = [ protocol-name "/" ] protocol-version
4450   relative-part = <relative-part, defined in [RFC3986], Section 4.2>
4451   request-target = "*" / absolute-URI / ( path-absolute [ "?" query ] )
4452    / authority
4453   rfc1123-date = day-name "," SP date1 SP time-of-day SP GMT
4454   rfc850-date = day-name-l "," SP date2 SP time-of-day SP GMT
4455
4456   second = 2DIGIT
4457   special = "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\" /
4458    DQUOTE / "/" / "[" / "]" / "?" / "=" / "{" / "}"
4459   start-line = Request-Line / Status-Line
4460
4461   t-codings = "trailers" / ( transfer-extension [ te-params ] )
4462   tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." /
4463    "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA
4464   te-ext = OWS ";" OWS token [ "=" word ]
4465   te-params = OWS ";" OWS "q=" qvalue *te-ext
4466   time-of-day = hour ":" minute ":" second
4467   token = 1*tchar
4468   trailer-part = *( header-field CRLF )
4469   transfer-coding = "chunked" / "compress" / "deflate" / "gzip" /
4470    transfer-extension
4471   transfer-extension = token *( OWS ";" OWS transfer-parameter )
4472   transfer-parameter = attribute BWS "=" BWS value
4473
4474   uri-host = <host, defined in [RFC3986], Section 3.2.2>
4475
4476
4477
4478
4479Fielding, et al.        Expires October 20, 2011               [Page 80]
4480
4481Internet-Draft              HTTP/1.1, Part 1                  April 2011
4482
4483
4484   value = word
4485
4486   word = token / quoted-string
4487
4488   year = 4DIGIT
4489
4490   ABNF diagnostics:
4491
4492   ; Chunked-Body defined but not used
4493   ; Connection defined but not used
4494   ; Content-Length defined but not used
4495   ; Date defined but not used
4496   ; HTTP-message defined but not used
4497   ; Host defined but not used
4498   ; Request defined but not used
4499   ; Response defined but not used
4500   ; TE defined but not used
4501   ; Trailer defined but not used
4502   ; Transfer-Encoding defined but not used
4503   ; URI-reference defined but not used
4504   ; Upgrade defined but not used
4505   ; Via defined but not used
4506   ; http-URI defined but not used
4507   ; https-URI defined but not used
4508   ; partial-URI defined but not used
4509   ; special defined but not used
4510
4511Appendix D.  Change Log (to be removed by RFC Editor before publication)
4512
4513D.1.  Since RFC 2616
4514
4515   Extracted relevant partitions from [RFC2616].
4516
4517D.2.  Since draft-ietf-httpbis-p1-messaging-00
4518
4519   Closed issues:
4520
4521   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/1>: "HTTP Version
4522      should be case sensitive"
4523      (<http://purl.org/NET/http-errata#verscase>)
4524
4525   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/2>: "'unsafe'
4526      characters" (<http://purl.org/NET/http-errata#unsafe-uri>)
4527
4528   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/3>: "Chunk Size
4529      Definition" (<http://purl.org/NET/http-errata#chunk-size>)
4530
4531
4532
4533
4534
4535Fielding, et al.        Expires October 20, 2011               [Page 81]
4536
4537Internet-Draft              HTTP/1.1, Part 1                  April 2011
4538
4539
4540   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/4>: "Message Length"
4541      (<http://purl.org/NET/http-errata#msg-len-chars>)
4542
4543   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/8>: "Media Type
4544      Registrations" (<http://purl.org/NET/http-errata#media-reg>)
4545
4546   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/11>: "URI includes
4547      query" (<http://purl.org/NET/http-errata#uriquery>)
4548
4549   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/15>: "No close on
4550      1xx responses" (<http://purl.org/NET/http-errata#noclose1xx>)
4551
4552   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/16>: "Remove
4553      'identity' token references"
4554      (<http://purl.org/NET/http-errata#identity>)
4555
4556   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/26>: "Import query
4557      BNF"
4558
4559   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/31>: "qdtext BNF"
4560
4561   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/35>: "Normative and
4562      Informative references"
4563
4564   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/42>: "RFC2606
4565      Compliance"
4566
4567   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/45>: "RFC977
4568      reference"
4569
4570   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/46>: "RFC1700
4571      references"
4572
4573   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/47>: "inconsistency
4574      in date format explanation"
4575
4576   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/48>: "Date reference
4577      typo"
4578
4579   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/65>: "Informative
4580      references"
4581
4582   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/66>: "ISO-8859-1
4583      Reference"
4584
4585   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/86>: "Normative up-
4586      to-date references"
4587
4588
4589
4590
4591Fielding, et al.        Expires October 20, 2011               [Page 82]
4592
4593Internet-Draft              HTTP/1.1, Part 1                  April 2011
4594
4595
4596   Other changes:
4597
4598   o  Update media type registrations to use RFC4288 template.
4599
4600   o  Use names of RFC4234 core rules DQUOTE and WSP, fix broken ABNF
4601      for chunk-data (work in progress on
4602      <http://tools.ietf.org/wg/httpbis/trac/ticket/36>)
4603
4604D.3.  Since draft-ietf-httpbis-p1-messaging-01
4605
4606   Closed issues:
4607
4608   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/19>: "Bodies on GET
4609      (and other) requests"
4610
4611   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/55>: "Updating to
4612      RFC4288"
4613
4614   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/57>: "Status Code
4615      and Reason Phrase"
4616
4617   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/82>: "rel_path not
4618      used"
4619
4620   Ongoing work on ABNF conversion
4621   (<http://tools.ietf.org/wg/httpbis/trac/ticket/36>):
4622
4623   o  Get rid of duplicate BNF rule names ("host" -> "uri-host",
4624      "trailer" -> "trailer-part").
4625
4626   o  Avoid underscore character in rule names ("http_URL" -> "http-
4627      URL", "abs_path" -> "path-absolute").
4628
4629   o  Add rules for terms imported from URI spec ("absoluteURI",
4630      "authority", "path-absolute", "port", "query", "relativeURI",
4631      "host) -- these will have to be updated when switching over to
4632      RFC3986.
4633
4634   o  Synchronize core rules with RFC5234.
4635
4636   o  Get rid of prose rules that span multiple lines.
4637
4638   o  Get rid of unused rules LOALPHA and UPALPHA.
4639
4640   o  Move "Product Tokens" section (back) into Part 1, as "token" is
4641      used in the definition of the Upgrade header field.
4642
4643
4644
4645
4646
4647Fielding, et al.        Expires October 20, 2011               [Page 83]
4648
4649Internet-Draft              HTTP/1.1, Part 1                  April 2011
4650
4651
4652   o  Add explicit references to BNF syntax and rules imported from
4653      other parts of the specification.
4654
4655   o  Rewrite prose rule "token" in terms of "tchar", rewrite prose rule
4656      "TEXT".
4657
4658D.4.  Since draft-ietf-httpbis-p1-messaging-02
4659
4660   Closed issues:
4661
4662   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/51>: "HTTP-date vs.
4663      rfc1123-date"
4664
4665   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/64>: "WS in quoted-
4666      pair"
4667
4668   Ongoing work on IANA Message Header Field Registration
4669   (<http://tools.ietf.org/wg/httpbis/trac/ticket/40>):
4670
4671   o  Reference RFC 3984, and update header field registrations for
4672      headers defined in this document.
4673
4674   Ongoing work on ABNF conversion
4675   (<http://tools.ietf.org/wg/httpbis/trac/ticket/36>):
4676
4677   o  Replace string literals when the string really is case-sensitive
4678      (HTTP-Version).
4679
4680D.5.  Since draft-ietf-httpbis-p1-messaging-03
4681
4682   Closed issues:
4683
4684   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/28>: "Connection
4685      closing"
4686
4687   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/97>: "Move
4688      registrations and registry information to IANA Considerations"
4689
4690   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/120>: "need new URL
4691      for PAD1995 reference"
4692
4693   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/127>: "IANA
4694      Considerations: update HTTP URI scheme registration"
4695
4696   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/128>: "Cite HTTPS
4697      URI scheme definition"
4698
4699
4700
4701
4702
4703Fielding, et al.        Expires October 20, 2011               [Page 84]
4704
4705Internet-Draft              HTTP/1.1, Part 1                  April 2011
4706
4707
4708   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/129>: "List-type
4709      headers vs Set-Cookie"
4710
4711   Ongoing work on ABNF conversion
4712   (<http://tools.ietf.org/wg/httpbis/trac/ticket/36>):
4713
4714   o  Replace string literals when the string really is case-sensitive
4715      (HTTP-Date).
4716
4717   o  Replace HEX by HEXDIG for future consistence with RFC 5234's core
4718      rules.
4719
4720D.6.  Since draft-ietf-httpbis-p1-messaging-04
4721
4722   Closed issues:
4723
4724   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/34>: "Out-of-date
4725      reference for URIs"
4726
4727   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/132>: "RFC 2822 is
4728      updated by RFC 5322"
4729
4730   Ongoing work on ABNF conversion
4731   (<http://tools.ietf.org/wg/httpbis/trac/ticket/36>):
4732
4733   o  Use "/" instead of "|" for alternatives.
4734
4735   o  Get rid of RFC822 dependency; use RFC5234 plus extensions instead.
4736
4737   o  Only reference RFC 5234's core rules.
4738
4739   o  Introduce new ABNF rules for "bad" whitespace ("BWS"), optional
4740      whitespace ("OWS") and required whitespace ("RWS").
4741
4742   o  Rewrite ABNFs to spell out whitespace rules, factor out header
4743      field value format definitions.
4744
4745D.7.  Since draft-ietf-httpbis-p1-messaging-05
4746
4747   Closed issues:
4748
4749   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/30>: "Header LWS"
4750
4751   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/52>: "Sort 1.3
4752      Terminology"
4753
4754   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/63>: "RFC2047
4755      encoded words"
4756
4757
4758
4759Fielding, et al.        Expires October 20, 2011               [Page 85]
4760
4761Internet-Draft              HTTP/1.1, Part 1                  April 2011
4762
4763
4764   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/74>: "Character
4765      Encodings in TEXT"
4766
4767   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/77>: "Line Folding"
4768
4769   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/83>: "OPTIONS * and
4770      proxies"
4771
4772   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/94>: "Reason-Phrase
4773      BNF"
4774
4775   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/111>: "Use of TEXT"
4776
4777   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/118>: "Join
4778      "Differences Between HTTP Entities and RFC 2045 Entities"?"
4779
4780   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/134>: "RFC822
4781      reference left in discussion of date formats"
4782
4783   Final work on ABNF conversion
4784   (<http://tools.ietf.org/wg/httpbis/trac/ticket/36>):
4785
4786   o  Rewrite definition of list rules, deprecate empty list elements.
4787
4788   o  Add appendix containing collected and expanded ABNF.
4789
4790   Other changes:
4791
4792   o  Rewrite introduction; add mostly new Architecture Section.
4793
4794   o  Move definition of quality values from Part 3 into Part 1; make TE
4795      request header field grammar independent of accept-params (defined
4796      in Part 3).
4797
4798D.8.  Since draft-ietf-httpbis-p1-messaging-06
4799
4800   Closed issues:
4801
4802   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/161>: "base for
4803      numeric protocol elements"
4804
4805   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/162>: "comment ABNF"
4806
4807   Partly resolved issues:
4808
4809   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/88>: "205 Bodies"
4810      (took out language that implied that there might be methods for
4811      which a request body MUST NOT be included)
4812
4813
4814
4815Fielding, et al.        Expires October 20, 2011               [Page 86]
4816
4817Internet-Draft              HTTP/1.1, Part 1                  April 2011
4818
4819
4820   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/163>: "editorial
4821      improvements around HTTP-date"
4822
4823D.9.  Since draft-ietf-httpbis-p1-messaging-07
4824
4825   Closed issues:
4826
4827   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/93>: "Repeating
4828      single-value headers"
4829
4830   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/131>: "increase
4831      connection limit"
4832
4833   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/157>: "IP addresses
4834      in URLs"
4835
4836   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/172>: "take over
4837      HTTP Upgrade Token Registry"
4838
4839   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/173>: "CR and LF in
4840      chunk extension values"
4841
4842   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/184>: "HTTP/0.9
4843      support"
4844
4845   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/188>: "pick IANA
4846      policy (RFC5226) for Transfer Coding / Content Coding"
4847
4848   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/189>: "move
4849      definitions of gzip/deflate/compress to part 1"
4850
4851   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/194>: "disallow
4852      control characters in quoted-pair"
4853
4854   Partly resolved issues:
4855
4856   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/148>: "update IANA
4857      requirements wrt Transfer-Coding values" (add the IANA
4858      Considerations subsection)
4859
4860D.10.  Since draft-ietf-httpbis-p1-messaging-08
4861
4862   Closed issues:
4863
4864   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/201>: "header
4865      parsing, treatment of leading and trailing OWS"
4866
4867   Partly resolved issues:
4868
4869
4870
4871Fielding, et al.        Expires October 20, 2011               [Page 87]
4872
4873Internet-Draft              HTTP/1.1, Part 1                  April 2011
4874
4875
4876   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/60>: "Placement of
4877      13.5.1 and 13.5.2"
4878
4879   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/200>: "use of term
4880      "word" when talking about header structure"
4881
4882D.11.  Since draft-ietf-httpbis-p1-messaging-09
4883
4884   Closed issues:
4885
4886   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/73>: "Clarification
4887      of the term 'deflate'"
4888
4889   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/83>: "OPTIONS * and
4890      proxies"
4891
4892   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/122>: "MIME-Version
4893      not listed in P1, general header fields"
4894
4895   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/143>: "IANA registry
4896      for content/transfer encodings"
4897
4898   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/165>: "Case-
4899      sensitivity of HTTP-date"
4900
4901   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/200>: "use of term
4902      "word" when talking about header structure"
4903
4904   Partly resolved issues:
4905
4906   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/196>: "Term for the
4907      requested resource's URI"
4908
4909D.12.  Since draft-ietf-httpbis-p1-messaging-10
4910
4911   Closed issues:
4912
4913   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/28>: "Connection
4914      Closing"
4915
4916   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/90>: "Delimiting
4917      messages with multipart/byteranges"
4918
4919   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/95>: "Handling
4920      multiple Content-Length headers"
4921
4922   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/109>: "Clarify
4923      entity / representation / variant terminology"
4924
4925
4926
4927Fielding, et al.        Expires October 20, 2011               [Page 88]
4928
4929Internet-Draft              HTTP/1.1, Part 1                  April 2011
4930
4931
4932   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/220>: "consider
4933      removing the 'changes from 2068' sections"
4934
4935   Partly resolved issues:
4936
4937   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/159>: "HTTP(s) URI
4938      scheme definitions"
4939
4940D.13.  Since draft-ietf-httpbis-p1-messaging-11
4941
4942   Closed issues:
4943
4944   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/193>: "Trailer
4945      requirements"
4946
4947   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/204>: "Text about
4948      clock requirement for caches belongs in p6"
4949
4950   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/221>: "effective
4951      request URI: handling of missing host in HTTP/1.0"
4952
4953   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/248>: "confusing
4954      Date requirements for clients"
4955
4956   Partly resolved issues:
4957
4958   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/95>: "Handling
4959      multiple Content-Length headers"
4960
4961D.14.  Since draft-ietf-httpbis-p1-messaging-12
4962
4963   Closed issues:
4964
4965   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/75>: "RFC2145
4966      Normative"
4967
4968   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/159>: "HTTP(s) URI
4969      scheme definitions" (tune the requirements on userinfo)
4970
4971   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/210>: "define
4972      'transparent' proxy"
4973
4974   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/224>: "Header
4975      Classification"
4976
4977   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/233>: "Is * usable
4978      as a request-uri for new methods?"
4979
4980
4981
4982
4983Fielding, et al.        Expires October 20, 2011               [Page 89]
4984
4985Internet-Draft              HTTP/1.1, Part 1                  April 2011
4986
4987
4988   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/240>: "Migrate
4989      Upgrade details from RFC2817"
4990
4991   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/276>: "untangle
4992      ABNFs for header fields"
4993
4994   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/279>: "update RFC
4995      2109 reference"
4996
4997D.15.  Since draft-ietf-httpbis-p1-messaging-13
4998
4999   Closed issues:
5000
5001   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/53>: "Allow is not
5002      in 13.5.2"
5003
5004   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/276>: "untangle
5005      ABNFs for header fields"
5006
5007   o  <http://tools.ietf.org/wg/httpbis/trac/ticket/286>: "Content-
5008      Length ABNF broken"
5009
5010Index
5011
5012   A
5013      absolute-URI form (of request-target)  29
5014      accelerator  13
5015      application/http Media Type  63
5016      asterisk form (of request-target)  28
5017      authority form (of request-target)  29
5018
5019   B
5020      browser  10
5021
5022   C
5023      cache  14
5024      cacheable  14
5025      captive portal  14
5026      chunked (Coding Format)  37
5027      client  10
5028      Coding Format
5029         chunked  37
5030         compress  40
5031         deflate  40
5032         gzip  40
5033      compress (Coding Format)  40
5034      connection  10
5035      Connection header field  51
5036
5037
5038
5039Fielding, et al.        Expires October 20, 2011               [Page 90]
5040
5041Internet-Draft              HTTP/1.1, Part 1                  April 2011
5042
5043
5044      Content-Length header field  53
5045
5046   D
5047      Date header field  53
5048      deflate (Coding Format)  40
5049      downstream  12
5050
5051   E
5052      effective request URI  31
5053
5054   G
5055      gateway  13
5056      Grammar
5057         absolute-URI  17
5058         ALPHA  7
5059         asctime-date  36
5060         attribute  36
5061         authority  17
5062         BWS  9
5063         chunk  37
5064         chunk-data  37
5065         chunk-ext  37
5066         chunk-ext-name  37
5067         chunk-ext-val  37
5068         chunk-size  37
5069         Chunked-Body  37
5070         comment  23
5071         Connection  52
5072         connection-token  52
5073         Content-Length  53
5074         CR  7
5075         CRLF  7
5076         ctext  23
5077         CTL  7
5078         Date  53
5079         date1  35
5080         date2  36
5081         date3  36
5082         day  35
5083         day-name  35
5084         day-name-l  35
5085         DIGIT  7
5086         DQUOTE  7
5087         field-content  22
5088         field-name  22
5089         field-value  22
5090         GMT  35
5091         header-field  22
5092
5093
5094
5095Fielding, et al.        Expires October 20, 2011               [Page 91]
5096
5097Internet-Draft              HTTP/1.1, Part 1                  April 2011
5098
5099
5100         HEXDIG  7
5101         Host  55
5102         hour  35
5103         HTTP-date  34
5104         HTTP-message  21
5105         HTTP-Prot-Name  15
5106         http-URI  18
5107         HTTP-Version  15
5108         https-URI  19
5109         last-chunk  37
5110         LF  7
5111         message-body  24
5112         Method  28
5113         minute  35
5114         month  35
5115         obs-date  35
5116         obs-text  10
5117         OCTET  7
5118         OWS  9
5119         path-absolute  17
5120         port  17
5121         product  41
5122         product-version  41
5123         protocol-name  60
5124         protocol-version  60
5125         pseudonym  60
5126         qdtext  10
5127         qdtext-nf  37
5128         query  17
5129         quoted-cpair  24
5130         quoted-pair  10
5131         quoted-str-nf  37
5132         quoted-string  10
5133         qvalue  41
5134         Reason-Phrase  33
5135         received-by  60
5136         received-protocol  60
5137         Request  28
5138         Request-Line  28
5139         request-target  28
5140         Response  32
5141         rfc850-date  36
5142         rfc1123-date  35
5143         RWS  9
5144         second  35
5145         SP  7
5146         special  9
5147         Status-Code  33
5148
5149
5150
5151Fielding, et al.        Expires October 20, 2011               [Page 92]
5152
5153Internet-Draft              HTTP/1.1, Part 1                  April 2011
5154
5155
5156         Status-Line  33
5157         t-codings  56
5158         tchar  9
5159         TE  56
5160         te-ext  56
5161         te-params  56
5162         time-of-day  35
5163         token  9
5164         Trailer  57
5165         trailer-part  37
5166         transfer-coding  36
5167         Transfer-Encoding  58
5168         transfer-extension  36
5169         transfer-parameter  36
5170         Upgrade  58
5171         uri-host  17
5172         URI-reference  17
5173         value  36
5174         VCHAR  7
5175         Via  60
5176         word  9
5177         WSP  7
5178         year  35
5179      gzip (Coding Format)  40
5180
5181   H
5182      header field  20
5183      Header Fields
5184         Connection  51
5185         Content-Length  53
5186         Date  53
5187         Host  55
5188         TE  56
5189         Trailer  57
5190         Transfer-Encoding  57
5191         Upgrade  58
5192         Via  60
5193      header section  20
5194      headers  20
5195      Host header field  55
5196      http URI scheme  18
5197      https URI scheme  19
5198
5199   I
5200      inbound  12
5201      interception proxy  14
5202      intermediary  12
5203
5204
5205
5206
5207Fielding, et al.        Expires October 20, 2011               [Page 93]
5208
5209Internet-Draft              HTTP/1.1, Part 1                  April 2011
5210
5211
5212   M
5213      Media Type
5214         application/http  63
5215         message/http  62
5216      message  11
5217      message/http Media Type  62
5218
5219   N
5220      non-transforming proxy  13
5221
5222   O
5223      origin form (of request-target)  29
5224      origin server  10
5225      outbound  12
5226
5227   P
5228      proxy  13
5229
5230   R
5231      recipient  10
5232      request  11
5233      resource  17
5234      response  11
5235      reverse proxy  13
5236
5237   S
5238      sender  10
5239      server  10
5240      spider  10
5241
5242   T
5243      target resource  31
5244      TE header field  56
5245      Trailer header field  57
5246      Transfer-Encoding header field  57
5247      transforming proxy  13
5248      transparent proxy  14
5249      tunnel  14
5250
5251   U
5252      Upgrade header field  58
5253      upstream  12
5254      URI scheme
5255         http  18
5256         https  19
5257      user agent  10
5258
5259   V
5260
5261
5262
5263Fielding, et al.        Expires October 20, 2011               [Page 94]
5264
5265Internet-Draft              HTTP/1.1, Part 1                  April 2011
5266
5267
5268      Via header field  60
5269
5270Authors' Addresses
5271
5272   Roy T. Fielding (editor)
5273   Adobe Systems Incorporated
5274   345 Park Ave
5275   San Jose, CA  95110
5276   USA
5277
5278   EMail: fielding@gbiv.com
5279   URI:   http://roy.gbiv.com/
5280
5281
5282   Jim Gettys
5283   Alcatel-Lucent Bell Labs
5284   21 Oak Knoll Road
5285   Carlisle, MA  01741
5286   USA
5287
5288   EMail: jg@freedesktop.org
5289   URI:   http://gettys.wordpress.com/
5290
5291
5292   Jeffrey C. Mogul
5293   Hewlett-Packard Company
5294   HP Labs, Large Scale Systems Group
5295   1501 Page Mill Road, MS 1177
5296   Palo Alto, CA  94304
5297   USA
5298
5299   EMail: JeffMogul@acm.org
5300
5301
5302   Henrik Frystyk Nielsen
5303   Microsoft Corporation
5304   1 Microsoft Way
5305   Redmond, WA  98052
5306   USA
5307
5308   EMail: henrikn@microsoft.com
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319Fielding, et al.        Expires October 20, 2011               [Page 95]
5320
5321Internet-Draft              HTTP/1.1, Part 1                  April 2011
5322
5323
5324   Larry Masinter
5325   Adobe Systems Incorporated
5326   345 Park Ave
5327   San Jose, CA  95110
5328   USA
5329
5330   EMail: LMM@acm.org
5331   URI:   http://larry.masinter.net/
5332
5333
5334   Paul J. Leach
5335   Microsoft Corporation
5336   1 Microsoft Way
5337   Redmond, WA  98052
5338
5339   EMail: paulle@microsoft.com
5340
5341
5342   Tim Berners-Lee
5343   World Wide Web Consortium
5344   MIT Computer Science and Artificial Intelligence Laboratory
5345   The Stata Center, Building 32
5346   32 Vassar Street
5347   Cambridge, MA  02139
5348   USA
5349
5350   EMail: timbl@w3.org
5351   URI:   http://www.w3.org/People/Berners-Lee/
5352
5353
5354   Yves Lafon (editor)
5355   World Wide Web Consortium
5356   W3C / ERCIM
5357   2004, rte des Lucioles
5358   Sophia-Antipolis, AM  06902
5359   France
5360
5361   EMail: ylafon@w3.org
5362   URI:   http://www.raubacapeu.net/people/yves/
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375Fielding, et al.        Expires October 20, 2011               [Page 96]
5376
5377Internet-Draft              HTTP/1.1, Part 1                  April 2011
5378
5379
5380   Julian F. Reschke (editor)
5381   greenbytes GmbH
5382   Hafenweg 16
5383   Muenster, NW  48155
5384   Germany
5385
5386   Phone: +49 251 2807760
5387   Fax:   +49 251 2807761
5388   EMail: julian.reschke@greenbytes.de
5389   URI:   http://greenbytes.de/tech/webdav/
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431Fielding, et al.        Expires October 20, 2011               [Page 97]
5432
Note: See TracBrowser for help on using the repository browser.