source: draft-ietf-httpbis/latest/p1-messaging.xml @ 1311

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

clarify the change log entry about HTTP-Version being case-sensitive

  • Property svn:eol-style set to native
File size: 249.2 KB
1<?xml version="1.0" encoding="utf-8"?>
2<?xml-stylesheet type='text/xsl' href='../myxml2rfc.xslt'?>
3<!DOCTYPE rfc [
4  <!ENTITY MAY "<bcp14 xmlns=''>MAY</bcp14>">
5  <!ENTITY MUST "<bcp14 xmlns=''>MUST</bcp14>">
6  <!ENTITY MUST-NOT "<bcp14 xmlns=''>MUST NOT</bcp14>">
7  <!ENTITY OPTIONAL "<bcp14 xmlns=''>OPTIONAL</bcp14>">
8  <!ENTITY RECOMMENDED "<bcp14 xmlns=''>RECOMMENDED</bcp14>">
9  <!ENTITY REQUIRED "<bcp14 xmlns=''>REQUIRED</bcp14>">
10  <!ENTITY SHALL "<bcp14 xmlns=''>SHALL</bcp14>">
11  <!ENTITY SHALL-NOT "<bcp14 xmlns=''>SHALL NOT</bcp14>">
12  <!ENTITY SHOULD "<bcp14 xmlns=''>SHOULD</bcp14>">
13  <!ENTITY SHOULD-NOT "<bcp14 xmlns=''>SHOULD NOT</bcp14>">
14  <!ENTITY ID-VERSION "latest">
15  <!ENTITY ID-MONTH "June">
16  <!ENTITY ID-YEAR "2011">
17  <!ENTITY mdash "&#8212;">
18  <!ENTITY caching-overview       "<xref target='Part6' x:rel='#caching.overview' xmlns:x=''/>">
19  <!ENTITY cache-incomplete       "<xref target='Part6' x:rel='#errors.or.incomplete.response.cache.behavior' xmlns:x=''/>">
20  <!ENTITY payload                "<xref target='Part3' xmlns:x=''/>">
21  <!ENTITY media-types            "<xref target='Part3' x:rel='#media.types' xmlns:x=''/>">
22  <!ENTITY content-codings        "<xref target='Part3' x:rel='#content.codings' xmlns:x=''/>">
23  <!ENTITY CONNECT                "<xref target='Part2' x:rel='#CONNECT' xmlns:x=''/>">
24  <!ENTITY content.negotiation    "<xref target='Part3' x:rel='#content.negotiation' xmlns:x=''/>">
25  <!ENTITY diff-mime              "<xref target='Part3' x:rel='#differences.between.http.and.mime' xmlns:x=''/>">
26  <!ENTITY representation         "<xref target='Part3' x:rel='#representation' xmlns:x=''/>">
27  <!ENTITY header-cache-control   "<xref target='Part6' x:rel='#header.cache-control' xmlns:x=''/>">
28  <!ENTITY header-expect          "<xref target='Part2' x:rel='#header.expect' xmlns:x=''/>">
29  <!ENTITY header-mime-version    "<xref target='Part3' x:rel='#mime-version' xmlns:x=''/>">
30  <!ENTITY header-pragma          "<xref target='Part6' x:rel='#header.pragma' xmlns:x=''/>">
31  <!ENTITY header-warning         "<xref target='Part6' x:rel='#header.warning' xmlns:x=''/>">
32  <!ENTITY idempotent-methods     "<xref target='Part2' x:rel='#idempotent.methods' xmlns:x=''/>">
33  <!ENTITY status-codes           "<xref target='Part2' x:rel='' xmlns:x=''/>">
34  <!ENTITY status-100             "<xref target='Part2' x:rel='#status.100' xmlns:x=''/>">
35  <!ENTITY status-1xx             "<xref target='Part2' x:rel='#status.1xx' xmlns:x=''/>">
36  <!ENTITY status-203             "<xref target='Part2' x:rel='#status.203' xmlns:x=''/>">
37  <!ENTITY status-3xx             "<xref target='Part2' x:rel='#status.3xx' xmlns:x=''/>">
38  <!ENTITY status-414             "<xref target='Part2' x:rel='#status.414' xmlns:x=''/>">
40<?rfc toc="yes" ?>
41<?rfc symrefs="yes" ?>
42<?rfc sortrefs="yes" ?>
43<?rfc compact="yes"?>
44<?rfc subcompact="no" ?>
45<?rfc linkmailto="no" ?>
46<?rfc editing="no" ?>
47<?rfc comments="yes"?>
48<?rfc inline="yes"?>
49<?rfc rfcedstyle="yes"?>
50<?rfc-ext allow-markup-in-artwork="yes" ?>
51<?rfc-ext include-references-in-index="yes" ?>
52<rfc obsoletes="2145,2616" updates="2817" category="std" x:maturity-level="draft"
53     ipr="pre5378Trust200902" docName="draft-ietf-httpbis-p1-messaging-&ID-VERSION;"
54     xmlns:x=''>
57  <title abbrev="HTTP/1.1, Part 1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title>
59  <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
60    <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
61    <address>
62      <postal>
63        <street>345 Park Ave</street>
64        <city>San Jose</city>
65        <region>CA</region>
66        <code>95110</code>
67        <country>USA</country>
68      </postal>
69      <email></email>
70      <uri></uri>
71    </address>
72  </author>
74  <author initials="J." surname="Gettys" fullname="Jim Gettys">
75    <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
76    <address>
77      <postal>
78        <street>21 Oak Knoll Road</street>
79        <city>Carlisle</city>
80        <region>MA</region>
81        <code>01741</code>
82        <country>USA</country>
83      </postal>
84      <email></email>
85      <uri></uri>
86    </address>
87  </author>
89  <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
90    <organization abbrev="HP">Hewlett-Packard Company</organization>
91    <address>
92      <postal>
93        <street>HP Labs, Large Scale Systems Group</street>
94        <street>1501 Page Mill Road, MS 1177</street>
95        <city>Palo Alto</city>
96        <region>CA</region>
97        <code>94304</code>
98        <country>USA</country>
99      </postal>
100      <email></email>
101    </address>
102  </author>
104  <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
105    <organization abbrev="Microsoft">Microsoft Corporation</organization>
106    <address>
107      <postal>
108        <street>1 Microsoft Way</street>
109        <city>Redmond</city>
110        <region>WA</region>
111        <code>98052</code>
112        <country>USA</country>
113      </postal>
114      <email></email>
115    </address>
116  </author>
118  <author initials="L." surname="Masinter" fullname="Larry Masinter">
119    <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
120    <address>
121      <postal>
122        <street>345 Park Ave</street>
123        <city>San Jose</city>
124        <region>CA</region>
125        <code>95110</code>
126        <country>USA</country>
127      </postal>
128      <email></email>
129      <uri></uri>
130    </address>
131  </author>
133  <author initials="P." surname="Leach" fullname="Paul J. Leach">
134    <organization abbrev="Microsoft">Microsoft Corporation</organization>
135    <address>
136      <postal>
137        <street>1 Microsoft Way</street>
138        <city>Redmond</city>
139        <region>WA</region>
140        <code>98052</code>
141      </postal>
142      <email></email>
143    </address>
144  </author>
146  <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
147    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
148    <address>
149      <postal>
150        <street>MIT Computer Science and Artificial Intelligence Laboratory</street>
151        <street>The Stata Center, Building 32</street>
152        <street>32 Vassar Street</street>
153        <city>Cambridge</city>
154        <region>MA</region>
155        <code>02139</code>
156        <country>USA</country>
157      </postal>
158      <email></email>
159      <uri></uri>
160    </address>
161  </author>
163  <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
164    <organization abbrev="W3C">World Wide Web Consortium</organization>
165    <address>
166      <postal>
167        <street>W3C / ERCIM</street>
168        <street>2004, rte des Lucioles</street>
169        <city>Sophia-Antipolis</city>
170        <region>AM</region>
171        <code>06902</code>
172        <country>France</country>
173      </postal>
174      <email></email>
175      <uri></uri>
176    </address>
177  </author>
179  <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
180    <organization abbrev="greenbytes">greenbytes GmbH</organization>
181    <address>
182      <postal>
183        <street>Hafenweg 16</street>
184        <city>Muenster</city><region>NW</region><code>48155</code>
185        <country>Germany</country>
186      </postal>
187      <phone>+49 251 2807760</phone>
188      <facsimile>+49 251 2807761</facsimile>
189      <email></email>
190      <uri></uri>
191    </address>
192  </author>
194  <date month="&ID-MONTH;" year="&ID-YEAR;"/>
195  <workgroup>HTTPbis Working Group</workgroup>
199   The Hypertext Transfer Protocol (HTTP) is an application-level
200   protocol for distributed, collaborative, hypertext information
201   systems. HTTP has been in use by the World Wide Web global information
202   initiative since 1990. This document is Part 1 of the seven-part specification
203   that defines the protocol referred to as "HTTP/1.1" and, taken together,
204   obsoletes RFC 2616.  Part 1 provides an overview of HTTP and
205   its associated terminology, defines the "http" and "https" Uniform
206   Resource Identifier (URI) schemes, defines the generic message syntax
207   and parsing requirements for HTTP message frames, and describes
208   general security concerns for implementations.
212<note title="Editorial Note (To be removed by RFC Editor)">
213  <t>
214    Discussion of this draft should take place on the HTTPBIS working group
215    mailing list (, which is archived at
216    <eref target=""/>.
217  </t>
218  <t>
219    The current issues list is at
220    <eref target=""/> and related
221    documents (including fancy diffs) can be found at
222    <eref target=""/>.
223  </t>
224  <t>
225    The changes in this draft are summarized in <xref target="changes.since.14"/>.
226  </t>
230<section title="Introduction" anchor="introduction">
232   The Hypertext Transfer Protocol (HTTP) is an application-level
233   request/response protocol that uses extensible semantics and MIME-like
234   message payloads for flexible interaction with network-based hypertext
235   information systems. HTTP relies upon the Uniform Resource Identifier (URI)
236   standard <xref target="RFC3986"/> to indicate the target resource and
237   relationships between resources.
238   Messages are passed in a format similar to that used by Internet mail
239   <xref target="RFC5322"/> and the Multipurpose Internet Mail Extensions
240   (MIME) <xref target="RFC2045"/> (see &diff-mime; for the differences
241   between HTTP and MIME messages).
244   HTTP is a generic interface protocol for information systems. It is
245   designed to hide the details of how a service is implemented by presenting
246   a uniform interface to clients that is independent of the types of
247   resources provided. Likewise, servers do not need to be aware of each
248   client's purpose: an HTTP request can be considered in isolation rather
249   than being associated with a specific type of client or a predetermined
250   sequence of application steps. The result is a protocol that can be used
251   effectively in many different contexts and for which implementations can
252   evolve independently over time.
255   HTTP is also designed for use as an intermediation protocol for translating
256   communication to and from non-HTTP information systems.
257   HTTP proxies and gateways can provide access to alternative information
258   services by translating their diverse protocols into a hypertext
259   format that can be viewed and manipulated by clients in the same way
260   as HTTP services.
263   One consequence of HTTP flexibility is that the protocol cannot be
264   defined in terms of what occurs behind the interface. Instead, we
265   are limited to defining the syntax of communication, the intent
266   of received communication, and the expected behavior of recipients.
267   If the communication is considered in isolation, then successful
268   actions ought to be reflected in corresponding changes to the
269   observable interface provided by servers. However, since multiple
270   clients might act in parallel and perhaps at cross-purposes, we
271   cannot require that such changes be observable beyond the scope
272   of a single response.
275   This document is Part 1 of the seven-part specification of HTTP,
276   defining the protocol referred to as "HTTP/1.1", obsoleting
277   <xref target="RFC2616"/> and <xref target="RFC2145"/>.
278   Part 1 describes the architectural elements that are used or
279   referred to in HTTP, defines the "http" and "https" URI schemes,
280   describes overall network operation and connection management,
281   and defines HTTP message framing and forwarding requirements.
282   Our goal is to define all of the mechanisms necessary for HTTP message
283   handling that are independent of message semantics, thereby defining the
284   complete set of requirements for message parsers and
285   message-forwarding intermediaries.
288<section title="Requirements" anchor="intro.requirements">
290   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
291   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
292   document are to be interpreted as described in <xref target="RFC2119"/>.
295   An implementation is not compliant if it fails to satisfy one or more
296   of the "MUST" or "REQUIRED" level requirements for the protocols it
297   implements. An implementation that satisfies all the "MUST" or "REQUIRED"
298   level and all the "SHOULD" level requirements for its protocols is said
299   to be "unconditionally compliant"; one that satisfies all the "MUST"
300   level requirements but not all the "SHOULD" level requirements for its
301   protocols is said to be "conditionally compliant".
305<section title="Syntax Notation" anchor="notation">
306<iref primary="true" item="Grammar" subitem="ALPHA"/>
307<iref primary="true" item="Grammar" subitem="CR"/>
308<iref primary="true" item="Grammar" subitem="CRLF"/>
309<iref primary="true" item="Grammar" subitem="CTL"/>
310<iref primary="true" item="Grammar" subitem="DIGIT"/>
311<iref primary="true" item="Grammar" subitem="DQUOTE"/>
312<iref primary="true" item="Grammar" subitem="HEXDIG"/>
313<iref primary="true" item="Grammar" subitem="LF"/>
314<iref primary="true" item="Grammar" subitem="OCTET"/>
315<iref primary="true" item="Grammar" subitem="SP"/>
316<iref primary="true" item="Grammar" subitem="VCHAR"/>
317<iref primary="true" item="Grammar" subitem="WSP"/>
319   This specification uses the Augmented Backus-Naur Form (ABNF) notation
320   of <xref target="RFC5234"/>.
322<t anchor="core.rules">
323  <x:anchor-alias value="ALPHA"/>
324  <x:anchor-alias value="CTL"/>
325  <x:anchor-alias value="CR"/>
326  <x:anchor-alias value="CRLF"/>
327  <x:anchor-alias value="DIGIT"/>
328  <x:anchor-alias value="DQUOTE"/>
329  <x:anchor-alias value="HEXDIG"/>
330  <x:anchor-alias value="LF"/>
331  <x:anchor-alias value="OCTET"/>
332  <x:anchor-alias value="SP"/>
333  <x:anchor-alias value="VCHAR"/>
334  <x:anchor-alias value="WSP"/>
335   The following core rules are included by
336   reference, as defined in <xref target="RFC5234" x:fmt="," x:sec="B.1"/>:
337   ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls),
338   DIGIT (decimal 0-9), DQUOTE (double quote),
339   HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed),
340   OCTET (any 8-bit sequence of data), SP (space),
341   VCHAR (any visible <xref target="USASCII"/> character),
342   and WSP (whitespace).
345   As a syntactic convention, ABNF rule names prefixed with "obs-" denote
346   "obsolete" grammar rules that appear for historical reasons.
349<section title="ABNF Extension: #rule" anchor="notation.abnf">
351  The #rule extension to the ABNF rules of <xref target="RFC5234"/> is used to
352  improve readability.
355  A construct "#" is defined, similar to "*", for defining comma-delimited
356  lists of elements. The full form is "&lt;n&gt;#&lt;m&gt;element" indicating
357  at least &lt;n&gt; and at most &lt;m&gt; elements, each separated by a single
358  comma (",") and optional whitespace (OWS,
359  <xref target="basic.rules"/>).   
362  Thus,
363</preamble><artwork type="example">
364  1#element =&gt; element *( OWS "," OWS element )
367  and:
368</preamble><artwork type="example">
369  #element =&gt; [ 1#element ]
372  and for n &gt;= 1 and m &gt; 1:
373</preamble><artwork type="example">
374  &lt;n&gt;#&lt;m&gt;element =&gt; element &lt;n-1&gt;*&lt;m-1&gt;( OWS "," OWS element )
377  For compatibility with legacy list rules, recipients &SHOULD; accept empty
378  list elements. In other words, consumers would follow the list productions:
380<figure><artwork type="example">
381  #element =&gt; [ ( "," / element ) *( OWS "," [ OWS element ] ) ]
383  1#element =&gt; *( "," OWS ) element *( OWS "," [ OWS element ] )
386  Note that empty elements do not contribute to the count of elements present,
387  though.
390  For example, given these ABNF productions:
392<figure><artwork type="example">
393  example-list      = 1#example-list-elmt
394  example-list-elmt = token ; see <xref target="basic.rules"/>
397  Then these are valid values for example-list (not including the double
398  quotes, which are present for delimitation only):
400<figure><artwork type="example">
401  "foo,bar"
402  " foo ,bar,"
403  "  foo , ,bar,charlie   "
404  "foo ,bar,   charlie "
407  But these values would be invalid, as at least one non-empty element is
408  required:
410<figure><artwork type="example">
411  ""
412  ","
413  ",   ,"
416  <xref target="collected.abnf"/> shows the collected ABNF, with the list rules
417  expanded as explained above.
421<section title="Basic Rules" anchor="basic.rules">
422<t anchor="rule.CRLF">
423  <x:anchor-alias value="CRLF"/>
424   HTTP/1.1 defines the sequence CR LF as the end-of-line marker for all
425   protocol elements other than the message-body
426   (see <xref target="tolerant.applications"/> for tolerant applications).
428<t anchor="rule.LWS">
429   This specification uses three rules to denote the use of linear
430   whitespace: OWS (optional whitespace), RWS (required whitespace), and
431   BWS ("bad" whitespace).
434   The OWS rule is used where zero or more linear whitespace octets might
435   appear. OWS &SHOULD; either not be produced or be produced as a single
436   SP. Multiple OWS octets that occur within field-content &SHOULD;
437   be replaced with a single SP before interpreting the field value or
438   forwarding the message downstream.
441   RWS is used when at least one linear whitespace octet is required to
442   separate field tokens. RWS &SHOULD; be produced as a single SP.
443   Multiple RWS octets that occur within field-content &SHOULD; be
444   replaced with a single SP before interpreting the field value or
445   forwarding the message downstream.
448   BWS is used where the grammar allows optional whitespace for historical
449   reasons but senders &SHOULD-NOT; produce it in messages. HTTP/1.1
450   recipients &MUST; accept such bad optional whitespace and remove it before
451   interpreting the field value or forwarding the message downstream.
453<t anchor="rule.whitespace">
454  <x:anchor-alias value="BWS"/>
455  <x:anchor-alias value="OWS"/>
456  <x:anchor-alias value="RWS"/>
457  <x:anchor-alias value="obs-fold"/>
459<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="OWS"/><iref primary="true" item="Grammar" subitem="RWS"/><iref primary="true" item="Grammar" subitem="BWS"/>
460  <x:ref>OWS</x:ref>            = *( [ obs-fold ] <x:ref>WSP</x:ref> )
461                 ; "optional" whitespace
462  <x:ref>RWS</x:ref>            = 1*( [ obs-fold ] <x:ref>WSP</x:ref> )
463                 ; "required" whitespace
464  <x:ref>BWS</x:ref>            = <x:ref>OWS</x:ref>
465                 ; "bad" whitespace
466  <x:ref>obs-fold</x:ref>       = <x:ref>CRLF</x:ref>
467                 ; see <xref target="header.fields"/>
469<t anchor="rule.token.separators">
470  <x:anchor-alias value="tchar"/>
471  <x:anchor-alias value="token"/>
472  <x:anchor-alias value="special"/>
473  <x:anchor-alias value="word"/>
474   Many HTTP/1.1 header field values consist of words (token or quoted-string)
475   separated by whitespace or special characters. These special characters
476   &MUST; be in a quoted string to be used within a parameter value (as defined
477   in <xref target="transfer.codings"/>).
479<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="word"/><iref primary="true" item="Grammar" subitem="token"/><iref primary="true" item="Grammar" subitem="tchar"/><iref primary="true" item="Grammar" subitem="special"/>
480  <x:ref>word</x:ref>           = <x:ref>token</x:ref> / <x:ref>quoted-string</x:ref>
482  <x:ref>token</x:ref>          = 1*<x:ref>tchar</x:ref>
484  IMPORTANT: when editing "tchar" make sure that "special" is updated accordingly!!!
485 -->
486  <x:ref>tchar</x:ref>          = "!" / "#" / "$" / "%" / "&amp;" / "'" / "*"
487                 / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
488                 / <x:ref>DIGIT</x:ref> / <x:ref>ALPHA</x:ref>
489                 ; any <x:ref>VCHAR</x:ref>, except <x:ref>special</x:ref>
491  <x:ref>special</x:ref>        = "(" / ")" / "&lt;" / ">" / "@" / ","
492                 / ";" / ":" / "\" / DQUOTE / "/" / "["
493                 / "]" / "?" / "=" / "{" / "}"
495<t anchor="rule.quoted-string">
496  <x:anchor-alias value="quoted-string"/>
497  <x:anchor-alias value="qdtext"/>
498  <x:anchor-alias value="obs-text"/>
499   A string of text is parsed as a single word if it is quoted using
500   double-quote marks.
502<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="quoted-string"/><iref primary="true" item="Grammar" subitem="qdtext"/><iref primary="true" item="Grammar" subitem="obs-text"/>
503  <x:ref>quoted-string</x:ref>  = <x:ref>DQUOTE</x:ref> *( <x:ref>qdtext</x:ref> / <x:ref>quoted-pair</x:ref> ) <x:ref>DQUOTE</x:ref>
504  <x:ref>qdtext</x:ref>         = <x:ref>OWS</x:ref> / %x21 / %x23-5B / %x5D-7E / <x:ref>obs-text</x:ref>
505                 ; <x:ref>OWS</x:ref> / &lt;<x:ref>VCHAR</x:ref> except <x:ref>DQUOTE</x:ref> and "\"&gt; / <x:ref>obs-text</x:ref>
506  <x:ref>obs-text</x:ref>       = %x80-FF
508<t anchor="rule.quoted-pair">
509  <x:anchor-alias value="quoted-pair"/>
510   The backslash octet ("\") can be used as a single-octet
511   quoting mechanism within quoted-string constructs:
513<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="quoted-pair"/>
514  <x:ref>quoted-pair</x:ref>    = "\" ( <x:ref>WSP</x:ref> / <x:ref>VCHAR</x:ref> / <x:ref>obs-text</x:ref> )
517   Senders &SHOULD-NOT; escape octets that do not require escaping
518   (i.e., other than DQUOTE and the backslash octet).
525<section title="HTTP-related architecture" anchor="architecture">
527   HTTP was created for the World Wide Web architecture
528   and has evolved over time to support the scalability needs of a worldwide
529   hypertext system. Much of that architecture is reflected in the terminology
530   and syntax productions used to define HTTP.
533<section title="Client/Server Messaging" anchor="operation">
534<iref primary="true" item="client"/>
535<iref primary="true" item="server"/>
536<iref primary="true" item="connection"/>
538   HTTP is a stateless request/response protocol that operates by exchanging
539   messages across a reliable transport or session-layer
540   "<x:dfn>connection</x:dfn>". An HTTP "<x:dfn>client</x:dfn>" is a
541   program that establishes a connection to a server for the purpose of
542   sending one or more HTTP requests.  An HTTP "<x:dfn>server</x:dfn>" is a
543   program that accepts connections in order to service HTTP requests by
544   sending HTTP responses.
546<iref primary="true" item="user agent"/>
547<iref primary="true" item="origin server"/>
548<iref primary="true" item="browser"/>
549<iref primary="true" item="spider"/>
550<iref primary="true" item="sender"/>
551<iref primary="true" item="recipient"/>
553   Note that the terms client and server refer only to the roles that
554   these programs perform for a particular connection.  The same program
555   might act as a client on some connections and a server on others.  We use
556   the term "<x:dfn>user agent</x:dfn>" to refer to the program that initiates a request,
557   such as a WWW browser, editor, or spider (web-traversing robot), and
558   the term "<x:dfn>origin server</x:dfn>" to refer to the program that can originate
559   authoritative responses to a request.  For general requirements, we use
560   the term "<x:dfn>sender</x:dfn>" to refer to whichever component sent a given message
561   and the term "<x:dfn>recipient</x:dfn>" to refer to any component that receives the
562   message.
565   Most HTTP communication consists of a retrieval request (GET) for
566   a representation of some resource identified by a URI.  In the
567   simplest case, this might be accomplished via a single bidirectional
568   connection (===) between the user agent (UA) and the origin server (O).
570<figure><artwork type="drawing">
571         request   &gt;
572    UA ======================================= O
573                                &lt;   response
575<iref primary="true" item="message"/>
576<iref primary="true" item="request"/>
577<iref primary="true" item="response"/>
579   A client sends an HTTP request to the server in the form of a <x:dfn>request</x:dfn>
580   <x:dfn>message</x:dfn> (<xref target="request"/>), beginning with a method, URI, and
581   protocol version, followed by MIME-like header fields containing
582   request modifiers, client information, and payload metadata, an empty
583   line to indicate the end of the header section, and finally the payload
584   body (if any).
587   A server responds to the client's request by sending an HTTP <x:dfn>response</x:dfn>
588   <x:dfn>message</x:dfn> (<xref target="response"/>), beginning with a status line that
589   includes the protocol version, a success or error code, and textual
590   reason phrase, followed by MIME-like header fields containing server
591   information, resource metadata, and payload metadata, an empty line to
592   indicate the end of the header section, and finally the payload body (if any).
595   The following example illustrates a typical message exchange for a
596   GET request on the URI "":
599client request:
600</preamble><artwork type="message/http; msgtype=&#34;request&#34;" x:indent-with="  ">
601GET /hello.txt HTTP/1.1
602User-Agent: curl/7.16.3 libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3
604Accept: */*
608server response:
609</preamble><artwork type="message/http; msgtype=&#34;response&#34;" x:indent-with="  ">
610HTTP/1.1 200 OK
611Date: Mon, 27 Jul 2009 12:28:53 GMT
612Server: Apache
613Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT
614ETag: "34aa387-d-1568eb00"
615Accept-Ranges: bytes
616Content-Length: <x:length-of target="exbody"/>
617Vary: Accept-Encoding
618Content-Type: text/plain
620<x:span anchor="exbody">Hello World!
624<section title="Connections and Transport Independence" anchor="transport-independence">
626   HTTP messaging is independent of the underlying transport or
627   session-layer connection protocol(s).  HTTP only presumes a reliable
628   transport with in-order delivery of requests and the corresponding
629   in-order delivery of responses.  The mapping of HTTP request and
630   response structures onto the data units of the underlying transport
631   protocol is outside the scope of this specification.
634   The specific connection protocols to be used for an interaction
635   are determined by client configuration and the target resource's URI.
636   For example, the "http" URI scheme
637   (<xref target="http.uri"/>) indicates a default connection of TCP
638   over IP, with a default TCP port of 80, but the client might be
639   configured to use a proxy via some other connection port or protocol
640   instead of using the defaults.
643   A connection might be used for multiple HTTP request/response exchanges,
644   as defined in <xref target="persistent.connections"/>.
648<section title="Intermediaries" anchor="intermediaries">
649<iref primary="true" item="intermediary"/>
651   HTTP enables the use of intermediaries to satisfy requests through
652   a chain of connections.  There are three common forms of HTTP
653   <x:dfn>intermediary</x:dfn>: proxy, gateway, and tunnel.  In some cases,
654   a single intermediary might act as an origin server, proxy, gateway,
655   or tunnel, switching behavior based on the nature of each request.
657<figure><artwork type="drawing">
658         &gt;             &gt;             &gt;             &gt;
659    <x:highlight>UA</x:highlight> =========== <x:highlight>A</x:highlight> =========== <x:highlight>B</x:highlight> =========== <x:highlight>C</x:highlight> =========== <x:highlight>O</x:highlight>
660               &lt;             &lt;             &lt;             &lt;
663   The figure above shows three intermediaries (A, B, and C) between the
664   user agent and origin server. A request or response message that
665   travels the whole chain will pass through four separate connections.
666   Some HTTP communication options
667   might apply only to the connection with the nearest, non-tunnel
668   neighbor, only to the end-points of the chain, or to all connections
669   along the chain. Although the diagram is linear, each participant might
670   be engaged in multiple, simultaneous communications. For example, B
671   might be receiving requests from many clients other than A, and/or
672   forwarding requests to servers other than C, at the same time that it
673   is handling A's request.
676<iref primary="true" item="upstream"/><iref primary="true" item="downstream"/>
677<iref primary="true" item="inbound"/><iref primary="true" item="outbound"/>
678   We use the terms "<x:dfn>upstream</x:dfn>" and "<x:dfn>downstream</x:dfn>"
679   to describe various requirements in relation to the directional flow of a
680   message: all messages flow from upstream to downstream.
681   Likewise, we use the terms inbound and outbound to refer to
682   directions in relation to the request path:
683   "<x:dfn>inbound</x:dfn>" means toward the origin server and
684   "<x:dfn>outbound</x:dfn>" means toward the user agent.
686<t><iref primary="true" item="proxy"/>
687   A "<x:dfn>proxy</x:dfn>" is a message forwarding agent that is selected by the
688   client, usually via local configuration rules, to receive requests
689   for some type(s) of absolute URI and attempt to satisfy those
690   requests via translation through the HTTP interface.  Some translations
691   are minimal, such as for proxy requests for "http" URIs, whereas
692   other requests might require translation to and from entirely different
693   application-layer protocols. Proxies are often used to group an
694   organization's HTTP requests through a common intermediary for the
695   sake of security, annotation services, or shared caching.
698<iref primary="true" item="transforming proxy"/>
699<iref primary="true" item="non-transforming proxy"/>
700   An HTTP-to-HTTP proxy is called a "<x:dfn>transforming proxy</x:dfn>" if it is designed
701   or configured to modify request or response messages in a semantically
702   meaningful way (i.e., modifications, beyond those required by normal
703   HTTP processing, that change the message in a way that would be
704   significant to the original sender or potentially significant to
705   downstream recipients).  For example, a transforming proxy might be
706   acting as a shared annotation server (modifying responses to include
707   references to a local annotation database), a malware filter, a
708   format transcoder, or an intranet-to-Internet privacy filter.  Such
709   transformations are presumed to be desired by the client (or client
710   organization) that selected the proxy and are beyond the scope of
711   this specification.  However, when a proxy is not intended to transform
712   a given message, we use the term "<x:dfn>non-transforming proxy</x:dfn>" to target
713   requirements that preserve HTTP message semantics. See &status-203; and
714   &header-warning; for status and warning codes related to transformations.
716<t><iref primary="true" item="gateway"/><iref primary="true" item="reverse proxy"/>
717<iref primary="true" item="accelerator"/>
718   A "<x:dfn>gateway</x:dfn>" (a.k.a., "<x:dfn>reverse proxy</x:dfn>")
719   is a receiving agent that acts
720   as a layer above some other server(s) and translates the received
721   requests to the underlying server's protocol.  Gateways are often
722   used to encapsulate legacy or untrusted information services, to
723   improve server performance through "<x:dfn>accelerator</x:dfn>" caching, and to
724   enable partitioning or load-balancing of HTTP services across
725   multiple machines.
728   A gateway behaves as an origin server on its outbound connection and
729   as a user agent on its inbound connection.
730   All HTTP requirements applicable to an origin server
731   also apply to the outbound communication of a gateway.
732   A gateway communicates with inbound servers using any protocol that
733   it desires, including private extensions to HTTP that are outside
734   the scope of this specification.  However, an HTTP-to-HTTP gateway
735   that wishes to interoperate with third-party HTTP servers &MUST;
736   comply with HTTP user agent requirements on the gateway's inbound
737   connection and &MUST; implement the Connection
738   (<xref target="header.connection"/>) and Via (<xref target="header.via"/>)
739   header fields for both connections.
741<t><iref primary="true" item="tunnel"/>
742   A "<x:dfn>tunnel</x:dfn>" acts as a blind relay between two connections
743   without changing the messages. Once active, a tunnel is not
744   considered a party to the HTTP communication, though the tunnel might
745   have been initiated by an HTTP request. A tunnel ceases to exist when
746   both ends of the relayed connection are closed. Tunnels are used to
747   extend a virtual connection through an intermediary, such as when
748   transport-layer security is used to establish private communication
749   through a shared firewall proxy.
751<t><iref primary="true" item="interception proxy"/><iref primary="true" item="transparent proxy"/>
752<iref primary="true" item="captive portal"/>
753   In addition, there may exist network intermediaries that are not
754   considered part of the HTTP communication but nevertheless act as
755   filters or redirecting agents (usually violating HTTP semantics,
756   causing security problems, and otherwise making a mess of things).
757   Such a network intermediary, often referred to as an "<x:dfn>interception proxy</x:dfn>"
758   <xref target="RFC3040"/>, "<x:dfn>transparent proxy</x:dfn>" <xref target="RFC1919"/>,
759   or "<x:dfn>captive portal</x:dfn>",
760   differs from an HTTP proxy because it has not been selected by the client.
761   Instead, the network intermediary redirects outgoing TCP port 80 packets
762   (and occasionally other common port traffic) to an internal HTTP server.
763   Interception proxies are commonly found on public network access points,
764   as a means of enforcing account subscription prior to allowing use of
765   non-local Internet services, and within corporate firewalls to enforce
766   network usage policies.
767   They are indistinguishable from a man-in-the-middle attack.
771<section title="Caches" anchor="caches">
772<iref primary="true" item="cache"/>
774   A "<x:dfn>cache</x:dfn>" is a local store of previous response messages and the
775   subsystem that controls its message storage, retrieval, and deletion.
776   A cache stores cacheable responses in order to reduce the response
777   time and network bandwidth consumption on future, equivalent
778   requests. Any client or server &MAY; employ a cache, though a cache
779   cannot be used by a server while it is acting as a tunnel.
782   The effect of a cache is that the request/response chain is shortened
783   if one of the participants along the chain has a cached response
784   applicable to that request. The following illustrates the resulting
785   chain if B has a cached copy of an earlier response from O (via C)
786   for a request which has not been cached by UA or A.
788<figure><artwork type="drawing">
789            &gt;             &gt;
790       UA =========== A =========== B - - - - - - C - - - - - - O
791                  &lt;             &lt;
793<t><iref primary="true" item="cacheable"/>
794   A response is "<x:dfn>cacheable</x:dfn>" if a cache is allowed to store a copy of
795   the response message for use in answering subsequent requests.
796   Even when a response is cacheable, there might be additional
797   constraints placed by the client or by the origin server on when
798   that cached response can be used for a particular request. HTTP
799   requirements for cache behavior and cacheable responses are
800   defined in &caching-overview;. 
803   There are a wide variety of architectures and configurations
804   of caches and proxies deployed across the World Wide Web and
805   inside large organizations. These systems include national hierarchies
806   of proxy caches to save transoceanic bandwidth, systems that
807   broadcast or multicast cache entries, organizations that distribute
808   subsets of cached data via optical media, and so on.
812<section title="Protocol Versioning" anchor="http.version">
813  <x:anchor-alias value="HTTP-Version"/>
814  <x:anchor-alias value="HTTP-Prot-Name"/>
816   HTTP uses a "&lt;major&gt;.&lt;minor&gt;" numbering scheme to indicate
817   versions of the protocol. This specification defines version "1.1".
818   The protocol version as a whole indicates the sender's compliance
819   with the set of requirements laid out in that version's corresponding
820   specification of HTTP.
823   The version of an HTTP message is indicated by an HTTP-Version field
824   in the first line of the message. HTTP-Version is case-sensitive.
826<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="HTTP-Version"/><iref primary="true" item="Grammar" subitem="HTTP-Prot-Name"/>
827  <x:ref>HTTP-Version</x:ref>   = <x:ref>HTTP-Prot-Name</x:ref> "/" 1*<x:ref>DIGIT</x:ref> "." 1*<x:ref>DIGIT</x:ref>
828  <x:ref>HTTP-Prot-Name</x:ref> = <x:abnf-char-sequence>"HTTP"</x:abnf-char-sequence> ; "HTTP", case-sensitive
831   The HTTP version number consists of two non-negative decimal integers
832   separated by a "." (period or decimal point).  The first
833   number ("major version") indicates the HTTP messaging syntax, whereas
834   the second number ("minor version") indicates the highest minor
835   version to which the sender is at least conditionally compliant and
836   able to understand for future communication.  The minor version
837   advertises the sender's communication capabilities even when the
838   sender is only using a backwards-compatible subset of the protocol,
839   thereby letting the recipient know that more advanced features can
840   be used in response (by servers) or in future requests (by clients).
843   When comparing HTTP versions, the numbers &MUST; be compared
844   numerically rather than lexically.  For example, HTTP/2.4 is a lower
845   version than HTTP/2.13, which in turn is lower than HTTP/12.3.
846   Leading zeros &MUST; be ignored by recipients and &MUST-NOT; be sent.
849   When an HTTP/1.1 message is sent to an HTTP/1.0 recipient
850   <xref target="RFC1945"/> or a recipient whose version is unknown,
851   the HTTP/1.1 message is constructed such that it can be interpreted
852   as a valid HTTP/1.0 message if all of the newer features are ignored.
853   This specification places recipient-version requirements on some
854   new features so that a compliant sender will only use compatible
855   features until it has determined, through configuration or the
856   receipt of a message, that the recipient supports HTTP/1.1.
859   The interpretation of an HTTP header field does not change
860   between minor versions of the same major version, though the default
861   behavior of a recipient in the absence of such a field can change.
862   Unless specified otherwise, header fields defined in HTTP/1.1 are
863   defined for all versions of HTTP/1.x.  In particular, the Host and
864   Connection header fields ought to be implemented by all HTTP/1.x
865   implementations whether or not they advertise compliance with HTTP/1.1.
868   New header fields can be defined such that, when they are
869   understood by a recipient, they might override or enhance the
870   interpretation of previously defined header fields.  When an
871   implementation receives an unrecognized header field, the recipient
872   &MUST; ignore that header field for local processing regardless of
873   the message's HTTP version.  An unrecognized header field received
874   by a proxy &MUST; be forwarded downstream unless the header field's
875   field-name is listed in the message's Connection header-field
876   (see <xref target="header.connection"/>).
877   These requirements allow HTTP's functionality to be enhanced without
878   requiring prior update of all compliant intermediaries.
881   Intermediaries that process HTTP messages (i.e., all intermediaries
882   other than those acting as a tunnel) &MUST; send their own HTTP-Version
883   in forwarded messages.  In other words, they &MUST-NOT; blindly
884   forward the first line of an HTTP message without ensuring that the
885   protocol version matches what the intermediary understands, and
886   is at least conditionally compliant to, for both the receiving and
887   sending of messages.  Forwarding an HTTP message without rewriting
888   the HTTP-Version might result in communication errors when downstream
889   recipients use the message sender's version to determine what features
890   are safe to use for later communication with that sender.
893   An HTTP client &SHOULD; send a request version equal to the highest
894   version for which the client is at least conditionally compliant and
895   whose major version is no higher than the highest version supported
896   by the server, if this is known.  An HTTP client &MUST-NOT; send a
897   version for which it is not at least conditionally compliant.
900   An HTTP client &MAY; send a lower request version if it is known that
901   the server incorrectly implements the HTTP specification, but only
902   after the client has attempted at least one normal request and determined
903   from the response status or header fields (e.g., Server) that the
904   server improperly handles higher request versions.
907   An HTTP server &SHOULD; send a response version equal to the highest
908   version for which the server is at least conditionally compliant and
909   whose major version is less than or equal to the one received in the
910   request.  An HTTP server &MUST-NOT; send a version for which it is not
911   at least conditionally compliant.  A server &MAY; send a 505 (HTTP
912   Version Not Supported) response if it cannot send a response using the
913   major version used in the client's request.
916   An HTTP server &MAY; send an HTTP/1.0 response to an HTTP/1.0 request
917   if it is known or suspected that the client incorrectly implements the
918   HTTP specification and is incapable of correctly processing later
919   version responses, such as when a client fails to parse the version
920   number correctly or when an intermediary is known to blindly forward
921   the HTTP-Version even when it doesn't comply with the given minor
922   version of the protocol. Such protocol downgrades &SHOULD-NOT; be
923   performed unless triggered by specific client attributes, such as when
924   one or more of the request header fields (e.g., User-Agent) uniquely
925   match the values sent by a client known to be in error.
928   The intention of HTTP's versioning design is that the major number
929   will only be incremented if an incompatible message syntax is
930   introduced, and that the minor number will only be incremented when
931   changes made to the protocol have the effect of adding to the message
932   semantics or implying additional capabilities of the sender.  However,
933   the minor version was not incremented for the changes introduced between
934   <xref target="RFC2068"/> and <xref target="RFC2616"/>, and this revision
935   is specifically avoiding any such changes to the protocol.
939<section title="Uniform Resource Identifiers" anchor="uri">
940<iref primary="true" item="resource"/>
942   Uniform Resource Identifiers (URIs) <xref target="RFC3986"/> are used
943   throughout HTTP as the means for identifying resources. URI references
944   are used to target requests, indicate redirects, and define relationships.
945   HTTP does not limit what a resource might be; it merely defines an interface
946   that can be used to interact with a resource via HTTP. More information on
947   the scope of URIs and resources can be found in <xref target="RFC3986"/>.
949  <x:anchor-alias value="URI-reference"/>
950  <x:anchor-alias value="absolute-URI"/>
951  <x:anchor-alias value="relative-part"/>
952  <x:anchor-alias value="authority"/>
953  <x:anchor-alias value="path-abempty"/>
954  <x:anchor-alias value="path-absolute"/>
955  <x:anchor-alias value="port"/>
956  <x:anchor-alias value="query"/>
957  <x:anchor-alias value="uri-host"/>
958  <x:anchor-alias value="partial-URI"/>
960   This specification adopts the definitions of "URI-reference",
961   "absolute-URI", "relative-part", "port", "host",
962   "path-abempty", "path-absolute", "query", and "authority" from the
963   URI generic syntax <xref target="RFC3986"/>.
964   In addition, we define a partial-URI rule for protocol elements
965   that allow a relative URI but not a fragment.
967<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="URI-reference"/><iref primary="true" item="Grammar" subitem="absolute-URI"/><iref primary="true" item="Grammar" subitem="authority"/><iref primary="true" item="Grammar" subitem="path-absolute"/><iref primary="true" item="Grammar" subitem="port"/><iref primary="true" item="Grammar" subitem="query"/><iref primary="true" item="Grammar" subitem="uri-host"/>
968  <x:ref>URI-reference</x:ref> = &lt;URI-reference, defined in <xref target="RFC3986" x:fmt="," x:sec="4.1"/>&gt;
969  <x:ref>absolute-URI</x:ref>  = &lt;absolute-URI, defined in <xref target="RFC3986" x:fmt="," x:sec="4.3"/>&gt;
970  <x:ref>relative-part</x:ref> = &lt;relative-part, defined in <xref target="RFC3986" x:fmt="," x:sec="4.2"/>&gt;
971  <x:ref>authority</x:ref>     = &lt;authority, defined in <xref target="RFC3986" x:fmt="," x:sec="3.2"/>&gt;
972  <x:ref>path-abempty</x:ref>  = &lt;path-abempty, defined in <xref target="RFC3986" x:fmt="," x:sec="3.3"/>&gt;
973  <x:ref>path-absolute</x:ref> = &lt;path-absolute, defined in <xref target="RFC3986" x:fmt="," x:sec="3.3"/>&gt;
974  <x:ref>port</x:ref>          = &lt;port, defined in <xref target="RFC3986" x:fmt="," x:sec="3.2.3"/>&gt;
975  <x:ref>query</x:ref>         = &lt;query, defined in <xref target="RFC3986" x:fmt="," x:sec="3.4"/>&gt;
976  <x:ref>uri-host</x:ref>      = &lt;host, defined in <xref target="RFC3986" x:fmt="," x:sec="3.2.2"/>&gt;
978  <x:ref>partial-URI</x:ref>   = relative-part [ "?" query ]
981   Each protocol element in HTTP that allows a URI reference will indicate
982   in its ABNF production whether the element allows any form of reference
983   (URI-reference), only a URI in absolute form (absolute-URI), only the
984   path and optional query components, or some combination of the above.
985   Unless otherwise indicated, URI references are parsed relative to the
986   effective request URI, which defines the default base URI for references
987   in both the request and its corresponding response.
990<section title="http URI scheme" anchor="http.uri">
991  <x:anchor-alias value="http-URI"/>
992  <iref item="http URI scheme" primary="true"/>
993  <iref item="URI scheme" subitem="http" primary="true"/>
995   The "http" URI scheme is hereby defined for the purpose of minting
996   identifiers according to their association with the hierarchical
997   namespace governed by a potential HTTP origin server listening for
998   TCP connections on a given port.
1000<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="http-URI"/>
1001  <x:ref>http-URI</x:ref> = "http:" "//" <x:ref>authority</x:ref> <x:ref>path-abempty</x:ref> [ "?" <x:ref>query</x:ref> ]
1004   The HTTP origin server is identified by the generic syntax's
1005   <x:ref>authority</x:ref> component, which includes a host identifier
1006   and optional TCP port (<xref target="RFC3986" x:fmt="," x:sec="3.2.2"/>).
1007   The remainder of the URI, consisting of both the hierarchical path
1008   component and optional query component, serves as an identifier for
1009   a potential resource within that origin server's name space.
1012   If the host identifier is provided as an IP literal or IPv4 address,
1013   then the origin server is any listener on the indicated TCP port at
1014   that IP address. If host is a registered name, then that name is
1015   considered an indirect identifier and the recipient might use a name
1016   resolution service, such as DNS, to find the address of a listener
1017   for that host.
1018   The host &MUST-NOT; be empty; if an "http" URI is received with an
1019   empty host, then it &MUST; be rejected as invalid.
1020   If the port subcomponent is empty or not given, then TCP port 80 is
1021   assumed (the default reserved port for WWW services).
1024   Regardless of the form of host identifier, access to that host is not
1025   implied by the mere presence of its name or address. The host might or might
1026   not exist and, even when it does exist, might or might not be running an
1027   HTTP server or listening to the indicated port. The "http" URI scheme
1028   makes use of the delegated nature of Internet names and addresses to
1029   establish a naming authority (whatever entity has the ability to place
1030   an HTTP server at that Internet name or address) and allows that
1031   authority to determine which names are valid and how they might be used.
1034   When an "http" URI is used within a context that calls for access to the
1035   indicated resource, a client &MAY; attempt access by resolving
1036   the host to an IP address, establishing a TCP connection to that address
1037   on the indicated port, and sending an HTTP request message to the server
1038   containing the URI's identifying data as described in <xref target="request"/>.
1039   If the server responds to that request with a non-interim HTTP response
1040   message, as described in <xref target="response"/>, then that response
1041   is considered an authoritative answer to the client's request.
1044   Although HTTP is independent of the transport protocol, the "http"
1045   scheme is specific to TCP-based services because the name delegation
1046   process depends on TCP for establishing authority.
1047   An HTTP service based on some other underlying connection protocol
1048   would presumably be identified using a different URI scheme, just as
1049   the "https" scheme (below) is used for servers that require an SSL/TLS
1050   transport layer on a connection. Other protocols might also be used to
1051   provide access to "http" identified resources &mdash; it is only the
1052   authoritative interface used for mapping the namespace that is
1053   specific to TCP.
1056   The URI generic syntax for authority also includes a deprecated
1057   userinfo subcomponent (<xref target="RFC3986" x:fmt="," x:sec="3.2.1"/>)
1058   for including user authentication information in the URI.  Some
1059   implementations make use of the userinfo component for internal
1060   configuration of authentication information, such as within command
1061   invocation options, configuration files, or bookmark lists, even
1062   though such usage might expose a user identifier or password.
1063   Senders &MUST-NOT; include a userinfo subcomponent (and its "@"
1064   delimiter) when transmitting an "http" URI in a message.  Recipients
1065   of HTTP messages that contain a URI reference &SHOULD; parse for the
1066   existence of userinfo and treat its presence as an error, likely
1067   indicating that the deprecated subcomponent is being used to obscure
1068   the authority for the sake of phishing attacks.
1072<section title="https URI scheme" anchor="https.uri">
1073   <x:anchor-alias value="https-URI"/>
1074   <iref item="https URI scheme"/>
1075   <iref item="URI scheme" subitem="https"/>
1077   The "https" URI scheme is hereby defined for the purpose of minting
1078   identifiers according to their association with the hierarchical
1079   namespace governed by a potential HTTP origin server listening for
1080   SSL/TLS-secured connections on a given TCP port.
1083   All of the requirements listed above for the "http" scheme are also
1084   requirements for the "https" scheme, except that a default TCP port
1085   of 443 is assumed if the port subcomponent is empty or not given,
1086   and the TCP connection &MUST; be secured for privacy through the
1087   use of strong encryption prior to sending the first HTTP request.
1089<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="https-URI"/>
1090  <x:ref>https-URI</x:ref> = "https:" "//" <x:ref>authority</x:ref> <x:ref>path-abempty</x:ref> [ "?" <x:ref>query</x:ref> ]
1093   Unlike the "http" scheme, responses to "https" identified requests
1094   are never "public" and thus &MUST-NOT; be reused for shared caching.
1095   They can, however, be reused in a private cache if the message is
1096   cacheable by default in HTTP or specifically indicated as such by
1097   the Cache-Control header field (&header-cache-control;).
1100   Resources made available via the "https" scheme have no shared
1101   identity with the "http" scheme even if their resource identifiers
1102   indicate the same authority (the same host listening to the same
1103   TCP port).  They are distinct name spaces and are considered to be
1104   distinct origin servers.  However, an extension to HTTP that is
1105   defined to apply to entire host domains, such as the Cookie protocol
1106   <xref target="RFC6265"/>, can allow information
1107   set by one service to impact communication with other services
1108   within a matching group of host domains.
1111   The process for authoritative access to an "https" identified
1112   resource is defined in <xref target="RFC2818"/>.
1116<section title="http and https URI Normalization and Comparison" anchor="uri.comparison">
1118   Since the "http" and "https" schemes conform to the URI generic syntax,
1119   such URIs are normalized and compared according to the algorithm defined
1120   in <xref target="RFC3986" x:fmt="," x:sec="6"/>, using the defaults
1121   described above for each scheme.
1124   If the port is equal to the default port for a scheme, the normal
1125   form is to elide the port subcomponent. Likewise, an empty path
1126   component is equivalent to an absolute path of "/", so the normal
1127   form is to provide a path of "/" instead. The scheme and host
1128   are case-insensitive and normally provided in lowercase; all
1129   other components are compared in a case-sensitive manner.
1130   Characters other than those in the "reserved" set are equivalent
1131   to their percent-encoded octets (see <xref target="RFC3986"
1132   x:fmt="," x:sec="2.1"/>): the normal form is to not encode them.
1135   For example, the following three URIs are equivalent:
1137<figure><artwork type="example">
1146<section title="Message Format" anchor="http.message">
1147<x:anchor-alias value="generic-message"/>
1148<x:anchor-alias value="message.types"/>
1149<x:anchor-alias value="HTTP-message"/>
1150<x:anchor-alias value="start-line"/>
1151<iref item="header section"/>
1152<iref item="headers"/>
1153<iref item="header field"/>
1155   All HTTP/1.1 messages consist of a start-line followed by a sequence of
1156   octets in a format similar to the Internet Message Format
1157   <xref target="RFC5322"/>: zero or more header fields (collectively
1158   referred to as the "headers" or the "header section"), an empty line
1159   indicating the end of the header section, and an optional message-body.
1162   An HTTP message can either be a request from client to server or a
1163   response from server to client.  Syntactically, the two types of message
1164   differ only in the start-line, which is either a Request-Line (for requests)
1165   or a Status-Line (for responses), and in the algorithm for determining
1166   the length of the message-body (<xref target="message.body"/>).
1167   In theory, a client could receive requests and a server could receive
1168   responses, distinguishing them by their different start-line formats,
1169   but in practice servers are implemented to only expect a request
1170   (a response is interpreted as an unknown or invalid request method)
1171   and clients are implemented to only expect a response.
1173<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="HTTP-message"/>
1174  <x:ref>HTTP-message</x:ref>    = <x:ref>start-line</x:ref>
1175                    *( <x:ref>header-field</x:ref> <x:ref>CRLF</x:ref> )
1176                    <x:ref>CRLF</x:ref>
1177                    [ <x:ref>message-body</x:ref> ]
1178  <x:ref>start-line</x:ref>      = <x:ref>Request-Line</x:ref> / <x:ref>Status-Line</x:ref>
1181   Implementations &MUST-NOT; send whitespace between the start-line and
1182   the first header field. The presence of such whitespace in a request
1183   might be an attempt to trick a server into ignoring that field or
1184   processing the line after it as a new request, either of which might
1185   result in a security vulnerability if other implementations within
1186   the request chain interpret the same message differently.
1187   Likewise, the presence of such whitespace in a response might be
1188   ignored by some clients or cause others to cease parsing.
1191<section title="Message Parsing Robustness" anchor="message.robustness">
1193   In the interest of robustness, servers &SHOULD; ignore at least one
1194   empty line received where a Request-Line is expected. In other words, if
1195   the server is reading the protocol stream at the beginning of a
1196   message and receives a CRLF first, it &SHOULD; ignore the CRLF.
1199   Some old HTTP/1.0 client implementations send an extra CRLF
1200   after a POST request as a lame workaround for some early server
1201   applications that failed to read message-body content that was
1202   not terminated by a line-ending. An HTTP/1.1 client &MUST-NOT;
1203   preface or follow a request with an extra CRLF.  If terminating
1204   the request message-body with a line-ending is desired, then the
1205   client &MUST; include the terminating CRLF octets as part of the
1206   message-body length.
1209   When a server listening only for HTTP request messages, or processing
1210   what appears from the start-line to be an HTTP request message,
1211   receives a sequence of octets that does not match the HTTP-message
1212   grammar aside from the robustness exceptions listed above, the
1213   server &MUST; respond with an HTTP/1.1 400 (Bad Request) response. 
1216   The normal procedure for parsing an HTTP message is to read the
1217   start-line into a structure, read each header field into a hash
1218   table by field name until the empty line, and then use the parsed
1219   data to determine if a message-body is expected.  If a message-body
1220   has been indicated, then it is read as a stream until an amount
1221   of octets equal to the message-body length is read or the connection
1222   is closed.  Care must be taken to parse an HTTP message as a sequence
1223   of octets in an encoding that is a superset of US-ASCII.  Attempting
1224   to parse HTTP as a stream of Unicode characters in a character encoding
1225   like UTF-16 might introduce security flaws due to the differing ways
1226   that such parsers interpret invalid characters.
1229   HTTP allows the set of defined header fields to be extended without
1230   changing the protocol version (see <xref target="header.field.registration"/>).
1231   Unrecognized header fields &MUST; be forwarded by a proxy unless the
1232   proxy is specifically configured to block or otherwise transform such
1233   fields.  Unrecognized header fields &SHOULD; be ignored by other recipients.
1237<section title="Header Fields" anchor="header.fields">
1238  <x:anchor-alias value="header-field"/>
1239  <x:anchor-alias value="field-content"/>
1240  <x:anchor-alias value="field-name"/>
1241  <x:anchor-alias value="field-value"/>
1242  <x:anchor-alias value="OWS"/>
1244   Each HTTP header field consists of a case-insensitive field name
1245   followed by a colon (":"), optional whitespace, and the field value.
1247<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="header-field"/><iref primary="true" item="Grammar" subitem="field-name"/><iref primary="true" item="Grammar" subitem="field-value"/><iref primary="true" item="Grammar" subitem="field-content"/>
1248  <x:ref>header-field</x:ref>   = <x:ref>field-name</x:ref> ":" <x:ref>OWS</x:ref> [ <x:ref>field-value</x:ref> ] <x:ref>OWS</x:ref>
1249  <x:ref>field-name</x:ref>     = <x:ref>token</x:ref>
1250  <x:ref>field-value</x:ref>    = *( <x:ref>field-content</x:ref> / <x:ref>OWS</x:ref> )
1251  <x:ref>field-content</x:ref>  = *( <x:ref>WSP</x:ref> / <x:ref>VCHAR</x:ref> / <x:ref>obs-text</x:ref> )
1254   No whitespace is allowed between the header field name and colon. For
1255   security reasons, any request message received containing such whitespace
1256   &MUST; be rejected with a response code of 400 (Bad Request). A proxy
1257   &MUST; remove any such whitespace from a response message before
1258   forwarding the message downstream.
1261   A field value &MAY; be preceded by optional whitespace (OWS); a single SP is
1262   preferred. The field value does not include any leading or trailing white
1263   space: OWS occurring before the first non-whitespace octet of the
1264   field value or after the last non-whitespace octet of the field value
1265   is ignored and &SHOULD; be removed before further processing (as this does
1266   not change the meaning of the header field).
1269   The order in which header fields with differing field names are
1270   received is not significant. However, it is "good practice" to send
1271   header fields that contain control data first, such as Host on
1272   requests and Date on responses, so that implementations can decide
1273   when not to handle a message as early as possible.  A server &MUST;
1274   wait until the entire header section is received before interpreting
1275   a request message, since later header fields might include conditionals,
1276   authentication credentials, or deliberately misleading duplicate
1277   header fields that would impact request processing.
1280   Multiple header fields with the same field name &MUST-NOT; be
1281   sent in a message unless the entire field value for that
1282   header field is defined as a comma-separated list [i.e., #(values)].
1283   Multiple header fields with the same field name can be combined into
1284   one "field-name: field-value" pair, without changing the semantics of the
1285   message, by appending each subsequent field value to the combined
1286   field value in order, separated by a comma. The order in which
1287   header fields with the same field name are received is therefore
1288   significant to the interpretation of the combined field value;
1289   a proxy &MUST-NOT; change the order of these field values when
1290   forwarding a message.
1293  <t>
1294   <x:h>Note:</x:h> The "Set-Cookie" header field as implemented in
1295   practice can occur multiple times, but does not use the list syntax, and
1296   thus cannot be combined into a single line (<xref target="RFC6265"/>). (See Appendix A.2.3 of <xref target="Kri2001"/>
1297   for details.) Also note that the Set-Cookie2 header field specified in
1298   <xref target="RFC2965"/> does not share this problem.
1299  </t>
1302   Historically, HTTP header field values could be extended over multiple
1303   lines by preceding each extra line with at least one space or horizontal
1304   tab octet (line folding). This specification deprecates such line
1305   folding except within the message/http media type
1306   (<xref target=""/>).
1307   HTTP/1.1 senders &MUST-NOT; produce messages that include line folding
1308   (i.e., that contain any field-content that matches the obs-fold rule) unless
1309   the message is intended for packaging within the message/http media type.
1310   HTTP/1.1 recipients &SHOULD; accept line folding and replace any embedded
1311   obs-fold whitespace with a single SP prior to interpreting the field value
1312   or forwarding the message downstream.
1315   Historically, HTTP has allowed field content with text in the ISO-8859-1
1316   <xref target="ISO-8859-1"/> character encoding and supported other
1317   character sets only through use of <xref target="RFC2047"/> encoding.
1318   In practice, most HTTP header field values use only a subset of the
1319   US-ASCII character encoding <xref target="USASCII"/>. Newly defined
1320   header fields &SHOULD; limit their field values to US-ASCII octets.
1321   Recipients &SHOULD; treat other (obs-text) octets in field content as
1322   opaque data.
1324<t anchor="rule.comment">
1325  <x:anchor-alias value="comment"/>
1326  <x:anchor-alias value="ctext"/>
1327   Comments can be included in some HTTP header fields by surrounding
1328   the comment text with parentheses. Comments are only allowed in
1329   fields containing "comment" as part of their field value definition.
1331<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="comment"/><iref primary="true" item="Grammar" subitem="ctext"/>
1332  <x:ref>comment</x:ref>        = "(" *( <x:ref>ctext</x:ref> / <x:ref>quoted-cpair</x:ref> / <x:ref>comment</x:ref> ) ")"
1333  <x:ref>ctext</x:ref>          = <x:ref>OWS</x:ref> / %x21-27 / %x2A-5B / %x5D-7E / <x:ref>obs-text</x:ref>
1334                 ; <x:ref>OWS</x:ref> / &lt;<x:ref>VCHAR</x:ref> except "(", ")", and "\"&gt; / <x:ref>obs-text</x:ref>
1336<t anchor="rule.quoted-cpair">
1337  <x:anchor-alias value="quoted-cpair"/>
1338   The backslash octet ("\") can be used as a single-octet
1339   quoting mechanism within comment constructs:
1341<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="quoted-cpair"/>
1342  <x:ref>quoted-cpair</x:ref>    = "\" ( <x:ref>WSP</x:ref> / <x:ref>VCHAR</x:ref> / <x:ref>obs-text</x:ref> )
1345   Senders &SHOULD-NOT; escape octets that do not require escaping
1346   (i.e., other than the backslash octet "\" and the parentheses "(" and
1347   ")").
1351<section title="Message Body" anchor="message.body">
1352  <x:anchor-alias value="message-body"/>
1354   The message-body (if any) of an HTTP message is used to carry the
1355   payload body associated with the request or response.
1357<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="message-body"/>
1358  <x:ref>message-body</x:ref> = *OCTET
1361   The message-body differs from the payload body only when a transfer-coding
1362   has been applied, as indicated by the Transfer-Encoding header field
1363   (<xref target="header.transfer-encoding"/>).  If more than one
1364   Transfer-Encoding header field is present in a message, the multiple
1365   field-values &MUST; be combined into one field-value, according to the
1366   algorithm defined in <xref target="header.fields"/>, before determining
1367   the message-body length.
1370   When one or more transfer-codings are applied to a payload in order to
1371   form the message-body, the Transfer-Encoding header field &MUST; contain
1372   the list of transfer-codings applied. Transfer-Encoding is a property of
1373   the message, not of the payload, and thus &MAY; be added or removed by
1374   any implementation along the request/response chain under the constraints
1375   found in <xref target="transfer.codings"/>.
1378   If a message is received that has multiple Content-Length header fields
1379   (<xref target="header.content-length"/>) with field-values consisting
1380   of the same decimal value, or a single Content-Length header field with
1381   a field value containing a list of identical decimal values (e.g.,
1382   "Content-Length: 42, 42"), indicating that duplicate Content-Length
1383   header fields have been generated or combined by an upstream message
1384   processor, then the recipient &MUST; either reject the message as invalid
1385   or replace the duplicated field-values with a single valid Content-Length
1386   field containing that decimal value prior to determining the message-body
1387   length.
1390   The rules for when a message-body is allowed in a message differ for
1391   requests and responses.
1394   The presence of a message-body in a request is signaled by the
1395   inclusion of a Content-Length or Transfer-Encoding header field in
1396   the request's header fields, even if the request method does not
1397   define any use for a message-body.  This allows the request
1398   message framing algorithm to be independent of method semantics.
1401   For response messages, whether or not a message-body is included with
1402   a message is dependent on both the request method and the response
1403   status code (<xref target="status.code.and.reason.phrase"/>).
1404   Responses to the HEAD request method never include a message-body
1405   because the associated response header fields (e.g., Transfer-Encoding,
1406   Content-Length, etc.) only indicate what their values would have been
1407   if the request method had been GET.  All 1xx (Informational), 204 (No Content),
1408   and 304 (Not Modified) responses &MUST-NOT; include a message-body.
1409   All other responses do include a message-body, although the body
1410   &MAY; be of zero length.
1413   The length of the message-body is determined by one of the following
1414   (in order of precedence):
1417  <list style="numbers">
1418    <x:lt><t>
1419     Any response to a HEAD request and any response with a status
1420     code of 100-199, 204, or 304 is always terminated by the first
1421     empty line after the header fields, regardless of the header
1422     fields present in the message, and thus cannot contain a message-body.
1423    </t></x:lt>
1424    <x:lt><t>
1425     If a Transfer-Encoding header field is present
1426     and the "chunked" transfer-coding (<xref target="transfer.codings"/>)
1427     is the final encoding, the message-body length is determined by reading
1428     and decoding the chunked data until the transfer-coding indicates the
1429     data is complete.
1430    </t>
1431    <t>
1432     If a Transfer-Encoding header field is present in a response and the
1433     "chunked" transfer-coding is not the final encoding, the message-body
1434     length is determined by reading the connection until it is closed by
1435     the server.
1436     If a Transfer-Encoding header field is present in a request and the
1437     "chunked" transfer-coding is not the final encoding, the message-body
1438     length cannot be determined reliably; the server &MUST; respond with
1439     the 400 (Bad Request) status code and then close the connection.
1440    </t>
1441    <t>
1442     If a message is received with both a Transfer-Encoding header field
1443     and a Content-Length header field, the Transfer-Encoding overrides
1444     the Content-Length.
1445     Such a message might indicate an attempt to perform request or response
1446     smuggling (bypass of security-related checks on message routing or content)
1447     and thus ought to be handled as an error.  The provided Content-Length &MUST;
1448     be removed, prior to forwarding the message downstream, or replaced with
1449     the real message-body length after the transfer-coding is decoded.
1450    </t></x:lt>
1451    <x:lt><t>
1452     If a message is received without Transfer-Encoding and with either
1453     multiple Content-Length header fields having differing field-values or
1454     a single Content-Length header field having an invalid value, then the
1455     message framing is invalid and &MUST; be treated as an error to
1456     prevent request or response smuggling.
1457     If this is a request message, the server &MUST; respond with
1458     a 400 (Bad Request) status code and then close the connection.
1459     If this is a response message received by a proxy, the proxy
1460     &MUST; discard the received response, send a 502 (Bad Gateway)
1461     status code as its downstream response, and then close the connection.
1462     If this is a response message received by a user-agent, it &MUST; be
1463     treated as an error by discarding the message and closing the connection.
1464    </t></x:lt>
1465    <x:lt><t>
1466     If a valid Content-Length header field
1467     is present without Transfer-Encoding, its decimal value defines the
1468     message-body length in octets.  If the actual number of octets sent in
1469     the message is less than the indicated Content-Length, the recipient
1470     &MUST; consider the message to be incomplete and treat the connection
1471     as no longer usable.
1472     If the actual number of octets sent in the message is more than the indicated
1473     Content-Length, the recipient &MUST; only process the message-body up to the
1474     field value's number of octets; the remainder of the message &MUST; either
1475     be discarded or treated as the next message in a pipeline.  For the sake of
1476     robustness, a user-agent &MAY; attempt to detect and correct such an error
1477     in message framing if it is parsing the response to the last request on
1478     on a connection and the connection has been closed by the server.
1479    </t></x:lt>
1480    <x:lt><t>
1481     If this is a request message and none of the above are true, then the
1482     message-body length is zero (no message-body is present).
1483    </t></x:lt>
1484    <x:lt><t>
1485     Otherwise, this is a response message without a declared message-body
1486     length, so the message-body length is determined by the number of octets
1487     received prior to the server closing the connection.
1488    </t></x:lt>
1489  </list>
1492   Since there is no way to distinguish a successfully completed,
1493   close-delimited message from a partially-received message interrupted
1494   by network failure, implementations &SHOULD; use encoding or
1495   length-delimited messages whenever possible.  The close-delimiting
1496   feature exists primarily for backwards compatibility with HTTP/1.0.
1499   A server &MAY; reject a request that contains a message-body but
1500   not a Content-Length by responding with 411 (Length Required).
1503   Unless a transfer-coding other than "chunked" has been applied,
1504   a client that sends a request containing a message-body &SHOULD;
1505   use a valid Content-Length header field if the message-body length
1506   is known in advance, rather than the "chunked" encoding, since some
1507   existing services respond to "chunked" with a 411 (Length Required)
1508   status code even though they understand the chunked encoding.  This
1509   is typically because such services are implemented via a gateway that
1510   requires a content-length in advance of being called and the server
1511   is unable or unwilling to buffer the entire request before processing.
1514   A client that sends a request containing a message-body &MUST; include a
1515   valid Content-Length header field if it does not know the server will
1516   handle HTTP/1.1 (or later) requests; such knowledge can be in the form
1517   of specific user configuration or by remembering the version of a prior
1518   received response.
1521   Request messages that are prematurely terminated, possibly due to a
1522   cancelled connection or a server-imposed time-out exception, &MUST;
1523   result in closure of the connection; sending an HTTP/1.1 error response
1524   prior to closing the connection is &OPTIONAL;.
1525   Response messages that are prematurely terminated, usually by closure
1526   of the connection prior to receiving the expected number of octets or by
1527   failure to decode a transfer-encoded message-body, &MUST; be recorded
1528   as incomplete.  A user agent &MUST-NOT; render an incomplete response
1529   message-body as if it were complete (i.e., some indication must be given
1530   to the user that an error occurred).  Cache requirements for incomplete
1531   responses are defined in &cache-incomplete;.
1534   A server &MUST; read the entire request message-body or close
1535   the connection after sending its response, since otherwise the
1536   remaining data on a persistent connection would be misinterpreted
1537   as the next request.  Likewise,
1538   a client &MUST; read the entire response message-body if it intends
1539   to reuse the same connection for a subsequent request.  Pipelining
1540   multiple requests on a connection is described in <xref target="pipelining"/>.
1544<section title="General Header Fields" anchor="general.header.fields">
1545  <x:anchor-alias value="general-header"/>
1547   There are a few header fields which have general applicability for
1548   both request and response messages, but which do not apply to the
1549   payload being transferred. These header fields apply only to the
1550   message being transmitted.
1552<texttable align="left">
1553  <ttcol>Header Field Name</ttcol>
1554  <ttcol>Defined in...</ttcol>
1556  <c>Connection</c> <c><xref target="header.connection"/></c>
1557  <c>Date</c> <c><xref target=""/></c>
1558  <c>Trailer</c> <c><xref target="header.trailer"/></c>
1559  <c>Transfer-Encoding</c> <c><xref target="header.transfer-encoding"/></c>
1560  <c>Upgrade</c> <c><xref target="header.upgrade"/></c>
1561  <c>Via</c> <c><xref target="header.via"/></c>
1566<section title="Request" anchor="request">
1567  <x:anchor-alias value="Request"/>
1569   A request message from a client to a server begins with a
1570   Request-Line, followed by zero or more header fields, an empty
1571   line signifying the end of the header block, and an optional
1572   message body.
1574<!--                 Host                      ; should be moved here eventually -->
1575<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Request"/>
1576  <x:ref>Request</x:ref>       = <x:ref>Request-Line</x:ref>              ; <xref target="request-line"/>
1577                  *( <x:ref>header-field</x:ref> <x:ref>CRLF</x:ref> )    ; <xref target="header.fields"/>
1578                  <x:ref>CRLF</x:ref>
1579                  [ <x:ref>message-body</x:ref> ]          ; <xref target="message.body"/>
1582<section title="Request-Line" anchor="request-line">
1583  <x:anchor-alias value="Request-Line"/>
1585   The Request-Line begins with a method token, followed by a single
1586   space (SP), the request-target, another single space (SP), the
1587   protocol version, and ending with CRLF.
1589<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Request-Line"/>
1590  <x:ref>Request-Line</x:ref>   = <x:ref>Method</x:ref> <x:ref>SP</x:ref> <x:ref>request-target</x:ref> <x:ref>SP</x:ref> <x:ref>HTTP-Version</x:ref> <x:ref>CRLF</x:ref>
1593<section title="Method" anchor="method">
1594  <x:anchor-alias value="Method"/>
1596   The Method token indicates the request method to be performed on the
1597   target resource. The request method is case-sensitive.
1599<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Method"/>
1600  <x:ref>Method</x:ref>         = <x:ref>token</x:ref>
1604<section title="request-target" anchor="request-target">
1605  <x:anchor-alias value="request-target"/>
1607   The request-target identifies the target resource upon which to apply
1608   the request.  In most cases, the user agent is provided a URI reference
1609   from which it determines an absolute URI for identifying the target
1610   resource.  When a request to the resource is initiated, all or part
1611   of that URI is used to construct the HTTP request-target.
1613<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="request-target"/>
1614  <x:ref>request-target</x:ref> = "*"
1615                 / <x:ref>absolute-URI</x:ref>
1616                 / ( <x:ref>path-absolute</x:ref> [ "?" <x:ref>query</x:ref> ] )
1617                 / <x:ref>authority</x:ref>
1620   The four options for request-target are dependent on the nature of the
1621   request.
1623<t><iref item="asterisk form (of request-target)"/>
1624   The asterisk "*" form of request-target, which &MUST-NOT; be used
1625   with any request method other than OPTIONS, means that the request
1626   applies to the server as a whole (the listening process) rather than
1627   to a specific named resource at that server.  For example,
1629<figure><artwork type="message/http; msgtype=&#34;request&#34;" x:indent-with="  ">
1630OPTIONS * HTTP/1.1
1632<t><iref item="absolute-URI form (of request-target)"/>
1633   The "absolute-URI" form is &REQUIRED; when the request is being made to a
1634   proxy. The proxy is requested to either forward the request or service it
1635   from a valid cache, and then return the response. Note that the proxy &MAY;
1636   forward the request on to another proxy or directly to the server
1637   specified by the absolute-URI. In order to avoid request loops, a
1638   proxy that forwards requests to other proxies &MUST; be able to
1639   recognize and exclude all of its own server names, including
1640   any aliases, local variations, and the numeric IP address. An example
1641   Request-Line would be:
1643<figure><artwork type="message/http; msgtype=&#34;request&#34;" x:indent-with="  ">
1644GET HTTP/1.1
1647   To allow for transition to absolute-URIs in all requests in future
1648   versions of HTTP, all HTTP/1.1 servers &MUST; accept the absolute-URI
1649   form in requests, even though HTTP/1.1 clients will only generate
1650   them in requests to proxies.
1653   If a proxy receives a host name that is not a fully qualified domain
1654   name, it &MAY; add its domain to the host name it received. If a proxy
1655   receives a fully qualified domain name, the proxy &MUST-NOT; change
1656   the host name.
1658<t><iref item="authority form (of request-target)"/>
1659   The "authority form" is only used by the CONNECT request method (&CONNECT;).
1661<t><iref item="origin form (of request-target)"/>
1662   The most common form of request-target is that used when making
1663   a request to an origin server ("origin form").
1664   In this case, the absolute path and query components of the URI
1665   &MUST; be transmitted as the request-target, and the authority component
1666   &MUST; be transmitted in a Host header field. For example, a client wishing
1667   to retrieve a representation of the resource, as identified above,
1668   directly from the origin server would open (or reuse) a TCP connection
1669   to port 80 of the host "" and send the lines:
1671<figure><artwork type="message/http; msgtype=&#34;request&#34;" x:indent-with="  ">
1672GET /pub/WWW/TheProject.html HTTP/1.1
1676   followed by the remainder of the Request. Note that the origin form
1677   of request-target always starts with an absolute path; if the target
1678   resource's URI path is empty, then an absolute path of "/" &MUST; be
1679   provided in the request-target.
1682   If a proxy receives an OPTIONS request with an absolute-URI form of
1683   request-target in which the URI has an empty path and no query component,
1684   then the last proxy on the request chain &MUST; use a request-target
1685   of "*" when it forwards the request to the indicated origin server.
1688   For example, the request
1689</preamble><artwork type="message/http; msgtype=&#34;request&#34;" x:indent-with="  ">
1693  would be forwarded by the final proxy as
1694</preamble><artwork type="message/http; msgtype=&#34;request&#34;" x:indent-with="  ">
1695OPTIONS * HTTP/1.1
1699   after connecting to port 8001 of host "".
1703   The request-target is transmitted in the format specified in
1704   <xref target="http.uri"/>. If the request-target is percent-encoded
1705   (<xref target="RFC3986" x:fmt="," x:sec="2.1"/>), the origin server
1706   &MUST; decode the request-target in order to
1707   properly interpret the request. Servers &SHOULD; respond to invalid
1708   request-targets with an appropriate status code.
1711   A non-transforming proxy &MUST-NOT; rewrite the "path-absolute" part of the
1712   received request-target when forwarding it to the next inbound server,
1713   except as noted above to replace a null path-absolute with "/" or "*".
1716  <t>
1717    <x:h>Note:</x:h> The "no rewrite" rule prevents the proxy from changing the
1718    meaning of the request when the origin server is improperly using
1719    a non-reserved URI character for a reserved purpose.  Implementors
1720    need to be aware that some pre-HTTP/1.1 proxies have been known to
1721    rewrite the request-target.
1722  </t>
1725   HTTP does not place a pre-defined limit on the length of a request-target.
1726   A server &MUST; be prepared to receive URIs of unbounded length and
1727   respond with the 414 (URI Too Long) status code if the received
1728   request-target would be longer than the server wishes to handle
1729   (see &status-414;).
1732   Various ad-hoc limitations on request-target length are found in practice.
1733   It is &RECOMMENDED; that all HTTP senders and recipients support
1734   request-target lengths of 8000 or more octets.
1737  <t>
1738    <x:h>Note:</x:h> Fragments (<xref target="RFC3986" x:fmt="," x:sec="3.5"/>)
1739    are not part of the request-target and thus will not be transmitted
1740    in an HTTP request.
1741  </t>
1746<section title="The Resource Identified by a Request" anchor="">
1748   The exact resource identified by an Internet request is determined by
1749   examining both the request-target and the Host header field.
1752   An origin server that does not allow resources to differ by the
1753   requested host &MAY; ignore the Host header field value when
1754   determining the resource identified by an HTTP/1.1 request. (But see
1755   <xref target=""/>
1756   for other requirements on Host support in HTTP/1.1.)
1759   An origin server that does differentiate resources based on the host
1760   requested (sometimes referred to as virtual hosts or vanity host
1761   names) &MUST; use the following rules for determining the requested
1762   resource on an HTTP/1.1 request:
1763  <list style="numbers">
1764    <t>If request-target is an absolute-URI, the host is part of the
1765     request-target. Any Host header field value in the request &MUST; be
1766     ignored.</t>
1767    <t>If the request-target is not an absolute-URI, and the request includes
1768     a Host header field, the host is determined by the Host header
1769     field value.</t>
1770    <t>If the host as determined by rule 1 or 2 is not a valid host on
1771     the server, the response &MUST; be a 400 (Bad Request) error message.</t>
1772  </list>
1775   Recipients of an HTTP/1.0 request that lacks a Host header field &MAY;
1776   attempt to use heuristics (e.g., examination of the URI path for
1777   something unique to a particular host) in order to determine what
1778   exact resource is being requested.
1782<section title="Effective Request URI" anchor="effective.request.uri">
1783  <iref primary="true" item="effective request URI"/>
1784  <iref primary="true" item="target resource"/>
1786   HTTP requests often do not carry the absolute URI (<xref target="RFC3986" x:fmt="," x:sec="4.3"/>)
1787   for the target resource; instead, the URI needs to be inferred from the
1788   request-target, Host header field, and connection context. The result of
1789   this process is called the "effective request URI".  The "target resource"
1790   is the resource identified by the effective request URI.
1793   If the request-target is an absolute-URI, then the effective request URI is
1794   the request-target.
1797   If the request-target uses the path-absolute form or the asterisk form,
1798   and the Host header field is present, then the effective request URI is
1799   constructed by concatenating
1802  <list style="symbols">
1803    <t>
1804      the scheme name: "http" if the request was received over an insecure
1805      TCP connection, or "https" when received over a SSL/TLS-secured TCP
1806      connection,
1807    </t>
1808    <t>
1809      the octet sequence "://",
1810    </t>
1811    <t>
1812      the authority component, as specified in the Host header field
1813      (<xref target=""/>), and
1814    </t>
1815    <t>
1816      the request-target obtained from the Request-Line, unless the
1817      request-target is just the asterisk "*".
1818    </t>
1819  </list>
1822   If the request-target uses the path-absolute form or the asterisk form,
1823   and the Host header field is not present, then the effective request URI is
1824   undefined.
1827   Otherwise, when request-target uses the authority form, the effective
1828   request URI is undefined.
1832   Example 1: the effective request URI for the message
1834<artwork type="example" x:indent-with="  ">
1835GET /pub/WWW/TheProject.html HTTP/1.1
1839  (received over an insecure TCP connection) is "http", plus "://", plus the
1840  authority component "", plus the request-target
1841  "/pub/WWW/TheProject.html", thus
1842  "".
1847   Example 2: the effective request URI for the message
1849<artwork type="example" x:indent-with="  ">
1850GET * HTTP/1.1
1854  (received over an SSL/TLS secured TCP connection) is "https", plus "://", plus the
1855  authority component "", thus "".
1859   Effective request URIs are compared using the rules described in
1860   <xref target="uri.comparison"/>, except that empty path components &MUST-NOT;
1861   be treated as equivalent to an absolute path of "/".
1868<section title="Response" anchor="response">
1869  <x:anchor-alias value="Response"/>
1871   After receiving and interpreting a request message, a server responds
1872   with an HTTP response message.
1874<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Response"/>
1875  <x:ref>Response</x:ref>      = <x:ref>Status-Line</x:ref>               ; <xref target="status-line"/>
1876                  *( <x:ref>header-field</x:ref> <x:ref>CRLF</x:ref> )    ; <xref target="header.fields"/>
1877                  <x:ref>CRLF</x:ref>
1878                  [ <x:ref>message-body</x:ref> ]          ; <xref target="message.body"/>
1881<section title="Status-Line" anchor="status-line">
1882  <x:anchor-alias value="Status-Line"/>
1884   The first line of a Response message is the Status-Line, consisting
1885   of the protocol version, a space (SP), the status code, another space,
1886   a possibly-empty textual phrase describing the status code, and
1887   ending with CRLF.
1889<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Status-Line"/>
1890  <x:ref>Status-Line</x:ref> = <x:ref>HTTP-Version</x:ref> <x:ref>SP</x:ref> <x:ref>Status-Code</x:ref> <x:ref>SP</x:ref> <x:ref>Reason-Phrase</x:ref> <x:ref>CRLF</x:ref>
1893<section title="Status Code and Reason Phrase" anchor="status.code.and.reason.phrase">
1894  <x:anchor-alias value="Reason-Phrase"/>
1895  <x:anchor-alias value="Status-Code"/>
1897   The Status-Code element is a 3-digit integer result code of the
1898   attempt to understand and satisfy the request. These codes are fully
1899   defined in &status-codes;.  The Reason Phrase exists for the sole
1900   purpose of providing a textual description associated with the numeric
1901   status code, out of deference to earlier Internet application protocols
1902   that were more frequently used with interactive text clients.
1903   A client &SHOULD; ignore the content of the Reason Phrase.
1906   The first digit of the Status-Code defines the class of response. The
1907   last two digits do not have any categorization role. There are 5
1908   values for the first digit:
1909  <list style="symbols">
1910    <t>
1911      1xx: Informational - Request received, continuing process
1912    </t>
1913    <t>
1914      2xx: Success - The action was successfully received,
1915        understood, and accepted
1916    </t>
1917    <t>
1918      3xx: Redirection - Further action must be taken in order to
1919        complete the request
1920    </t>
1921    <t>
1922      4xx: Client Error - The request contains bad syntax or cannot
1923        be fulfilled
1924    </t>
1925    <t>
1926      5xx: Server Error - The server failed to fulfill an apparently
1927        valid request
1928    </t>
1929  </list>
1931<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Status-Code"/><iref primary="true" item="Grammar" subitem="Reason-Phrase"/>
1932  <x:ref>Status-Code</x:ref>    = 3<x:ref>DIGIT</x:ref>
1933  <x:ref>Reason-Phrase</x:ref>  = *( <x:ref>WSP</x:ref> / <x:ref>VCHAR</x:ref> / <x:ref>obs-text</x:ref> )
1941<section title="Protocol Parameters" anchor="protocol.parameters">
1943<section title="Date/Time Formats: Full Date" anchor="">
1944  <x:anchor-alias value="HTTP-date"/>
1946   HTTP applications have historically allowed three different formats
1947   for date/time stamps. However, the preferred format is a fixed-length subset
1948   of that defined by <xref target="RFC1123"/>:
1950<figure><artwork type="example" x:indent-with="  ">
1951Sun, 06 Nov 1994 08:49:37 GMT  ; RFC 1123
1954   The other formats are described here only for compatibility with obsolete
1955   implementations.
1957<figure><artwork type="example" x:indent-with="  ">
1958Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format
1959Sun Nov  6 08:49:37 1994       ; ANSI C's asctime() format
1962   HTTP/1.1 clients and servers that parse a date value &MUST; accept
1963   all three formats (for compatibility with HTTP/1.0), though they &MUST;
1964   only generate the RFC 1123 format for representing HTTP-date values
1965   in header fields. See <xref target="tolerant.applications"/> for further information.
1968   All HTTP date/time stamps &MUST; be represented in Greenwich Mean Time
1969   (GMT), without exception. For the purposes of HTTP, GMT is exactly
1970   equal to UTC (Coordinated Universal Time). This is indicated in the
1971   first two formats by the inclusion of "GMT" as the three-letter
1972   abbreviation for time zone, and &MUST; be assumed when reading the
1973   asctime format. HTTP-date is case sensitive and &MUST-NOT; include
1974   additional whitespace beyond that specifically included as SP in the
1975   grammar.
1977<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="HTTP-date"/>
1978  <x:ref>HTTP-date</x:ref>    = <x:ref>rfc1123-date</x:ref> / <x:ref>obs-date</x:ref>
1980<t anchor="">
1981  <x:anchor-alias value="rfc1123-date"/>
1982  <x:anchor-alias value="time-of-day"/>
1983  <x:anchor-alias value="hour"/>
1984  <x:anchor-alias value="minute"/>
1985  <x:anchor-alias value="second"/>
1986  <x:anchor-alias value="day-name"/>
1987  <x:anchor-alias value="day"/>
1988  <x:anchor-alias value="month"/>
1989  <x:anchor-alias value="year"/>
1990  <x:anchor-alias value="GMT"/>
1991  Preferred format:
1993<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="rfc1123-date"/><iref primary="true" item="Grammar" subitem="date1"/><iref primary="true" item="Grammar" subitem="time-of-day"/><iref primary="true" item="Grammar" subitem="hour"/><iref primary="true" item="Grammar" subitem="minute"/><iref primary="true" item="Grammar" subitem="second"/><iref primary="true" item="Grammar" subitem="day-name"/><iref primary="true" item="Grammar" subitem="day-name-l"/><iref primary="true" item="Grammar" subitem="day"/><iref primary="true" item="Grammar" subitem="month"/><iref primary="true" item="Grammar" subitem="year"/><iref primary="true" item="Grammar" subitem="GMT"/>
1994  <x:ref>rfc1123-date</x:ref> = <x:ref>day-name</x:ref> "," <x:ref>SP</x:ref> date1 <x:ref>SP</x:ref> <x:ref>time-of-day</x:ref> <x:ref>SP</x:ref> <x:ref>GMT</x:ref>
1995  ; fixed length subset of the format defined in
1996  ; <xref target="RFC1123" x:fmt="of" x:sec="5.2.14"/>
1998  <x:ref>day-name</x:ref>     = <x:abnf-char-sequence>"Mon"</x:abnf-char-sequence> ; "Mon", case-sensitive
1999               / <x:abnf-char-sequence>"Tue"</x:abnf-char-sequence> ; "Tue", case-sensitive
2000               / <x:abnf-char-sequence>"Wed"</x:abnf-char-sequence> ; "Wed", case-sensitive
2001               / <x:abnf-char-sequence>"Thu"</x:abnf-char-sequence> ; "Thu", case-sensitive
2002               / <x:abnf-char-sequence>"Fri"</x:abnf-char-sequence> ; "Fri", case-sensitive
2003               / <x:abnf-char-sequence>"Sat"</x:abnf-char-sequence> ; "Sat", case-sensitive
2004               / <x:abnf-char-sequence>"Sun"</x:abnf-char-sequence> ; "Sun", case-sensitive
2006  <x:ref>date1</x:ref>        = <x:ref>day</x:ref> <x:ref>SP</x:ref> <x:ref>month</x:ref> <x:ref>SP</x:ref> <x:ref>year</x:ref>
2007               ; e.g., 02 Jun 1982
2009  <x:ref>day</x:ref>          = 2<x:ref>DIGIT</x:ref>
2010  <x:ref>month</x:ref>        = <x:abnf-char-sequence>"Jan"</x:abnf-char-sequence> ; "Jan", case-sensitive
2011               / <x:abnf-char-sequence>"Feb"</x:abnf-char-sequence> ; "Feb", case-sensitive
2012               / <x:abnf-char-sequence>"Mar"</x:abnf-char-sequence> ; "Mar", case-sensitive
2013               / <x:abnf-char-sequence>"Apr"</x:abnf-char-sequence> ; "Apr", case-sensitive
2014               / <x:abnf-char-sequence>"May"</x:abnf-char-sequence> ; "May", case-sensitive
2015               / <x:abnf-char-sequence>"Jun"</x:abnf-char-sequence> ; "Jun", case-sensitive
2016               / <x:abnf-char-sequence>"Jul"</x:abnf-char-sequence> ; "Jul", case-sensitive
2017               / <x:abnf-char-sequence>"Aug"</x:abnf-char-sequence> ; "Aug", case-sensitive
2018               / <x:abnf-char-sequence>"Sep"</x:abnf-char-sequence> ; "Sep", case-sensitive
2019               / <x:abnf-char-sequence>"Oct"</x:abnf-char-sequence> ; "Oct", case-sensitive
2020               / <x:abnf-char-sequence>"Nov"</x:abnf-char-sequence> ; "Nov", case-sensitive
2021               / <x:abnf-char-sequence>"Dec"</x:abnf-char-sequence> ; "Dec", case-sensitive
2022  <x:ref>year</x:ref>         = 4<x:ref>DIGIT</x:ref>
2024  <x:ref>GMT</x:ref>   = <x:abnf-char-sequence>"GMT"</x:abnf-char-sequence> ; "GMT", case-sensitive
2026  <x:ref>time-of-day</x:ref>  = <x:ref>hour</x:ref> ":" <x:ref>minute</x:ref> ":" <x:ref>second</x:ref>
2027                 ; 00:00:00 - 23:59:59
2029  <x:ref>hour</x:ref>         = 2<x:ref>DIGIT</x:ref>               
2030  <x:ref>minute</x:ref>       = 2<x:ref>DIGIT</x:ref>               
2031  <x:ref>second</x:ref>       = 2<x:ref>DIGIT</x:ref>               
2034  The semantics of <x:ref>day-name</x:ref>, <x:ref>day</x:ref>,
2035  <x:ref>month</x:ref>, <x:ref>year</x:ref>, and <x:ref>time-of-day</x:ref> are the
2036  same as those defined for the RFC 5322 constructs
2037  with the corresponding name (<xref target="RFC5322" x:fmt="," x:sec="3.3"/>).
2039<t anchor="">
2040  <x:anchor-alias value="obs-date"/>
2041  <x:anchor-alias value="rfc850-date"/>
2042  <x:anchor-alias value="asctime-date"/>
2043  <x:anchor-alias value="date1"/>
2044  <x:anchor-alias value="date2"/>
2045  <x:anchor-alias value="date3"/>
2046  <x:anchor-alias value="rfc1123-date"/>
2047  <x:anchor-alias value="day-name-l"/>
2048  Obsolete formats:
2050<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="obs-date"/>
2051  <x:ref>obs-date</x:ref>     = <x:ref>rfc850-date</x:ref> / <x:ref>asctime-date</x:ref>
2053<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="rfc850-date"/>
2054  <x:ref>rfc850-date</x:ref>  = <x:ref>day-name-l</x:ref> "," <x:ref>SP</x:ref> <x:ref>date2</x:ref> <x:ref>SP</x:ref> <x:ref>time-of-day</x:ref> <x:ref>SP</x:ref> <x:ref>GMT</x:ref>
2055  <x:ref>date2</x:ref>        = <x:ref>day</x:ref> "-" <x:ref>month</x:ref> "-" 2<x:ref>DIGIT</x:ref>
2056                 ; day-month-year (e.g., 02-Jun-82)
2058  <x:ref>day-name-l</x:ref>   = <x:abnf-char-sequence>"Monday"</x:abnf-char-sequence> ; "Monday", case-sensitive
2059         / <x:abnf-char-sequence>"Tuesday"</x:abnf-char-sequence> ; "Tuesday", case-sensitive
2060         / <x:abnf-char-sequence>"Wednesday"</x:abnf-char-sequence> ; "Wednesday", case-sensitive
2061         / <x:abnf-char-sequence>"Thursday"</x:abnf-char-sequence> ; "Thursday", case-sensitive
2062         / <x:abnf-char-sequence>"Friday"</x:abnf-char-sequence> ; "Friday", case-sensitive
2063         / <x:abnf-char-sequence>"Saturday"</x:abnf-char-sequence> ; "Saturday", case-sensitive
2064         / <x:abnf-char-sequence>"Sunday"</x:abnf-char-sequence> ; "Sunday", case-sensitive
2066<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="asctime-date"/>
2067  <x:ref>asctime-date</x:ref> = <x:ref>day-name</x:ref> <x:ref>SP</x:ref> <x:ref>date3</x:ref> <x:ref>SP</x:ref> <x:ref>time-of-day</x:ref> <x:ref>SP</x:ref> <x:ref>year</x:ref>
2068  <x:ref>date3</x:ref>        = <x:ref>month</x:ref> <x:ref>SP</x:ref> ( 2<x:ref>DIGIT</x:ref> / ( <x:ref>SP</x:ref> 1<x:ref>DIGIT</x:ref> ))
2069                 ; month day (e.g., Jun  2)
2072  <t>
2073    <x:h>Note:</x:h> Recipients of date values are encouraged to be robust in
2074    accepting date values that might have been sent by non-HTTP
2075    applications, as is sometimes the case when retrieving or posting
2076    messages via proxies/gateways to SMTP or NNTP.
2077  </t>
2080  <t>
2081    <x:h>Note:</x:h> HTTP requirements for the date/time stamp format apply only
2082    to their usage within the protocol stream. Clients and servers are
2083    not required to use these formats for user presentation, request
2084    logging, etc.
2085  </t>
2089<section title="Transfer Codings" anchor="transfer.codings">
2090  <x:anchor-alias value="transfer-coding"/>
2091  <x:anchor-alias value="transfer-extension"/>
2093   Transfer-coding values are used to indicate an encoding
2094   transformation that has been, can be, or might need to be applied to a
2095   payload body in order to ensure "safe transport" through the network.
2096   This differs from a content coding in that the transfer-coding is a
2097   property of the message rather than a property of the representation
2098   that is being transferred.
2100<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="transfer-coding"/><iref primary="true" item="Grammar" subitem="transfer-extension"/>
2101  <x:ref>transfer-coding</x:ref>         = "chunked" ; <xref target="chunked.encoding"/>
2102                          / "compress" ; <xref target="compress.coding"/>
2103                          / "deflate" ; <xref target="deflate.coding"/>
2104                          / "gzip" ; <xref target="gzip.coding"/>
2105                          / <x:ref>transfer-extension</x:ref>
2106  <x:ref>transfer-extension</x:ref>      = <x:ref>token</x:ref> *( <x:ref>OWS</x:ref> ";" <x:ref>OWS</x:ref> <x:ref>transfer-parameter</x:ref> )
2108<t anchor="rule.parameter">
2109  <x:anchor-alias value="attribute"/>
2110  <x:anchor-alias value="transfer-parameter"/>
2111  <x:anchor-alias value="value"/>
2112   Parameters are in the form of attribute/value pairs.
2114<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="transfer-parameter"/><iref primary="true" item="Grammar" subitem="attribute"/><iref primary="true" item="Grammar" subitem="value"/><iref primary="true" item="Grammar" subitem="date2"/><iref primary="true" item="Grammar" subitem="date3"/>
2115  <x:ref>transfer-parameter</x:ref>      = <x:ref>attribute</x:ref> <x:ref>BWS</x:ref> "=" <x:ref>BWS</x:ref> <x:ref>value</x:ref>
2116  <x:ref>attribute</x:ref>               = <x:ref>token</x:ref>
2117  <x:ref>value</x:ref>                   = <x:ref>word</x:ref>
2120   All transfer-coding values are case-insensitive. HTTP/1.1 uses
2121   transfer-coding values in the TE header field (<xref target="header.te"/>) and in
2122   the Transfer-Encoding header field (<xref target="header.transfer-encoding"/>).
2125   Transfer-codings are analogous to the Content-Transfer-Encoding values of
2126   MIME, which were designed to enable safe transport of binary data over a
2127   7-bit transport service (<xref target="RFC2045" x:fmt="," x:sec="6"/>).
2128   However, safe transport
2129   has a different focus for an 8bit-clean transfer protocol. In HTTP,
2130   the only unsafe characteristic of message-bodies is the difficulty in
2131   determining the exact message body length (<xref target="message.body"/>),
2132   or the desire to encrypt data over a shared transport.
2135   A server that receives a request message with a transfer-coding it does
2136   not understand &SHOULD; respond with 501 (Not Implemented) and then
2137   close the connection. A server &MUST-NOT; send transfer-codings to an HTTP/1.0
2138   client.
2141<section title="Chunked Transfer Coding" anchor="chunked.encoding">
2142  <iref item="chunked (Coding Format)"/>
2143  <iref item="Coding Format" subitem="chunked"/>
2144  <x:anchor-alias value="chunk"/>
2145  <x:anchor-alias value="Chunked-Body"/>
2146  <x:anchor-alias value="chunk-data"/>
2147  <x:anchor-alias value="chunk-ext"/>
2148  <x:anchor-alias value="chunk-ext-name"/>
2149  <x:anchor-alias value="chunk-ext-val"/>
2150  <x:anchor-alias value="chunk-size"/>
2151  <x:anchor-alias value="last-chunk"/>
2152  <x:anchor-alias value="trailer-part"/>
2153  <x:anchor-alias value="quoted-str-nf"/>
2154  <x:anchor-alias value="qdtext-nf"/>
2156   The chunked encoding modifies the body of a message in order to
2157   transfer it as a series of chunks, each with its own size indicator,
2158   followed by an &OPTIONAL; trailer containing header fields. This
2159   allows dynamically produced content to be transferred along with the
2160   information necessary for the recipient to verify that it has
2161   received the full message.
2163<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Chunked-Body"/><iref primary="true" item="Grammar" subitem="chunk"/><iref primary="true" item="Grammar" subitem="chunk-size"/><iref primary="true" item="Grammar" subitem="last-chunk"/><iref primary="true" item="Grammar" subitem="chunk-ext"/><iref primary="true" item="Grammar" subitem="chunk-ext-name"/><iref primary="true" item="Grammar" subitem="chunk-ext-val"/><iref primary="true" item="Grammar" subitem="chunk-data"/><iref primary="true" item="Grammar" subitem="trailer-part"/><iref primary="true" item="Grammar" subitem="quoted-str-nf"/><iref primary="true" item="Grammar" subitem="qdtext-nf"/>
2164  <x:ref>Chunked-Body</x:ref>   = *<x:ref>chunk</x:ref>
2165                   <x:ref>last-chunk</x:ref>
2166                   <x:ref>trailer-part</x:ref>
2167                   <x:ref>CRLF</x:ref>
2169  <x:ref>chunk</x:ref>          = <x:ref>chunk-size</x:ref> *WSP [ <x:ref>chunk-ext</x:ref> ] <x:ref>CRLF</x:ref>
2170                   <x:ref>chunk-data</x:ref> <x:ref>CRLF</x:ref>
2171  <x:ref>chunk-size</x:ref>     = 1*<x:ref>HEXDIG</x:ref>
2172  <x:ref>last-chunk</x:ref>     = 1*("0") *WSP [ <x:ref>chunk-ext</x:ref> ] <x:ref>CRLF</x:ref>
2174  <x:ref>chunk-ext</x:ref>      = *( ";" *WSP <x:ref>chunk-ext-name</x:ref>
2175                      [ "=" <x:ref>chunk-ext-val</x:ref> ] *WSP )
2176  <x:ref>chunk-ext-name</x:ref> = <x:ref>token</x:ref>
2177  <x:ref>chunk-ext-val</x:ref>  = <x:ref>token</x:ref> / <x:ref>quoted-str-nf</x:ref>
2178  <x:ref>chunk-data</x:ref>     = 1*<x:ref>OCTET</x:ref> ; a sequence of chunk-size octets
2179  <x:ref>trailer-part</x:ref>   = *( <x:ref>header-field</x:ref> <x:ref>CRLF</x:ref> )
2181  <x:ref>quoted-str-nf</x:ref>  = <x:ref>DQUOTE</x:ref> *( <x:ref>qdtext-nf</x:ref> / <x:ref>quoted-pair</x:ref> ) <x:ref>DQUOTE</x:ref>
2182                 ; like <x:ref>quoted-string</x:ref>, but disallowing line folding
2183  <x:ref>qdtext-nf</x:ref>      = <x:ref>WSP</x:ref> / %x21 / %x23-5B / %x5D-7E / <x:ref>obs-text</x:ref>
2184                 ; <x:ref>WSP</x:ref> / &lt;<x:ref>VCHAR</x:ref> except <x:ref>DQUOTE</x:ref> and "\"&gt; / <x:ref>obs-text</x:ref>
2187   The chunk-size field is a string of hex digits indicating the size of
2188   the chunk-data in octets. The chunked encoding is ended by any chunk whose size is
2189   zero, followed by the trailer, which is terminated by an empty line.
2192   The trailer allows the sender to include additional HTTP header
2193   fields at the end of the message. The Trailer header field can be
2194   used to indicate which header fields are included in a trailer (see
2195   <xref target="header.trailer"/>).
2198   A server using chunked transfer-coding in a response &MUST-NOT; use the
2199   trailer for any header fields unless at least one of the following is
2200   true:
2201  <list style="numbers">
2202    <t>the request included a TE header field that indicates "trailers" is
2203     acceptable in the transfer-coding of the  response, as described in
2204     <xref target="header.te"/>; or,</t>
2206    <t>the trailer fields consist entirely of optional metadata, and the
2207    recipient could use the message (in a manner acceptable to the server where
2208    the field originated) without receiving it. In other words, the server that
2209    generated the header (often but not always the origin server) is willing to
2210    accept the possibility that the trailer fields might be silently discarded
2211    along the path to the client.</t>
2212  </list>
2215   This requirement prevents an interoperability failure when the
2216   message is being received by an HTTP/1.1 (or later) proxy and
2217   forwarded to an HTTP/1.0 recipient. It avoids a situation where
2218   compliance with the protocol would have necessitated a possibly
2219   infinite buffer on the proxy.
2222   A process for decoding the "chunked" transfer-coding
2223   can be represented in pseudo-code as:
2225<figure><artwork type="code">
2226  length := 0
2227  read chunk-size, chunk-ext (if any) and CRLF
2228  while (chunk-size &gt; 0) {
2229     read chunk-data and CRLF
2230     append chunk-data to decoded-body
2231     length := length + chunk-size
2232     read chunk-size and CRLF
2233  }
2234  read header-field
2235  while (header-field not empty) {
2236     append header-field to existing header fields
2237     read header-field
2238  }
2239  Content-Length := length
2240  Remove "chunked" from Transfer-Encoding
2243   All HTTP/1.1 applications &MUST; be able to receive and decode the
2244   "chunked" transfer-coding and &MUST; ignore chunk-ext extensions
2245   they do not understand.
2248   Since "chunked" is the only transfer-coding required to be understood
2249   by HTTP/1.1 recipients, it plays a crucial role in delimiting messages
2250   on a persistent connection.  Whenever a transfer-coding is applied to
2251   a payload body in a request, the final transfer-coding applied &MUST;
2252   be "chunked".  If a transfer-coding is applied to a response payload
2253   body, then either the final transfer-coding applied &MUST; be "chunked"
2254   or the message &MUST; be terminated by closing the connection. When the
2255   "chunked" transfer-coding is used, it &MUST; be the last transfer-coding
2256   applied to form the message-body. The "chunked" transfer-coding &MUST-NOT;
2257   be applied more than once in a message-body.
2261<section title="Compression Codings" anchor="compression.codings">
2263   The codings defined below can be used to compress the payload of a
2264   message.
2267   <x:h>Note:</x:h> Use of program names for the identification of encoding formats
2268   is not desirable and is discouraged for future encodings. Their
2269   use here is representative of historical practice, not good
2270   design.
2273   <x:h>Note:</x:h> For compatibility with previous implementations of HTTP,
2274   applications &SHOULD; consider "x-gzip" and "x-compress" to be
2275   equivalent to "gzip" and "compress" respectively.
2278<section title="Compress Coding" anchor="compress.coding">
2279<iref item="compress (Coding Format)"/>
2280<iref item="Coding Format" subitem="compress"/>
2282   The "compress" format is produced by the common UNIX file compression
2283   program "compress". This format is an adaptive Lempel-Ziv-Welch
2284   coding (LZW).
2288<section title="Deflate Coding" anchor="deflate.coding">
2289<iref item="deflate (Coding Format)"/>
2290<iref item="Coding Format" subitem="deflate"/>
2292   The "deflate" format is defined as the "deflate" compression mechanism
2293   (described in <xref target="RFC1951"/>) used inside the "zlib"
2294   data format (<xref target="RFC1950"/>).
2297  <t>
2298    <x:h>Note:</x:h> Some incorrect implementations send the "deflate"
2299    compressed data without the zlib wrapper.
2300   </t>
2304<section title="Gzip Coding" anchor="gzip.coding">
2305<iref item="gzip (Coding Format)"/>
2306<iref item="Coding Format" subitem="gzip"/>
2308   The "gzip" format is produced by the file compression program
2309   "gzip" (GNU zip), as described in <xref target="RFC1952"/>. This format is a
2310   Lempel-Ziv coding (LZ77) with a 32 bit CRC.
2316<section title="Transfer Coding Registry" anchor="transfer.coding.registry">
2318   The HTTP Transfer Coding Registry defines the name space for the transfer
2319   coding names.
2322   Registrations &MUST; include the following fields:
2323   <list style="symbols">
2324     <t>Name</t>
2325     <t>Description</t>
2326     <t>Pointer to specification text</t>
2327   </list>
2330   Names of transfer codings &MUST-NOT; overlap with names of content codings
2331   (&content-codings;), unless the encoding transformation is identical (as it
2332   is the case for the compression codings defined in
2333   <xref target="compression.codings"/>).
2336   Values to be added to this name space require a specification
2337   (see "Specification Required" in <xref target="RFC5226" x:fmt="of" x:sec="4.1"/>), and &MUST;
2338   conform to the purpose of transfer coding defined in this section.
2341   The registry itself is maintained at
2342   <eref target=""/>.
2347<section title="Product Tokens" anchor="product.tokens">
2348  <x:anchor-alias value="product"/>
2349  <x:anchor-alias value="product-version"/>
2351   Product tokens are used to allow communicating applications to
2352   identify themselves by software name and version. Most fields using
2353   product tokens also allow sub-products which form a significant part
2354   of the application to be listed, separated by whitespace. By
2355   convention, the products are listed in order of their significance
2356   for identifying the application.
2358<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="product"/><iref primary="true" item="Grammar" subitem="product-version"/>
2359  <x:ref>product</x:ref>         = <x:ref>token</x:ref> ["/" <x:ref>product-version</x:ref>]
2360  <x:ref>product-version</x:ref> = <x:ref>token</x:ref>
2363   Examples:
2365<figure><artwork type="example">
2366  User-Agent: CERN-LineMode/2.15 libwww/2.17b3
2367  Server: Apache/0.8.4
2370   Product tokens &SHOULD; be short and to the point. They &MUST-NOT; be
2371   used for advertising or other non-essential information. Although any
2372   token octet &MAY; appear in a product-version, this token &SHOULD;
2373   only be used for a version identifier (i.e., successive versions of
2374   the same product &SHOULD; only differ in the product-version portion of
2375   the product value).
2379<section title="Quality Values" anchor="quality.values">
2380  <x:anchor-alias value="qvalue"/>
2382   Both transfer codings (TE request header field, <xref target="header.te"/>)
2383   and content negotiation (&content.negotiation;) use short "floating point"
2384   numbers to indicate the relative importance ("weight") of various
2385   negotiable parameters.  A weight is normalized to a real number in
2386   the range 0 through 1, where 0 is the minimum and 1 the maximum
2387   value. If a parameter has a quality value of 0, then content with
2388   this parameter is "not acceptable" for the client. HTTP/1.1
2389   applications &MUST-NOT; generate more than three digits after the
2390   decimal point. User configuration of these values &SHOULD; also be
2391   limited in this fashion.
2393<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="qvalue"/>
2394  <x:ref>qvalue</x:ref>         = ( "0" [ "." 0*3<x:ref>DIGIT</x:ref> ] )
2395                 / ( "1" [ "." 0*3("0") ] )
2398  <t>
2399     <x:h>Note:</x:h> "Quality values" is a misnomer, since these values merely represent
2400     relative degradation in desired quality.
2401  </t>
2407<section title="Connections" anchor="connections">
2409<section title="Persistent Connections" anchor="persistent.connections">
2411<section title="Purpose" anchor="persistent.purpose">
2413   Prior to persistent connections, a separate TCP connection was
2414   established for each request, increasing the load on HTTP servers
2415   and causing congestion on the Internet. The use of inline images and
2416   other associated data often requires a client to make multiple
2417   requests of the same server in a short amount of time. Analysis of
2418   these performance problems and results from a prototype
2419   implementation are available <xref target="Pad1995"/> <xref target="Spe"/>. Implementation experience and
2420   measurements of actual HTTP/1.1 implementations show good
2421   results <xref target="Nie1997"/>. Alternatives have also been explored, for example,
2422   T/TCP <xref target="Tou1998"/>.
2425   Persistent HTTP connections have a number of advantages:
2426  <list style="symbols">
2427      <t>
2428        By opening and closing fewer TCP connections, CPU time is saved
2429        in routers and hosts (clients, servers, proxies, gateways,
2430        tunnels, or caches), and memory used for TCP protocol control
2431        blocks can be saved in hosts.
2432      </t>
2433      <t>
2434        HTTP requests and responses can be pipelined on a connection.
2435        Pipelining allows a client to make multiple requests without
2436        waiting for each response, allowing a single TCP connection to
2437        be used much more efficiently, with much lower elapsed time.
2438      </t>
2439      <t>
2440        Network congestion is reduced by reducing the number of packets
2441        caused by TCP opens, and by allowing TCP sufficient time to
2442        determine the congestion state of the network.
2443      </t>
2444      <t>
2445        Latency on subsequent requests is reduced since there is no time
2446        spent in TCP's connection opening handshake.
2447      </t>
2448      <t>
2449        HTTP can evolve more gracefully, since errors can be reported
2450        without the penalty of closing the TCP connection. Clients using
2451        future versions of HTTP might optimistically try a new feature,
2452        but if communicating with an older server, retry with old
2453        semantics after an error is reported.
2454      </t>
2455    </list>
2458   HTTP implementations &SHOULD; implement persistent connections.
2462<section title="Overall Operation" anchor="persistent.overall">
2464   A significant difference between HTTP/1.1 and earlier versions of
2465   HTTP is that persistent connections are the default behavior of any
2466   HTTP connection. That is, unless otherwise indicated, the client
2467   &SHOULD; assume that the server will maintain a persistent connection,
2468   even after error responses from the server.
2471   Persistent connections provide a mechanism by which a client and a
2472   server can signal the close of a TCP connection. This signaling takes
2473   place using the Connection header field (<xref target="header.connection"/>). Once a close
2474   has been signaled, the client &MUST-NOT; send any more requests on that
2475   connection.
2478<section title="Negotiation" anchor="persistent.negotiation">
2480   An HTTP/1.1 server &MAY; assume that a HTTP/1.1 client intends to
2481   maintain a persistent connection unless a Connection header field including
2482   the connection-token "close" was sent in the request. If the server
2483   chooses to close the connection immediately after sending the
2484   response, it &SHOULD; send a Connection header field including the
2485   connection-token "close".
2488   An HTTP/1.1 client &MAY; expect a connection to remain open, but would
2489   decide to keep it open based on whether the response from a server
2490   contains a Connection header field with the connection-token close. In case
2491   the client does not want to maintain a connection for more than that
2492   request, it &SHOULD; send a Connection header field including the
2493   connection-token close.
2496   If either the client or the server sends the close token in the
2497   Connection header field, that request becomes the last one for the
2498   connection.
2501   Clients and servers &SHOULD-NOT;  assume that a persistent connection is
2502   maintained for HTTP versions less than 1.1 unless it is explicitly
2503   signaled. See <xref target="compatibility.with.http.1.0.persistent.connections"/> for more information on backward
2504   compatibility with HTTP/1.0 clients.
2507   In order to remain persistent, all messages on the connection &MUST;
2508   have a self-defined message length (i.e., one not defined by closure
2509   of the connection), as described in <xref target="message.body"/>.
2513<section title="Pipelining" anchor="pipelining">
2515   A client that supports persistent connections &MAY; "pipeline" its
2516   requests (i.e., send multiple requests without waiting for each
2517   response). A server &MUST; send its responses to those requests in the
2518   same order that the requests were received.
2521   Clients which assume persistent connections and pipeline immediately
2522   after connection establishment &SHOULD; be prepared to retry their
2523   connection if the first pipelined attempt fails. If a client does
2524   such a retry, it &MUST-NOT; pipeline before it knows the connection is
2525   persistent. Clients &MUST; also be prepared to resend their requests if
2526   the server closes the connection before sending all of the
2527   corresponding responses.
2530   Clients &SHOULD-NOT; pipeline requests using non-idempotent request methods or
2531   non-idempotent sequences of request methods (see &idempotent-methods;). Otherwise, a
2532   premature termination of the transport connection could lead to
2533   indeterminate results. A client wishing to send a non-idempotent
2534   request &SHOULD; wait to send that request until it has received the
2535   response status line for the previous request.
2540<section title="Proxy Servers" anchor="persistent.proxy">
2542   It is especially important that proxies correctly implement the
2543   properties of the Connection header field as specified in <xref target="header.connection"/>.
2546   The proxy server &MUST; signal persistent connections separately with
2547   its clients and the origin servers (or other proxy servers) that it
2548   connects to. Each persistent connection applies to only one transport
2549   link.
2552   A proxy server &MUST-NOT; establish a HTTP/1.1 persistent connection
2553   with an HTTP/1.0 client (but see <xref x:sec="19.7.1" x:fmt="of" target="RFC2068"/>
2554   for information and discussion of the problems with the Keep-Alive header field
2555   implemented by many HTTP/1.0 clients).
2558<section title="End-to-end and Hop-by-hop Header Fields" anchor="end-to-end.and.hop-by-hop.header-fields">
2560  <cref anchor="TODO-end-to-end" source="jre">
2561    Restored from <eref target=""/>.
2562    See also <eref target=""/>.
2563  </cref>
2566   For the purpose of defining the behavior of caches and non-caching
2567   proxies, we divide HTTP header fields into two categories:
2568  <list style="symbols">
2569      <t>End-to-end header fields, which are  transmitted to the ultimate
2570        recipient of a request or response. End-to-end header fields in
2571        responses MUST be stored as part of a cache entry and &MUST; be
2572        transmitted in any response formed from a cache entry.</t>
2574      <t>Hop-by-hop header fields, which are meaningful only for a single
2575        transport-level connection, and are not stored by caches or
2576        forwarded by proxies.</t>
2577  </list>
2580   The following HTTP/1.1 header fields are hop-by-hop header fields:
2581  <list style="symbols">
2582      <t>Connection</t>
2583      <t>Keep-Alive</t>
2584      <t>Proxy-Authenticate</t>
2585      <t>Proxy-Authorization</t>
2586      <t>TE</t>
2587      <t>Trailer</t>
2588      <t>Transfer-Encoding</t>
2589      <t>Upgrade</t>
2590  </list>
2593   All other header fields defined by HTTP/1.1 are end-to-end header fields.
2596   Other hop-by-hop header fields &MUST; be listed in a Connection header field
2597   (<xref target="header.connection"/>).
2601<section title="Non-modifiable Header Fields" anchor="non-modifiable.header-fields">
2603  <cref anchor="TODO-non-mod-headers" source="jre">
2604    Restored from <eref target=""/>.
2605    See also <eref target=""/>.
2606  </cref>
2609   Some features of HTTP/1.1, such as Digest Authentication, depend on the
2610   value of certain end-to-end header fields. A non-transforming proxy &SHOULD-NOT;
2611   modify an end-to-end header field unless the definition of that header field requires
2612   or specifically allows that.
2615   A non-transforming proxy &MUST-NOT; modify any of the following fields in a
2616   request or response, and it &MUST-NOT; add any of these fields if not
2617   already present:
2618  <list style="symbols">
2619    <t>Allow</t>
2620    <t>Content-Location</t>
2621    <t>Content-MD5</t>
2622    <t>ETag</t>
2623    <t>Last-Modified</t>
2624    <t>Server</t>
2625  </list>
2628   A non-transforming proxy &MUST-NOT; modify any of the following fields in a
2629   response:
2630  <list style="symbols">
2631    <t>Expires</t>
2632  </list>
2635   but it &MAY; add any of these fields if not already present. If an
2636   Expires header field is added, it &MUST; be given a field-value identical to
2637   that of the Date header field in that response.
2640   A proxy &MUST-NOT; modify or add any of the following fields in a
2641   message that contains the no-transform cache-control directive, or in
2642   any request:
2643  <list style="symbols">
2644    <t>Content-Encoding</t>
2645    <t>Content-Range</t>
2646    <t>Content-Type</t>
2647  </list>
2650   A transforming proxy &MAY; modify or add these fields to a message
2651   that does not include no-transform, but if it does so, it &MUST; add a
2652   Warning 214 (Transformation applied) if one does not already appear
2653   in the message (see &header-warning;).
2656  <t>
2657    <x:h>Warning:</x:h> Unnecessary modification of end-to-end header fields might
2658    cause authentication failures if stronger authentication
2659    mechanisms are introduced in later versions of HTTP. Such
2660    authentication mechanisms &MAY; rely on the values of header fields
2661    not listed here.
2662  </t>
2665   A non-transforming proxy &MUST; preserve the message payload (&payload;),
2666   though it &MAY; change the message-body through application or removal
2667   of a transfer-coding (<xref target="transfer.codings"/>).
2673<section title="Practical Considerations" anchor="persistent.practical">
2675   Servers will usually have some time-out value beyond which they will
2676   no longer maintain an inactive connection. Proxy servers might make
2677   this a higher value since it is likely that the client will be making
2678   more connections through the same server. The use of persistent
2679   connections places no requirements on the length (or existence) of
2680   this time-out for either the client or the server.
2683   When a client or server wishes to time-out it &SHOULD; issue a graceful
2684   close on the transport connection. Clients and servers &SHOULD; both
2685   constantly watch for the other side of the transport close, and
2686   respond to it as appropriate. If a client or server does not detect
2687   the other side's close promptly it could cause unnecessary resource
2688   drain on the network.
2691   A client, server, or proxy &MAY; close the transport connection at any
2692   time. For example, a client might have started to send a new request
2693   at the same time that the server has decided to close the "idle"
2694   connection. From the server's point of view, the connection is being
2695   closed while it was idle, but from the client's point of view, a
2696   request is in progress.
2699   This means that clients, servers, and proxies &MUST; be able to recover
2700   from asynchronous close events. Client software &SHOULD; reopen the
2701   transport connection and retransmit the aborted sequence of requests
2702   without user interaction so long as the request sequence is
2703   idempotent (see &idempotent-methods;). Non-idempotent request methods or sequences
2704   &MUST-NOT; be automatically retried, although user agents &MAY; offer a
2705   human operator the choice of retrying the request(s). Confirmation by
2706   user-agent software with semantic understanding of the application
2707   &MAY; substitute for user confirmation. The automatic retry &SHOULD-NOT;
2708   be repeated if the second sequence of requests fails.
2711   Servers &SHOULD; always respond to at least one request per connection,
2712   if at all possible. Servers &SHOULD-NOT;  close a connection in the
2713   middle of transmitting a response, unless a network or client failure
2714   is suspected.
2717   Clients (including proxies) &SHOULD; limit the number of simultaneous
2718   connections that they maintain to a given server (including proxies).
2721   Previous revisions of HTTP gave a specific number of connections as a
2722   ceiling, but this was found to be impractical for many applications. As a
2723   result, this specification does not mandate a particular maximum number of
2724   connections, but instead encourages clients to be conservative when opening
2725   multiple connections.
2728   In particular, while using multiple connections avoids the "head-of-line
2729   blocking" problem (whereby a request that takes significant server-side
2730   processing and/or has a large payload can block subsequent requests on the
2731   same connection), each connection used consumes server resources (sometimes
2732   significantly), and furthermore using multiple connections can cause
2733   undesirable side effects in congested networks.
2736   Note that servers might reject traffic that they deem abusive, including an
2737   excessive number of connections from a client.
2742<section title="Message Transmission Requirements" anchor="message.transmission.requirements">
2744<section title="Persistent Connections and Flow Control" anchor="persistent.flow">
2746   HTTP/1.1 servers &SHOULD; maintain persistent connections and use TCP's
2747   flow control mechanisms to resolve temporary overloads, rather than
2748   terminating connections with the expectation that clients will retry.
2749   The latter technique can exacerbate network congestion.
2753<section title="Monitoring Connections for Error Status Messages" anchor="persistent.monitor">
2755   An HTTP/1.1 (or later) client sending a message-body &SHOULD; monitor
2756   the network connection for an error status code while it is transmitting
2757   the request. If the client sees an error status code, it &SHOULD;
2758   immediately cease transmitting the body. If the body is being sent
2759   using a "chunked" encoding (<xref target="transfer.codings"/>), a zero length chunk and
2760   empty trailer &MAY; be used to prematurely mark the end of the message.
2761   If the body was preceded by a Content-Length header field, the client &MUST;
2762   close the connection.
2766<section title="Use of the 100 (Continue) Status" anchor="use.of.the.100.status">
2768   The purpose of the 100 (Continue) status code (see &status-100;) is to
2769   allow a client that is sending a request message with a request body
2770   to determine if the origin server is willing to accept the request
2771   (based on the request header fields) before the client sends the request
2772   body. In some cases, it might either be inappropriate or highly
2773   inefficient for the client to send the body if the server will reject
2774   the message without looking at the body.
2777   Requirements for HTTP/1.1 clients:
2778  <list style="symbols">
2779    <t>
2780        If a client will wait for a 100 (Continue) response before
2781        sending the request body, it &MUST; send an Expect header
2782        field (&header-expect;) with the "100-continue" expectation.
2783    </t>
2784    <t>
2785        A client &MUST-NOT; send an Expect header field (&header-expect;)
2786        with the "100-continue" expectation if it does not intend
2787        to send a request body.
2788    </t>
2789  </list>
2792   Because of the presence of older implementations, the protocol allows
2793   ambiguous situations in which a client might send "Expect: 100-continue"
2794   without receiving either a 417 (Expectation Failed)
2795   or a 100 (Continue) status code. Therefore, when a client sends this
2796   header field to an origin server (possibly via a proxy) from which it
2797   has never seen a 100 (Continue) status code, the client &SHOULD-NOT; 
2798   wait for an indefinite period before sending the request body.
2801   Requirements for HTTP/1.1 origin servers:
2802  <list style="symbols">
2803    <t> Upon receiving a request which includes an Expect header
2804        field with the "100-continue" expectation, an origin server &MUST;
2805        either respond with 100 (Continue) status code and continue to read
2806        from the input stream, or respond with a final status code. The
2807        origin server &MUST-NOT; wait for the request body before sending
2808        the 100 (Continue) response. If it responds with a final status
2809        code, it &MAY; close the transport connection or it &MAY; continue
2810        to read and discard the rest of the request.  It &MUST-NOT;
2811        perform the request method if it returns a final status code.
2812    </t>
2813    <t> An origin server &SHOULD-NOT;  send a 100 (Continue) response if
2814        the request message does not include an Expect header
2815        field with the "100-continue" expectation, and &MUST-NOT; send a
2816        100 (Continue) response if such a request comes from an HTTP/1.0
2817        (or earlier) client. There is an exception to this rule: for
2818        compatibility with <xref target="RFC2068"/>, a server &MAY; send a 100 (Continue)
2819        status code in response to an HTTP/1.1 PUT or POST request that does
2820        not include an Expect header field with the "100-continue"
2821        expectation. This exception, the purpose of which is
2822        to minimize any client processing delays associated with an
2823        undeclared wait for 100 (Continue) status code, applies only to
2824        HTTP/1.1 requests, and not to requests with any other HTTP-version
2825        value.
2826    </t>
2827    <t> An origin server &MAY; omit a 100 (Continue) response if it has
2828        already received some or all of the request body for the
2829        corresponding request.
2830    </t>
2831    <t> An origin server that sends a 100 (Continue) response &MUST;
2832    ultimately send a final status code, once the request body is
2833        received and processed, unless it terminates the transport
2834        connection prematurely.
2835    </t>
2836    <t> If an origin server receives a request that does not include an
2837        Expect header field with the "100-continue" expectation,
2838        the request includes a request body, and the server responds
2839        with a final status code before reading the entire request body
2840        from the transport connection, then the server &SHOULD-NOT;  close
2841        the transport connection until it has read the entire request,
2842        or until the client closes the connection. Otherwise, the client
2843        might not reliably receive the response message. However, this
2844        requirement is not be construed as preventing a server from
2845        defending itself against denial-of-service attacks, or from
2846        badly broken client implementations.
2847      </t>
2848    </list>
2851   Requirements for HTTP/1.1 proxies:
2852  <list style="symbols">
2853    <t> If a proxy receives a request that includes an Expect header
2854        field with the "100-continue" expectation, and the proxy
2855        either knows that the next-hop server complies with HTTP/1.1 or
2856        higher, or does not know the HTTP version of the next-hop
2857        server, it &MUST; forward the request, including the Expect header
2858        field.
2859    </t>
2860    <t> If the proxy knows that the version of the next-hop server is
2861        HTTP/1.0 or lower, it &MUST-NOT; forward the request, and it &MUST;
2862        respond with a 417 (Expectation Failed) status code.
2863    </t>
2864    <t> Proxies &SHOULD; maintain a cache recording the HTTP version
2865        numbers received from recently-referenced next-hop servers.
2866    </t>
2867    <t> A proxy &MUST-NOT; forward a 100 (Continue) response if the
2868        request message was received from an HTTP/1.0 (or earlier)
2869        client and did not include an Expect header field with
2870        the "100-continue" expectation. This requirement overrides the
2871        general rule for forwarding of 1xx responses (see &status-1xx;).
2872    </t>
2873  </list>
2877<section title="Client Behavior if Server Prematurely Closes Connection" anchor="connection.premature">
2879   If an HTTP/1.1 client sends a request which includes a request body,
2880   but which does not include an Expect header field with the
2881   "100-continue" expectation, and if the client is not directly
2882   connected to an HTTP/1.1 origin server, and if the client sees the
2883   connection close before receiving a status line from the server, the
2884   client &SHOULD; retry the request.  If the client does retry this
2885   request, it &MAY; use the following "binary exponential backoff"
2886   algorithm to be assured of obtaining a reliable response:
2887  <list style="numbers">
2888    <t>
2889      Initiate a new connection to the server
2890    </t>
2891    <t>
2892      Transmit the request-line, header fields, and the CRLF that
2893      indicates the end of header fields.
2894    </t>
2895    <t>
2896      Initialize a variable R to the estimated round-trip time to the
2897         server (e.g., based on the time it took to establish the
2898         connection), or to a constant value of 5 seconds if the round-trip
2899         time is not available.
2900    </t>
2901    <t>
2902       Compute T = R * (2**N), where N is the number of previous
2903         retries of this request.
2904    </t>
2905    <t>
2906       Wait either for an error response from the server, or for T
2907         seconds (whichever comes first)
2908    </t>
2909    <t>
2910       If no error response is received, after T seconds transmit the
2911         body of the request.
2912    </t>
2913    <t>
2914       If client sees that the connection is closed prematurely,
2915         repeat from step 1 until the request is accepted, an error
2916         response is received, or the user becomes impatient and
2917         terminates the retry process.
2918    </t>
2919  </list>
2922   If at any point an error status code is received, the client
2923  <list style="symbols">
2924      <t>&SHOULD-NOT;  continue and</t>
2926      <t>&SHOULD; close the connection if it has not completed sending the
2927        request message.</t>
2928    </list>
2935<section title="Miscellaneous notes that might disappear" anchor="misc">
2936<section title="Scheme aliases considered harmful" anchor="scheme.aliases">
2938   <cref anchor="TBD-aliases-harmful">describe why aliases like webcal are harmful.</cref>
2942<section title="Use of HTTP for proxy communication" anchor="http.proxy">
2944   <cref anchor="TBD-proxy-other">Configured to use HTTP to proxy HTTP or other protocols.</cref>
2948<section title="Interception of HTTP for access control" anchor="http.intercept">
2950   <cref anchor="TBD-intercept">Interception of HTTP traffic for initiating access control.</cref>
2954<section title="Use of HTTP by other protocols" anchor="http.others">
2956   <cref anchor="TBD-profiles">Profiles of HTTP defined by other protocol.
2957   Extensions of HTTP like WebDAV.</cref>
2961<section title="Use of HTTP by media type specification" anchor="">
2963   <cref anchor="TBD-hypertext">Instructions on composing HTTP requests via hypertext formats.</cref>
2968<section title="Header Field Definitions" anchor="header.field.definitions">
2970   This section defines the syntax and semantics of HTTP header fields
2971   related to message framing and transport protocols.
2974<section title="Connection" anchor="header.connection">
2975  <iref primary="true" item="Connection header field" x:for-anchor=""/>
2976  <iref primary="true" item="Header Fields" subitem="Connection" x:for-anchor=""/>
2977  <x:anchor-alias value="Connection"/>
2978  <x:anchor-alias value="connection-token"/>
2980   The "Connection" header field allows the sender to specify
2981   options that are desired only for that particular connection.
2982   Such connection options &MUST; be removed or replaced before the
2983   message can be forwarded downstream by a proxy or gateway.
2984   This mechanism also allows the sender to indicate which HTTP
2985   header fields used in the message are only intended for the
2986   immediate recipient ("hop-by-hop"), as opposed to all recipients
2987   on the chain ("end-to-end"), enabling the message to be
2988   self-descriptive and allowing future connection-specific extensions
2989   to be deployed in HTTP without fear that they will be blindly
2990   forwarded by previously deployed intermediaries.
2993   The Connection header field's value has the following grammar:
2995<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Connection"/><iref primary="true" item="Grammar" subitem="connection-token"/>
2996  <x:ref>Connection</x:ref>       = 1#<x:ref>connection-token</x:ref>
2997  <x:ref>connection-token</x:ref> = <x:ref>token</x:ref>
3000   A proxy or gateway &MUST; parse a received Connection
3001   header field before a message is forwarded and, for each
3002   connection-token in this field, remove any header field(s) from
3003   the message with the same name as the connection-token, and then
3004   remove the Connection header field itself or replace it with the
3005   sender's own connection options for the forwarded message.
3008   A sender &MUST-NOT; include field-names in the Connection header
3009   field-value for fields that are defined as expressing constraints
3010   for all recipients in the request or response chain, such as the
3011   Cache-Control header field (&header-cache-control;).
3014   The connection options do not have to correspond to a header field
3015   present in the message, since a connection-specific header field
3016   might not be needed if there are no parameters associated with that
3017   connection option.  Recipients that trigger certain connection
3018   behavior based on the presence of connection options &MUST; do so
3019   based on the presence of the connection-token rather than only the
3020   presence of the optional header field.  In other words, if the
3021   connection option is received as a header field but not indicated
3022   within the Connection field-value, then the recipient &MUST; ignore
3023   the connection-specific header field because it has likely been
3024   forwarded by an intermediary that is only partially compliant.
3027   When defining new connection options, specifications ought to
3028   carefully consider existing deployed header fields and ensure
3029   that the new connection-token does not share the same name as
3030   an unrelated header field that might already be deployed.
3031   Defining a new connection-token essentially reserves that potential
3032   field-name for carrying additional information related to the
3033   connection option, since it would be unwise for senders to use
3034   that field-name for anything else.
3037   HTTP/1.1 defines the "close" connection option for the sender to
3038   signal that the connection will be closed after completion of the
3039   response. For example,
3041<figure><artwork type="example">
3042  Connection: close
3045   in either the request or the response header fields indicates that
3046   the connection &SHOULD-NOT;  be considered "persistent" (<xref target="persistent.connections"/>)
3047   after the current request/response is complete.
3050   An HTTP/1.1 client that does not support persistent connections &MUST;
3051   include the "close" connection option in every request message.
3054   An HTTP/1.1 server that does not support persistent connections &MUST;
3055   include the "close" connection option in every response message that
3056   does not have a 1xx (Informational) status code.
3060<section title="Content-Length" anchor="header.content-length">
3061  <iref primary="true" item="Content-Length header field" x:for-anchor=""/>
3062  <iref primary="true" item="Header Fields" subitem="Content-Length" x:for-anchor=""/>
3063  <x:anchor-alias value="Content-Length"/>
3065   The "Content-Length" header field indicates the size of the
3066   message-body, in decimal number of octets, for any message other than
3067   a response to a HEAD request or a response with a status code of 304.
3068   In the case of a response to a HEAD request, Content-Length indicates
3069   the size of the payload body (not including any potential transfer-coding)
3070   that would have been sent had the request been a GET.
3071   In the case of a 304 (Not Modified) response to a GET request,
3072   Content-Length indicates the size of the payload body (not including
3073   any potential transfer-coding) that would have been sent in a 200 (OK)
3074   response.
3076<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Content-Length"/>
3077  <x:ref>Content-Length</x:ref> = 1*<x:ref>DIGIT</x:ref>
3080   An example is
3082<figure><artwork type="example">
3083  Content-Length: 3495
3086   Implementations &SHOULD; use this field to indicate the message-body
3087   length when no transfer-coding is being applied and the
3088   payload's body length can be determined prior to being transferred.
3089   <xref target="message.body"/> describes how recipients determine the length
3090   of a message-body.
3093   Any Content-Length greater than or equal to zero is a valid value.
3096   Note that the use of this field in HTTP is significantly different from
3097   the corresponding definition in MIME, where it is an optional field
3098   used within the "message/external-body" content-type.
3102<section title="Date" anchor="">
3103  <iref primary="true" item="Date header field" x:for-anchor=""/>
3104  <iref primary="true" item="Header Fields" subitem="Date" x:for-anchor=""/>
3105  <x:anchor-alias value="Date"/>
3107   The "Date" header field represents the date and time at which
3108   the message was originated, having the same semantics as the Origination
3109   Date Field (orig-date) defined in <xref target="RFC5322" x:fmt="of" x:sec="3.6.1"/>.
3110   The field value is an HTTP-date, as described in <xref target=""/>;
3111   it &MUST; be sent in rfc1123-date format.
3113<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Date"/>
3114  <x:ref>Date</x:ref> = <x:ref>HTTP-date</x:ref>
3117   An example is
3119<figure><artwork type="example">
3120  Date: Tue, 15 Nov 1994 08:12:31 GMT
3123   Origin servers &MUST; include a Date header field in all responses,
3124   except in these cases:
3125  <list style="numbers">
3126      <t>If the response status code is 100 (Continue) or 101 (Switching
3127         Protocols), the response &MAY; include a Date header field, at
3128         the server's option.</t>
3130      <t>If the response status code conveys a server error, e.g., 500
3131         (Internal Server Error) or 503 (Service Unavailable), and it is
3132         inconvenient or impossible to generate a valid Date.</t>
3134      <t>If the server does not have a clock that can provide a
3135         reasonable approximation of the current time, its responses
3136         &MUST-NOT; include a Date header field. In this case, the rules
3137         in <xref target="clockless.origin.server.operation"/> &MUST; be followed.</t>
3138  </list>
3141   A received message that does not have a Date header field &MUST; be
3142   assigned one by the recipient if the message will be cached by that
3143   recipient.
3146   Clients can use the Date header field as well; in order to keep request
3147   messages small, they are advised not to include it when it doesn't convey
3148   any useful information (as it is usually the case for requests that do not
3149   contain a payload).
3152   The HTTP-date sent in a Date header field &SHOULD-NOT;  represent a date and
3153   time subsequent to the generation of the message. It &SHOULD; represent
3154   the best available approximation of the date and time of message
3155   generation, unless the implementation has no means of generating a
3156   reasonably accurate date and time. In theory, the date ought to
3157   represent the moment just before the payload is generated. In
3158   practice, the date can be generated at any time during the message
3159   origination without affecting its semantic value.
3162<section title="Clockless Origin Server Operation" anchor="clockless.origin.server.operation">
3164   Some origin server implementations might not have a clock available.
3165   An origin server without a clock &MUST-NOT; assign Expires or Last-Modified
3166   values to a response, unless these values were associated
3167   with the resource by a system or user with a reliable clock. It &MAY;
3168   assign an Expires value that is known, at or before server
3169   configuration time, to be in the past (this allows "pre-expiration"
3170   of responses without storing separate Expires values for each
3171   resource).
3176<section title="Host" anchor="">
3177  <iref primary="true" item="Host header field" x:for-anchor=""/>
3178  <iref primary="true" item="Header Fields" subitem="Host" x:for-anchor=""/>
3179  <x:anchor-alias value="Host"/>
3181   The "Host" header field in a request provides the host and port
3182   information from the target resource's URI, enabling the origin
3183   server to distinguish between resources while servicing requests
3184   for multiple host names on a single IP address.  Since the Host
3185   field-value is critical information for handling a request, it
3186   &SHOULD; be sent as the first header field following the Request-Line.
3188<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Host"/>
3189  <x:ref>Host</x:ref> = <x:ref>uri-host</x:ref> [ ":" <x:ref>port</x:ref> ] ; <xref target="http.uri"/>
3192   A client &MUST; send a Host header field in all HTTP/1.1 request
3193   messages.  If the target resource's URI includes an authority
3194   component, then the Host field-value &MUST; be identical to that
3195   authority component after excluding any userinfo (<xref target="http.uri"/>).
3196   If the authority component is missing or undefined for the target
3197   resource's URI, then the Host header field &MUST; be sent with an
3198   empty field-value.
3201   For example, a GET request to the origin server for
3202   &lt;; would begin with:
3204<figure><artwork type="message/http; msgtype=&#34;request&#34;" x:indent-with="  ">
3205GET /pub/WWW/ HTTP/1.1
3209   The Host header field &MUST; be sent in an HTTP/1.1 request even
3210   if the request-target is in the form of an absolute-URI, since this
3211   allows the Host information to be forwarded through ancient HTTP/1.0
3212   proxies that might not have implemented Host.
3215   When an HTTP/1.1 proxy receives a request with a request-target in
3216   the form of an absolute-URI, the proxy &MUST; ignore the received
3217   Host header field (if any) and instead replace it with the host
3218   information of the request-target.  When a proxy forwards a request,
3219   it &MUST; generate the Host header field based on the received
3220   absolute-URI rather than the received Host.
3223   Since the Host header field acts as an application-level routing
3224   mechanism, it is a frequent target for malware seeking to poison
3225   a shared cache or redirect a request to an unintended server.
3226   An interception proxy is particularly vulnerable if it relies on
3227   the Host header field value for redirecting requests to internal
3228   servers, or for use as a cache key in a shared cache, without
3229   first verifying that the intercepted connection is targeting a
3230   valid IP address for that host.
3233   A server &MUST; respond with a 400 (Bad Request) status code to
3234   any HTTP/1.1 request message that lacks a Host header field and
3235   to any request message that contains more than one Host header field
3236   or a Host header field with an invalid field-value.
3239   See Sections <xref target="" format="counter"/>
3240   and <xref target="" format="counter"/>
3241   for other requirements relating to Host.
3245<section title="TE" anchor="header.te">
3246  <iref primary="true" item="TE header field" x:for-anchor=""/>
3247  <iref primary="true" item="Header Fields" subitem="TE" x:for-anchor=""/>
3248  <x:anchor-alias value="TE"/>
3249  <x:anchor-alias value="t-codings"/>
3250  <x:anchor-alias value="te-params"/>
3251  <x:anchor-alias value="te-ext"/>
3253   The "TE" header field indicates what extension transfer-codings
3254   it is willing to accept in the response, and whether or not it is
3255   willing to accept trailer fields in a chunked transfer-coding.
3258   Its value consists of the keyword "trailers" and/or a comma-separated
3259   list of extension transfer-coding names with optional accept
3260   parameters (as described in <xref target="transfer.codings"/>).
3262<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="TE"/><iref primary="true" item="Grammar" subitem="t-codings"/><iref primary="true" item="Grammar" subitem="te-params"/><iref primary="true" item="Grammar" subitem="te-ext"/>
3263  <x:ref>TE</x:ref>        = #<x:ref>t-codings</x:ref>
3264  <x:ref>t-codings</x:ref> = "trailers" / ( <x:ref>transfer-extension</x:ref> [ <x:ref>te-params</x:ref> ] )
3265  <x:ref>te-params</x:ref> = <x:ref>OWS</x:ref> ";" <x:ref>OWS</x:ref> "q=" <x:ref>qvalue</x:ref> *( <x:ref>te-ext</x:ref> )
3266  <x:ref>te-ext</x:ref>    = <x:ref>OWS</x:ref> ";" <x:ref>OWS</x:ref> <x:ref>token</x:ref> [ "=" <x:ref>word</x:ref> ]
3269   The presence of the keyword "trailers" indicates that the client is
3270   willing to accept trailer fields in a chunked transfer-coding, as
3271   defined in <xref target="chunked.encoding"/>. This keyword is reserved for use with
3272   transfer-coding values even though it does not itself represent a
3273   transfer-coding.
3276   Examples of its use are:
3278<figure><artwork type="example">
3279  TE: deflate
3280  TE:
3281  TE: trailers, deflate;q=0.5
3284   The TE header field only applies to the immediate connection.
3285   Therefore, the keyword &MUST; be supplied within a Connection header
3286   field (<xref target="header.connection"/>) whenever TE is present in an HTTP/1.1 message.
3289   A server tests whether a transfer-coding is acceptable, according to
3290   a TE field, using these rules:
3291  <list style="numbers">
3292    <x:lt>
3293      <t>The "chunked" transfer-coding is always acceptable. If the
3294         keyword "trailers" is listed, the client indicates that it is
3295         willing to accept trailer fields in the chunked response on
3296         behalf of itself and any downstream clients. The implication is
3297         that, if given, the client is stating that either all
3298         downstream clients are willing to accept trailer fields in the
3299         forwarded response, or that it will attempt to buffer the
3300         response on behalf of downstream recipients.
3301      </t><t>
3302         <x:h>Note:</x:h> HTTP/1.1 does not define any means to limit the size of a
3303         chunked response such that a client can be assured of buffering
3304         the entire response.</t>
3305    </x:lt>
3306    <x:lt>
3307      <t>If the transfer-coding being tested is one of the transfer-codings
3308         listed in the TE field, then it is acceptable unless it
3309         is accompanied by a qvalue of 0. (As defined in <xref target="quality.values"/>, a
3310         qvalue of 0 means "not acceptable".)</t>
3311    </x:lt>
3312    <x:lt>
3313      <t>If multiple transfer-codings are acceptable, then the
3314         acceptable transfer-coding with the highest non-zero qvalue is
3315         preferred.  The "chunked" transfer-coding always has a qvalue
3316         of 1.</t>
3317    </x:lt>
3318  </list>
3321   If the TE field-value is empty or if no TE field is present, the only
3322   transfer-coding is "chunked". A message with no transfer-coding is
3323   always acceptable.
3327<section title="Trailer" anchor="header.trailer">
3328  <iref primary="true" item="Trailer header field" x:for-anchor=""/>
3329  <iref primary="true" item="Header Fields" subitem="Trailer" x:for-anchor=""/>
3330  <x:anchor-alias value="Trailer"/>
3332   The "Trailer" header field indicates that the given set of
3333   header fields is present in the trailer of a message encoded with
3334   chunked transfer-coding.
3336<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Trailer"/>
3337  <x:ref>Trailer</x:ref> = 1#<x:ref>field-name</x:ref>
3340   An HTTP/1.1 message &SHOULD; include a Trailer header field in a
3341   message using chunked transfer-coding with a non-empty trailer. Doing
3342   so allows the recipient to know which header fields to expect in the
3343   trailer.
3346   If no Trailer header field is present, the trailer &SHOULD-NOT;  include
3347   any header fields. See <xref target="chunked.encoding"/> for restrictions on the use of
3348   trailer fields in a "chunked" transfer-coding.
3351   Message header fields listed in the Trailer header field &MUST-NOT;
3352   include the following header fields:
3353  <list style="symbols">
3354    <t>Transfer-Encoding</t>
3355    <t>Content-Length</t>
3356    <t>Trailer</t>
3357  </list>
3361<section title="Transfer-Encoding" anchor="header.transfer-encoding">
3362  <iref primary="true" item="Transfer-Encoding header field" x:for-anchor=""/>
3363  <iref primary="true" item="Header Fields" subitem="Transfer-Encoding" x:for-anchor=""/>
3364  <x:anchor-alias value="Transfer-Encoding"/>
3366   The "Transfer-Encoding" header field indicates what transfer-codings
3367   (if any) have been applied to the message body. It differs from
3368   Content-Encoding (&content-codings;) in that transfer-codings are a property
3369   of the message (and therefore are removed by intermediaries), whereas
3370   content-codings are not.
3372<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Transfer-Encoding"/>
3373  <x:ref>Transfer-Encoding</x:ref> = 1#<x:ref>transfer-coding</x:ref>
3376   Transfer-codings are defined in <xref target="transfer.codings"/>. An example is:
3378<figure><artwork type="example">
3379  Transfer-Encoding: chunked
3382   If multiple encodings have been applied to a representation, the transfer-codings
3383   &MUST; be listed in the order in which they were applied.
3384   Additional information about the encoding parameters &MAY; be provided
3385   by other header fields not defined by this specification.
3388   Many older HTTP/1.0 applications do not understand the Transfer-Encoding
3389   header field.
3393<section title="Upgrade" anchor="header.upgrade">
3394  <iref primary="true" item="Upgrade header field" x:for-anchor=""/>
3395  <iref primary="true" item="Header Fields" subitem="Upgrade" x:for-anchor=""/>
3396  <x:anchor-alias value="Upgrade"/>
3398   The "Upgrade" header field allows the client to specify what
3399   additional communication protocols it would like to use, if the server
3400   chooses to switch protocols. Servers can use it to indicate what protocols
3401   they are willing to switch to.
3403<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Upgrade"/>
3404  <x:ref>Upgrade</x:ref> = 1#<x:ref>product</x:ref>
3407   For example,
3409<figure><artwork type="example">
3410  Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11
3413   The Upgrade header field is intended to provide a simple mechanism
3414   for transition from HTTP/1.1 to some other, incompatible protocol. It
3415   does so by allowing the client to advertise its desire to use another
3416   protocol, such as a later version of HTTP with a higher major version
3417   number, even though the current request has been made using HTTP/1.1.
3418   This eases the difficult transition between incompatible protocols by
3419   allowing the client to initiate a request in the more commonly
3420   supported protocol while indicating to the server that it would like
3421   to use a "better" protocol if available (where "better" is determined
3422   by the server, possibly according to the nature of the request method
3423   or target resource).
3426   The Upgrade header field only applies to switching application-layer
3427   protocols upon the existing transport-layer connection. Upgrade
3428   cannot be used to insist on a protocol change; its acceptance and use
3429   by the server is optional. The capabilities and nature of the
3430   application-layer communication after the protocol change is entirely
3431   dependent upon the new protocol chosen, although the first action
3432   after changing the protocol &MUST; be a response to the initial HTTP
3433   request containing the Upgrade header field.
3436   The Upgrade header field only applies to the immediate connection.
3437   Therefore, the upgrade keyword &MUST; be supplied within a Connection
3438   header field (<xref target="header.connection"/>) whenever Upgrade is present in an
3439   HTTP/1.1 message.
3442   The Upgrade header field cannot be used to indicate a switch to a
3443   protocol on a different connection. For that purpose, it is more
3444   appropriate to use a 3xx redirection response (&status-3xx;).
3447   Servers &MUST; include the "Upgrade" header field in 101 (Switching
3448   Protocols) responses to indicate which protocol(s) are being switched to,
3449   and &MUST; include it in 426 (Upgrade Required) responses to indicate
3450   acceptable protocols to upgrade to. Servers &MAY; include it in any other
3451   response to indicate that they are willing to upgrade to one of the
3452   specified protocols.
3455   This specification only defines the protocol name "HTTP" for use by
3456   the family of Hypertext Transfer Protocols, as defined by the HTTP
3457   version rules of <xref target="http.version"/> and future updates to this
3458   specification. Additional tokens can be registered with IANA using the
3459   registration procedure defined below. 
3462<section title="Upgrade Token Registry" anchor="upgrade.token.registry">
3464   The HTTP Upgrade Token Registry defines the name space for product
3465   tokens used to identify protocols in the Upgrade header field.
3466   Each registered token is associated with contact information and
3467   an optional set of specifications that details how the connection
3468   will be processed after it has been upgraded.
3471   Registrations are allowed on a First Come First Served basis as
3472   described in <xref target="RFC5226" x:sec="4.1" x:fmt="of"/>. The
3473   specifications need not be IETF documents or be subject to IESG review.
3474   Registrations are subject to the following rules:
3475  <list style="numbers">
3476    <t>A token, once registered, stays registered forever.</t>
3477    <t>The registration &MUST; name a responsible party for the
3478       registration.</t>
3479    <t>The registration &MUST; name a point of contact.</t>
3480    <t>The registration &MAY; name a set of specifications associated with that
3481       token. Such specifications need not be publicly available.</t>
3482    <t>The responsible party &MAY; change the registration at any time.
3483       The IANA will keep a record of all such changes, and make them
3484       available upon request.</t>
3485    <t>The responsible party for the first registration of a "product"
3486       token &MUST; approve later registrations of a "version" token
3487       together with that "product" token before they can be registered.</t>
3488    <t>If absolutely required, the IESG &MAY; reassign the responsibility
3489       for a token. This will normally only be used in the case when a
3490       responsible party cannot be contacted.</t>
3491  </list>
3498<section title="Via" anchor="header.via">
3499  <iref primary="true" item="Via header field" x:for-anchor=""/>
3500  <iref primary="true" item="Header Fields" subitem="Via" x:for-anchor=""/>
3501  <x:anchor-alias value="protocol-name"/>
3502  <x:anchor-alias value="protocol-version"/>
3503  <x:anchor-alias value="pseudonym"/>
3504  <x:anchor-alias value="received-by"/>
3505  <x:anchor-alias value="received-protocol"/>
3506  <x:anchor-alias value="Via"/>
3508   The "Via" header field &MUST; be sent by a proxy or gateway to
3509   indicate the intermediate protocols and recipients between the user
3510   agent and the server on requests, and between the origin server and
3511   the client on responses. It is analogous to the "Received" field
3512   used by email systems (<xref target="RFC5322" x:fmt="of" x:sec="3.6.7"/>)
3513   and is intended to be used for tracking message forwards,
3514   avoiding request loops, and identifying the protocol capabilities of
3515   all senders along the request/response chain.
3517<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Via"/><iref primary="true" item="Grammar" subitem="received-protocol"/><iref primary="true" item="Grammar" subitem="protocol-name"/><iref primary="true" item="Grammar" subitem="protocol-version"/><iref primary="true" item="Grammar" subitem="received-by"/><iref primary="true" item="Grammar" subitem="pseudonym"/>
3518  <x:ref>Via</x:ref>               = 1#( <x:ref>received-protocol</x:ref> <x:ref>RWS</x:ref> <x:ref>received-by</x:ref>
3519                          [ <x:ref>RWS</x:ref> <x:ref>comment</x:ref> ] )
3520  <x:ref>received-protocol</x:ref> = [ <x:ref>protocol-name</x:ref> "/" ] <x:ref>protocol-version</x:ref>
3521  <x:ref>protocol-name</x:ref>     = <x:ref>token</x:ref>
3522  <x:ref>protocol-version</x:ref>  = <x:ref>token</x:ref>
3523  <x:ref>received-by</x:ref>       = ( <x:ref>uri-host</x:ref> [ ":" <x:ref>port</x:ref> ] ) / <x:ref>pseudonym</x:ref>
3524  <x:ref>pseudonym</x:ref>         = <x:ref>token</x:ref>
3527   The received-protocol indicates the protocol version of the message
3528   received by the server or client along each segment of the
3529   request/response chain. The received-protocol version is appended to
3530   the Via field value when the message is forwarded so that information
3531   about the protocol capabilities of upstream applications remains
3532   visible to all recipients.
3535   The protocol-name is excluded if and only if it would be "HTTP". The
3536   received-by field is normally the host and optional port number of a
3537   recipient server or client that subsequently forwarded the message.
3538   However, if the real host is considered to be sensitive information,
3539   it &MAY; be replaced by a pseudonym. If the port is not given, it &MAY;
3540   be assumed to be the default port of the received-protocol.
3543   Multiple Via field values represent each proxy or gateway that has
3544   forwarded the message. Each recipient &MUST; append its information
3545   such that the end result is ordered according to the sequence of
3546   forwarding applications.
3549   Comments &MAY; be used in the Via header field to identify the software
3550   of each recipient, analogous to the User-Agent and Server header fields.
3551   However, all comments in the Via field are optional and &MAY; be removed
3552   by any recipient prior to forwarding the message.
3555   For example, a request message could be sent from an HTTP/1.0 user
3556   agent to an internal proxy code-named "fred", which uses HTTP/1.1 to
3557   forward the request to a public proxy at, which completes
3558   the request by forwarding it to the origin server at
3559   The request received by would then have the following
3560   Via header field:
3562<figure><artwork type="example">
3563  Via: 1.0 fred, 1.1 (Apache/1.1)
3566   A proxy or gateway used as a portal through a network firewall
3567   &SHOULD-NOT; forward the names and ports of hosts within the firewall
3568   region unless it is explicitly enabled to do so. If not enabled, the
3569   received-by host of any host behind the firewall &SHOULD; be replaced
3570   by an appropriate pseudonym for that host.
3573   For organizations that have strong privacy requirements for hiding
3574   internal structures, a proxy or gateway &MAY; combine an ordered
3575   subsequence of Via header field entries with identical received-protocol
3576   values into a single such entry. For example,
3578<figure><artwork type="example">
3579  Via: 1.0 ricky, 1.1 ethel, 1.1 fred, 1.0 lucy
3582  could be collapsed to
3584<figure><artwork type="example">
3585  Via: 1.0 ricky, 1.1 mertz, 1.0 lucy
3588   Senders &SHOULD-NOT; combine multiple entries unless they are all
3589   under the same organizational control and the hosts have already been
3590   replaced by pseudonyms. Senders &MUST-NOT; combine entries which
3591   have different received-protocol values.
3597<section title="IANA Considerations" anchor="IANA.considerations">
3599<section title="Header Field Registration" anchor="header.field.registration">
3601   The Message Header Field Registry located at <eref target=""/> shall be updated
3602   with the permanent registrations below (see <xref target="RFC3864"/>):
3604<?BEGININC p1-messaging.iana-headers ?>
3605<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
3606<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
3607   <ttcol>Header Field Name</ttcol>
3608   <ttcol>Protocol</ttcol>
3609   <ttcol>Status</ttcol>
3610   <ttcol>Reference</ttcol>
3612   <c>Connection</c>
3613   <c>http</c>
3614   <c>standard</c>
3615   <c>
3616      <xref target="header.connection"/>
3617   </c>
3618   <c>Content-Length</c>
3619   <c>http</c>
3620   <c>standard</c>
3621   <c>
3622      <xref target="header.content-length"/>
3623   </c>
3624   <c>Date</c>
3625   <c>http</c>
3626   <c>standard</c>
3627   <c>
3628      <xref target=""/>
3629   </c>
3630   <c>Host</c>
3631   <c>http</c>
3632   <c>standard</c>
3633   <c>
3634      <xref target=""/>
3635   </c>
3636   <c>TE</c>
3637   <c>http</c>
3638   <c>standard</c>
3639   <c>
3640      <xref target="header.te"/>
3641   </c>
3642   <c>Trailer</c>
3643   <c>http</c>
3644   <c>standard</c>
3645   <c>
3646      <xref target="header.trailer"/>
3647   </c>
3648   <c>Transfer-Encoding</c>
3649   <c>http</c>
3650   <c>standard</c>
3651   <c>
3652      <xref target="header.transfer-encoding"/>
3653   </c>
3654   <c>Upgrade</c>
3655   <c>http</c>
3656   <c>standard</c>
3657   <c>
3658      <xref target="header.upgrade"/>
3659   </c>
3660   <c>Via</c>
3661   <c>http</c>
3662   <c>standard</c>
3663   <c>
3664      <xref target="header.via"/>
3665   </c>
3668<?ENDINC p1-messaging.iana-headers ?>
3670   The change controller is: "IETF ( - Internet Engineering Task Force".
3674<section title="URI Scheme Registration" anchor="uri.scheme.registration">
3676   The entries for the "http" and "https" URI Schemes in the registry located at
3677   <eref target=""/>
3678   shall be updated to point to Sections <xref target="http.uri" format="counter"/>
3679   and <xref target="https.uri" format="counter"/> of this document
3680   (see <xref target="RFC4395"/>).
3684<section title="Internet Media Type Registrations" anchor="">
3686   This document serves as the specification for the Internet media types
3687   "message/http" and "application/http". The following is to be registered with
3688   IANA (see <xref target="RFC4288"/>).
3690<section title="Internet Media Type message/http" anchor="">
3691<iref item="Media Type" subitem="message/http" primary="true"/>
3692<iref item="message/http Media Type" primary="true"/>
3694   The message/http type can be used to enclose a single HTTP request or
3695   response message, provided that it obeys the MIME restrictions for all
3696   "message" types regarding line length and encodings.
3699  <list style="hanging" x:indent="12em">
3700    <t hangText="Type name:">
3701      message
3702    </t>
3703    <t hangText="Subtype name:">
3704      http
3705    </t>
3706    <t hangText="Required parameters:">
3707      none
3708    </t>
3709    <t hangText="Optional parameters:">
3710      version, msgtype
3711      <list style="hanging">
3712        <t hangText="version:">
3713          The HTTP-Version number of the enclosed message
3714          (e.g., "1.1"). If not present, the version can be
3715          determined from the first line of the body.
3716        </t>
3717        <t hangText="msgtype:">
3718          The message type &mdash; "request" or "response". If not
3719          present, the type can be determined from the first
3720          line of the body.
3721        </t>
3722      </list>
3723    </t>
3724    <t hangText="Encoding considerations:">
3725      only "7bit", "8bit", or "binary" are permitted
3726    </t>
3727    <t hangText="Security considerations:">
3728      none
3729    </t>
3730    <t hangText="Interoperability considerations:">
3731      none
3732    </t>
3733    <t hangText="Published specification:">
3734      This specification (see <xref target=""/>).
3735    </t>
3736    <t hangText="Applications that use this media type:">
3737    </t>
3738    <t hangText="Additional information:">
3739      <list style="hanging">
3740        <t hangText="Magic number(s):">none</t>
3741        <t hangText="File extension(s):">none</t>
3742        <t hangText="Macintosh file type code(s):">none</t>
3743      </list>
3744    </t>
3745    <t hangText="Person and email address to contact for further information:">
3746      See Authors Section.
3747    </t>
3748    <t hangText="Intended usage:">
3749      COMMON
3750    </t>
3751    <t hangText="Restrictions on usage:">
3752      none
3753    </t>
3754    <t hangText="Author/Change controller:">
3755      IESG
3756    </t>
3757  </list>
3760<section title="Internet Media Type application/http" anchor="">
3761<iref item="Media Type" subitem="application/http" primary="true"/>
3762<iref item="application/http Media Type" primary="true"/>
3764   The application/http type can be used to enclose a pipeline of one or more
3765   HTTP request or response messages (not intermixed).
3768  <list style="hanging" x:indent="12em">
3769    <t hangText="Type name:">
3770      application
3771    </t>
3772    <t hangText="Subtype name:">
3773      http
3774    </t>
3775    <t hangText="Required parameters:">
3776      none
3777    </t>
3778    <t hangText="Optional parameters:">
3779      version, msgtype
3780      <list style="hanging">
3781        <t hangText="version:">
3782          The HTTP-Version number of the enclosed messages
3783          (e.g., "1.1"). If not present, the version can be
3784          determined from the first line of the body.
3785        </t>
3786        <t hangText="msgtype:">
3787          The message type &mdash; "request" or "response". If not
3788          present, the type can be determined from the first
3789          line of the body.
3790        </t>
3791      </list>
3792    </t>
3793    <t hangText="Encoding considerations:">
3794      HTTP messages enclosed by this type
3795      are in "binary" format; use of an appropriate
3796      Content-Transfer-Encoding is required when
3797      transmitted via E-mail.
3798    </t>
3799    <t hangText="Security considerations:">
3800      none
3801    </t>
3802    <t hangText="Interoperability considerations:">
3803      none
3804    </t>
3805    <t hangText="Published specification:">
3806      This specification (see <xref target=""/>).
3807    </t>
3808    <t hangText="Applications that use this media type:">
3809    </t>
3810    <t hangText="Additional information:">
3811      <list style="hanging">
3812        <t hangText="Magic number(s):">none</t>
3813        <t hangText="File extension(s):">none</t>
3814        <t hangText="Macintosh file type code(s):">none</t>
3815      </list>
3816    </t>
3817    <t hangText="Person and email address to contact for further information:">
3818      See Authors Section.
3819    </t>
3820    <t hangText="Intended usage:">
3821      COMMON
3822    </t>
3823    <t hangText="Restrictions on usage:">
3824      none
3825    </t>
3826    <t hangText="Author/Change controller:">
3827      IESG
3828    </t>
3829  </list>
3834<section title="Transfer Coding Registry" anchor="transfer.coding.registration">
3836   The registration procedure for HTTP Transfer Codings is now defined by
3837   <xref target="transfer.coding.registry"/> of this document.
3840   The HTTP Transfer Codings Registry located at <eref target=""/>
3841   shall be updated with the registrations below:
3843<texttable align="left" suppress-title="true" anchor="iana.transfer.coding.registration.table">
3844   <ttcol>Name</ttcol>
3845   <ttcol>Description</ttcol>
3846   <ttcol>Reference</ttcol>
3847   <c>chunked</c>
3848   <c>Transfer in a series of chunks</c>
3849   <c>
3850      <xref target="chunked.encoding"/>
3851   </c>
3852   <c>compress</c>
3853   <c>UNIX "compress" program method</c>
3854   <c>
3855      <xref target="compress.coding"/>
3856   </c>
3857   <c>deflate</c>
3858   <c>"deflate" compression mechanism (<xref target="RFC1951"/>) used inside
3859   the "zlib" data format (<xref target="RFC1950"/>)
3860   </c>
3861   <c>
3862      <xref target="deflate.coding"/>
3863   </c>
3864   <c>gzip</c>
3865   <c>Same as GNU zip <xref target="RFC1952"/></c>
3866   <c>
3867      <xref target="gzip.coding"/>
3868   </c>
3872<section title="Upgrade Token Registration" anchor="upgrade.token.registration">
3874   The registration procedure for HTTP Upgrade Tokens &mdash; previously defined
3875   in <xref target="RFC2817" x:fmt="of" x:sec="7.2"/> &mdash; is now defined
3876   by <xref target="upgrade.token.registry"/> of this document.
3879   The HTTP Status Code Registry located at <eref target=""/>
3880   shall be updated with the registration below:
3882<texttable align="left" suppress-title="true">
3883   <ttcol>Value</ttcol>
3884   <ttcol>Description</ttcol>
3885   <ttcol>Reference</ttcol>
3887   <c>HTTP</c>
3888   <c>Hypertext Transfer Protocol</c>
3889   <c><xref target="http.version"/> of this specification</c>
3890<!-- IANA should add this without our instructions; emailed on June 05, 2009
3891   <c>TLS/1.0</c>
3892   <c>Transport Layer Security</c>
3893   <c><xref target="RFC2817"/></c> -->
3900<section title="Security Considerations" anchor="security.considerations">
3902   This section is meant to inform application developers, information
3903   providers, and users of the security limitations in HTTP/1.1 as
3904   described by this document. The discussion does not include
3905   definitive solutions to the problems revealed, though it does make
3906   some suggestions for reducing security risks.
3909<section title="Personal Information" anchor="personal.information">
3911   HTTP clients are often privy to large amounts of personal information
3912   (e.g., the user's name, location, mail address, passwords, encryption
3913   keys, etc.), and &SHOULD; be very careful to prevent unintentional
3914   leakage of this information.
3915   We very strongly recommend that a convenient interface be provided
3916   for the user to control dissemination of such information, and that
3917   designers and implementors be particularly careful in this area.
3918   History shows that errors in this area often create serious security
3919   and/or privacy problems and generate highly adverse publicity for the
3920   implementor's company.
3924<section title="Abuse of Server Log Information" anchor="abuse.of.server.log.information">
3926   A server is in the position to save personal data about a user's
3927   requests which might identify their reading patterns or subjects of
3928   interest. This information is clearly confidential in nature and its
3929   handling can be constrained by law in certain countries. People using
3930   HTTP to provide data are responsible for ensuring that
3931   such material is not distributed without the permission of any
3932   individuals that are identifiable by the published results.
3936<section title="Attacks Based On File and Path Names" anchor="attack.pathname">
3938   Implementations of HTTP origin servers &SHOULD; be careful to restrict
3939   the documents returned by HTTP requests to be only those that were
3940   intended by the server administrators. If an HTTP server translates
3941   HTTP URIs directly into file system calls, the server &MUST; take
3942   special care not to serve files that were not intended to be
3943   delivered to HTTP clients. For example, UNIX, Microsoft Windows, and
3944   other operating systems use ".." as a path component to indicate a
3945   directory level above the current one. On such a system, an HTTP
3946   server &MUST; disallow any such construct in the request-target if it
3947   would otherwise allow access to a resource outside those intended to
3948   be accessible via the HTTP server. Similarly, files intended for
3949   reference only internally to the server (such as access control
3950   files, configuration files, and script code) &MUST; be protected from
3951   inappropriate retrieval, since they might contain sensitive
3952   information. Experience has shown that minor bugs in such HTTP server
3953   implementations have turned into security risks.
3957<section title="DNS Spoofing" anchor="dns.spoofing">
3959   Clients using HTTP rely heavily on the Domain Name Service, and are
3960   thus generally prone to security attacks based on the deliberate
3961   mis-association of IP addresses and DNS names. Clients need to be
3962   cautious in assuming the continuing validity of an IP number/DNS name
3963   association.
3966   In particular, HTTP clients &SHOULD; rely on their name resolver for
3967   confirmation of an IP number/DNS name association, rather than
3968   caching the result of previous host name lookups. Many platforms
3969   already can cache host name lookups locally when appropriate, and
3970   they &SHOULD; be configured to do so. It is proper for these lookups to
3971   be cached, however, only when the TTL (Time To Live) information
3972   reported by the name server makes it likely that the cached
3973   information will remain useful.
3976   If HTTP clients cache the results of host name lookups in order to
3977   achieve a performance improvement, they &MUST; observe the TTL
3978   information reported by DNS.
3981   If HTTP clients do not observe this rule, they could be spoofed when
3982   a previously-accessed server's IP address changes. As network
3983   renumbering is expected to become increasingly common <xref target="RFC1900"/>, the
3984   possibility of this form of attack will grow. Observing this
3985   requirement thus reduces this potential security vulnerability.
3988   This requirement also improves the load-balancing behavior of clients
3989   for replicated servers using the same DNS name and reduces the
3990   likelihood of a user's experiencing failure in accessing sites which
3991   use that strategy.
3995<section title="Proxies and Caching" anchor="attack.proxies">
3997   By their very nature, HTTP proxies are men-in-the-middle, and
3998   represent an opportunity for man-in-the-middle attacks. Compromise of
3999   the systems on which the proxies run can result in serious security
4000   and privacy problems. Proxies have access to security-related
4001   information, personal information about individual users and
4002   organizations, and proprietary information belonging to users and
4003   content providers. A compromised proxy, or a proxy implemented or
4004   configured without regard to security and privacy considerations,
4005   might be used in the commission of a wide range of potential attacks.
4008   Proxy operators need to protect the systems on which proxies run as
4009   they would protect any system that contains or transports sensitive
4010   information. In particular, log information gathered at proxies often
4011   contains highly sensitive personal information, and/or information
4012   about organizations. Log information needs to be carefully guarded, and
4013   appropriate guidelines for use need to be developed and followed.
4014   (<xref target="abuse.of.server.log.information"/>).
4017   Proxy implementors need to consider the privacy and security
4018   implications of their design and coding decisions, and of the
4019   configuration options they provide to proxy operators (especially the
4020   default configuration).
4023   Users of a proxy need to be aware that proxies are no trustworthier than
4024   the people who run them; HTTP itself cannot solve this problem.
4027   The judicious use of cryptography, when appropriate, might suffice to
4028   protect against a broad range of security and privacy attacks. Such
4029   cryptography is beyond the scope of the HTTP/1.1 specification.
4033<section title="Denial of Service Attacks on Proxies" anchor="attack.DoS">
4035   They exist. They are hard to defend against. Research continues.
4036   Beware.
4041<section title="Acknowledgments" anchor="ack">
4043   HTTP has evolved considerably over the years. It has
4044   benefited from a large and active developer community &mdash; the many
4045   people who have participated on the www-talk mailing list &mdash; and it is
4046   that community which has been most responsible for the success of
4047   HTTP and of the World-Wide Web in general. Marc Andreessen, Robert
4048   Cailliau, Daniel W. Connolly, Bob Denny, John Franks, Jean-Francois
4049   Groff, Phillip M. Hallam-Baker, Hakon W. Lie, Ari Luotonen, Rob
4050   McCool, Lou Montulli, Dave Raggett, Tony Sanders, and Marc
4051   VanHeyningen deserve special recognition for their efforts in
4052   defining early aspects of the protocol.
4055   This document has benefited greatly from the comments of all those
4056   participating in the HTTP-WG. In addition to those already mentioned,
4057   the following individuals have contributed to this specification:
4060   Gary Adams, Harald Tveit Alvestrand, Keith Ball, Brian Behlendorf,
4061   Paul Burchard, Maurizio Codogno, Josh Cohen, Mike Cowlishaw, Roman Czyborra,
4062   Michael A. Dolan, Daniel DuBois, David J. Fiander, Alan Freier, Marc Hedlund, Greg Herlihy,
4063   Koen Holtman, Alex Hopmann, Bob Jernigan, Shel Kaphan, Rohit Khare,
4064   John Klensin, Martijn Koster, Alexei Kosut, David M. Kristol,
4065   Daniel LaLiberte, Ben Laurie, Paul J. Leach, Albert Lunde,
4066   John C. Mallery, Jean-Philippe Martin-Flatin, Mitra, David Morris,
4067   Gavin Nicol, Ross Patterson, Bill Perry, Jeffrey Perry, Scott Powers, Owen Rees,
4068   Luigi Rizzo, David Robinson, Marc Salomon, Rich Salz,
4069   Allan M. Schiffman, Jim Seidman, Chuck Shotton, Eric W. Sink,
4070   Simon E. Spero, Richard N. Taylor, Robert S. Thau,
4071   Bill (BearHeart) Weinman, Francois Yergeau, Mary Ellen Zurko.
4074   Thanks to the "cave men" of Palo Alto. You know who you are.
4077   Jim Gettys (the editor of <xref target="RFC2616"/>) wishes particularly
4078   to thank Roy Fielding, the editor of <xref target="RFC2068"/>, along
4079   with John Klensin, Jeff Mogul, Paul Leach, Dave Kristol, Koen
4080   Holtman, John Franks, Josh Cohen, Alex Hopmann, Scott Lawrence, and
4081   Larry Masinter for their help. And thanks go particularly to Jeff
4082   Mogul and Scott Lawrence for performing the "MUST/MAY/SHOULD" audit.
4085   The Apache Group, Anselm Baird-Smith, author of Jigsaw, and Henrik
4086   Frystyk implemented RFC 2068 early, and we wish to thank them for the
4087   discovery of many of the problems that this document attempts to
4088   rectify.
4091   This specification makes heavy use of the augmented BNF and generic
4092   constructs defined by David H. Crocker for <xref target="RFC5234"/>. Similarly, it
4093   reuses many of the definitions provided by Nathaniel Borenstein and
4094   Ned Freed for MIME <xref target="RFC2045"/>. We hope that their inclusion in this
4095   specification will help reduce past confusion over the relationship
4096   between HTTP and Internet mail message formats.
4100Acknowledgements TODO list
4102- Jeff Hodges ("effective request URI")
4110<references title="Normative References">
4112<reference anchor="ISO-8859-1">
4113  <front>
4114    <title>
4115     Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1
4116    </title>
4117    <author>
4118      <organization>International Organization for Standardization</organization>
4119    </author>
4120    <date year="1998"/>
4121  </front>
4122  <seriesInfo name="ISO/IEC" value="8859-1:1998"/>
4125<reference anchor="Part2">
4126  <front>
4127    <title abbrev="HTTP/1.1">HTTP/1.1, part 2: Message Semantics</title>
4128    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
4129      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
4130      <address><email></email></address>
4131    </author>
4132    <author initials="J." surname="Gettys" fullname="Jim Gettys">
4133      <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
4134      <address><email></email></address>
4135    </author>
4136    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
4137      <organization abbrev="HP">Hewlett-Packard Company</organization>
4138      <address><email></email></address>
4139    </author>
4140    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
4141      <organization abbrev="Microsoft">Microsoft Corporation</organization>
4142      <address><email></email></address>
4143    </author>
4144    <author initials="L." surname="Masinter" fullname="Larry Masinter">
4145      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
4146      <address><email></email></address>
4147    </author>
4148    <author initials="P." surname="Leach" fullname="Paul J. Leach">
4149      <organization abbrev="Microsoft">Microsoft Corporation</organization>
4150      <address><email></email></address>
4151    </author>
4152    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
4153      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
4154      <address><email></email></address>
4155    </author>
4156    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
4157      <organization abbrev="W3C">World Wide Web Consortium</organization>
4158      <address><email></email></address>
4159    </author>
4160    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
4161      <organization abbrev="greenbytes">greenbytes GmbH</organization>
4162      <address><email></email></address>
4163    </author>
4164    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
4165  </front>
4166  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-&ID-VERSION;"/>
4167  <x:source href="p2-semantics.xml" basename="p2-semantics"/>
4170<reference anchor="Part3">
4171  <front>
4172    <title abbrev="HTTP/1.1">HTTP/1.1, part 3: Message Payload and Content Negotiation</title>
4173    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
4174      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
4175      <address><email></email></address>
4176    </author>
4177    <author initials="J." surname="Gettys" fullname="Jim Gettys">
4178      <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
4179      <address><email></email></address>
4180    </author>
4181    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
4182      <organization abbrev="HP">Hewlett-Packard Company</organization>
4183      <address><email></email></address>
4184    </author>
4185    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
4186      <organization abbrev="Microsoft">Microsoft Corporation</organization>
4187      <address><email></email></address>
4188    </author>
4189    <author initials="L." surname="Masinter" fullname="Larry Masinter">
4190      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
4191      <address><email></email></address>
4192    </author>
4193    <author initials="P." surname="Leach" fullname="Paul J. Leach">
4194      <organization abbrev="Microsoft">Microsoft Corporation</organization>
4195      <address><email></email></address>
4196    </author>
4197    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
4198      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
4199      <address><email></email></address>
4200    </author>
4201    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
4202      <organization abbrev="W3C">World Wide Web Consortium</organization>
4203      <address><email></email></address>
4204    </author>
4205    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
4206      <organization abbrev="greenbytes">greenbytes GmbH</organization>
4207      <address><email></email></address>
4208    </author>
4209    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
4210  </front>
4211  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p3-payload-&ID-VERSION;"/>
4212  <x:source href="p3-payload.xml" basename="p3-payload"/>
4215<reference anchor="Part6">
4216  <front>
4217    <title abbrev="HTTP/1.1">HTTP/1.1, part 6: Caching</title>
4218    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
4219      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
4220      <address><email></email></address>
4221    </author>
4222    <author initials="J." surname="Gettys" fullname="Jim Gettys">
4223      <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
4224      <address><email></email></address>
4225    </author>
4226    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
4227      <organization abbrev="HP">Hewlett-Packard Company</organization>
4228      <address><email></email></address>
4229    </author>
4230    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
4231      <organization abbrev="Microsoft">Microsoft Corporation</organization>
4232      <address><email></email></address>
4233    </author>
4234    <author initials="L." surname="Masinter" fullname="Larry Masinter">
4235      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
4236      <address><email></email></address>
4237    </author>
4238    <author initials="P." surname="Leach" fullname="Paul J. Leach">
4239      <organization abbrev="Microsoft">Microsoft Corporation</organization>
4240      <address><email></email></address>
4241    </author>
4242    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
4243      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
4244      <address><email></email></address>
4245    </author>
4246    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
4247      <organization abbrev="W3C">World Wide Web Consortium</organization>
4248      <address><email></email></address>
4249    </author>
4250    <author initials="M." surname="Nottingham" fullname="Mark Nottingham" role="editor">
4251      <address><email></email></address>
4252    </author>
4253    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
4254      <organization abbrev="greenbytes">greenbytes GmbH</organization>
4255      <address><email></email></address>
4256    </author>
4257    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
4258  </front>
4259  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-&ID-VERSION;"/>
4260  <x:source href="p6-cache.xml" basename="p6-cache"/>
4263<reference anchor="RFC5234">
4264  <front>
4265    <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
4266    <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
4267      <organization>Brandenburg InternetWorking</organization>
4268      <address>
4269        <email></email>
4270      </address> 
4271    </author>
4272    <author initials="P." surname="Overell" fullname="Paul Overell">
4273      <organization>THUS plc.</organization>
4274      <address>
4275        <email></email>
4276      </address>
4277    </author>
4278    <date month="January" year="2008"/>
4279  </front>
4280  <seriesInfo name="STD" value="68"/>
4281  <seriesInfo name="RFC" value="5234"/>
4284<reference anchor="RFC2119">
4285  <front>
4286    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
4287    <author initials="S." surname="Bradner" fullname="Scott Bradner">
4288      <organization>Harvard University</organization>
4289      <address><email></email></address>
4290    </author>
4291    <date month="March" year="1997"/>
4292  </front>
4293  <seriesInfo name="BCP" value="14"/>
4294  <seriesInfo name="RFC" value="2119"/>
4297<reference anchor="RFC3986">
4298 <front>
4299  <title abbrev='URI Generic Syntax'>Uniform Resource Identifier (URI): Generic Syntax</title>
4300  <author initials='T.' surname='Berners-Lee' fullname='Tim Berners-Lee'>
4301    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
4302    <address>
4303       <email></email>
4304       <uri></uri>
4305    </address>
4306  </author>
4307  <author initials='R.' surname='Fielding' fullname='Roy T. Fielding'>
4308    <organization abbrev="Day Software">Day Software</organization>
4309    <address>
4310      <email></email>
4311      <uri></uri>
4312    </address>
4313  </author>
4314  <author initials='L.' surname='Masinter' fullname='Larry Masinter'>
4315    <organization abbrev="Adobe Systems">Adobe Systems Incorporated</organization>
4316    <address>
4317      <email></email>
4318      <uri></uri>
4319    </address>
4320  </author>
4321  <date month='January' year='2005'></date>
4322 </front>
4323 <seriesInfo name="STD" value="66"/>
4324 <seriesInfo name="RFC" value="3986"/>
4327<reference anchor="USASCII">
4328  <front>
4329    <title>Coded Character Set -- 7-bit American Standard Code for Information Interchange</title>
4330    <author>
4331      <organization>American National Standards Institute</organization>
4332    </author>
4333    <date year="1986"/>
4334  </front>
4335  <seriesInfo name="ANSI" value="X3.4"/>
4338<reference anchor="RFC1950">
4339  <front>
4340    <title>ZLIB Compressed Data Format Specification version 3.3</title>
4341    <author initials="L.P." surname="Deutsch" fullname="L. Peter Deutsch">
4342      <organization>Aladdin Enterprises</organization>
4343      <address><email></email></address>
4344    </author>
4345    <author initials="J-L." surname="Gailly" fullname="Jean-Loup Gailly"/>
4346    <date month="May" year="1996"/>
4347  </front>
4348  <seriesInfo name="RFC" value="1950"/>
4349  <annotation>
4350    RFC 1950 is an Informational RFC, thus it might be less stable than
4351    this specification. On the other hand, this downward reference was
4352    present since the publication of RFC 2068 in 1997 (<xref target="RFC2068"/>),
4353    therefore it is unlikely to cause problems in practice. See also
4354    <xref target="BCP97"/>.
4355  </annotation>
4358<reference anchor="RFC1951">
4359  <front>
4360    <title>DEFLATE Compressed Data Format Specification version 1.3</title>
4361    <author initials="P." surname="Deutsch" fullname="L. Peter Deutsch">
4362      <organization>Aladdin Enterprises</organization>
4363      <address><email></email></address>
4364    </author>
4365    <date month="May" year="1996"/>
4366  </front>
4367  <seriesInfo name="RFC" value="1951"/>
4368  <annotation>
4369    RFC 1951 is an Informational RFC, thus it might be less stable than
4370    this specification. On the other hand, this downward reference was
4371    present since the publication of RFC 2068 in 1997 (<xref target="RFC2068"/>),
4372    therefore it is unlikely to cause problems in practice. See also
4373    <xref target="BCP97"/>.
4374  </annotation>
4377<reference anchor="RFC1952">
4378  <front>
4379    <title>GZIP file format specification version 4.3</title>
4380    <author initials="P." surname="Deutsch" fullname="L. Peter Deutsch">
4381      <organization>Aladdin Enterprises</organization>
4382      <address><email></email></address>
4383    </author>
4384    <author initials="J-L." surname="Gailly" fullname="Jean-Loup Gailly">
4385      <address><email></email></address>
4386    </author>
4387    <author initials="M." surname="Adler" fullname="Mark Adler">
4388      <address><email></email></address>
4389    </author>
4390    <author initials="L.P." surname="Deutsch" fullname="L. Peter Deutsch">
4391      <address><email></email></address>
4392    </author>
4393    <author initials="G." surname="Randers-Pehrson" fullname="Glenn Randers-Pehrson">
4394      <address><email></email></address>
4395    </author>
4396    <date month="May" year="1996"/>
4397  </front>
4398  <seriesInfo name="RFC" value="1952"/>
4399  <annotation>
4400    RFC 1952 is an Informational RFC, thus it might be less stable than
4401    this specification. On the other hand, this downward reference was
4402    present since the publication of RFC 2068 in 1997 (<xref target="RFC2068"/>),
4403    therefore it is unlikely to cause problems in practice. See also
4404    <xref target="BCP97"/>.
4405  </annotation>
4410<references title="Informative References">
4412<reference anchor="Nie1997" target="">
4413  <front>
4414    <title>Network Performance Effects of HTTP/1.1, CSS1, and PNG</title>
4415    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen"/>
4416    <author initials="J." surname="Gettys" fullname="J. Gettys"/>
4417    <author initials="E." surname="Prud'hommeaux" fullname="E. Prud'hommeaux"/>
4418    <author initials="H." surname="Lie" fullname="H. Lie"/>
4419    <author initials="C." surname="Lilley" fullname="C. Lilley"/>
4420    <date year="1997" month="September"/>
4421  </front>
4422  <seriesInfo name="ACM" value="Proceedings of the ACM SIGCOMM '97 conference on Applications, technologies, architectures, and protocols for computer communication SIGCOMM '97"/>
4425<reference anchor="Pad1995" target="">
4426  <front>
4427    <title>Improving HTTP Latency</title>
4428    <author initials="V.N." surname="Padmanabhan" fullname="Venkata N. Padmanabhan"/>
4429    <author initials="J.C." surname="Mogul" fullname="Jeffrey C. Mogul"/>
4430    <date year="1995" month="December"/>
4431  </front>
4432  <seriesInfo name="Computer Networks and ISDN Systems" value="v. 28, pp. 25-35"/>
4435<reference anchor="RFC1123">
4436  <front>
4437    <title>Requirements for Internet Hosts - Application and Support</title>
4438    <author initials="R." surname="Braden" fullname="Robert Braden">
4439      <organization>University of Southern California (USC), Information Sciences Institute</organization>
4440      <address><email>Braden@ISI.EDU</email></address>
4441    </author>
4442    <date month="October" year="1989"/>
4443  </front>
4444  <seriesInfo name="STD" value="3"/>
4445  <seriesInfo name="RFC" value="1123"/>
4448<reference anchor="RFC1900">
4449  <front>
4450    <title>Renumbering Needs Work</title>
4451    <author initials="B." surname="Carpenter" fullname="Brian E. Carpenter">
4452      <organization>CERN, Computing and Networks Division</organization>
4453      <address><email></email></address>
4454    </author>
4455    <author initials="Y." surname="Rekhter" fullname="Yakov Rekhter">
4456      <organization>cisco Systems</organization>
4457      <address><email></email></address>
4458    </author>
4459    <date month="February" year="1996"/>
4460  </front>
4461  <seriesInfo name="RFC" value="1900"/>
4464<reference anchor='RFC1919'>
4465  <front>
4466    <title>Classical versus Transparent IP Proxies</title>
4467    <author initials='M.' surname='Chatel' fullname='Marc Chatel'>
4468      <address><email></email></address>
4469    </author>
4470    <date year='1996' month='March' />
4471  </front>
4472  <seriesInfo name='RFC' value='1919' />
4475<reference anchor="RFC1945">
4476  <front>
4477    <title abbrev="HTTP/1.0">Hypertext Transfer Protocol -- HTTP/1.0</title>
4478    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
4479      <organization>MIT, Laboratory for Computer Science</organization>
4480      <address><email></email></address>
4481    </author>
4482    <author initials="R.T." surname="Fielding" fullname="Roy T. Fielding">
4483      <organization>University of California, Irvine, Department of Information and Computer Science</organization>
4484      <address><email></email></address>
4485    </author>
4486    <author initials="H.F." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
4487      <organization>W3 Consortium, MIT Laboratory for Computer Science</organization>
4488      <address><email></email></address>
4489    </author>
4490    <date month="May" year="1996"/>
4491  </front>
4492  <seriesInfo name="RFC" value="1945"/>
4495<reference anchor="RFC2045">
4496  <front>
4497    <title abbrev="Internet Message Bodies">Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</title>
4498    <author initials="N." surname="Freed" fullname="Ned Freed">
4499      <organization>Innosoft International, Inc.</organization>
4500      <address><email></email></address>
4501    </author>
4502    <author initials="N.S." surname="Borenstein" fullname="Nathaniel S. Borenstein">
4503      <organization>First Virtual Holdings</organization>
4504      <address><email></email></address>
4505    </author>
4506    <date month="November" year="1996"/>
4507  </front>
4508  <seriesInfo name="RFC" value="2045"/>
4511<reference anchor="RFC2047">
4512  <front>
4513    <title abbrev="Message Header Extensions">MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text</title>
4514    <author initials="K." surname="Moore" fullname="Keith Moore">
4515      <organization>University of Tennessee</organization>
4516      <address><email></email></address>
4517    </author>
4518    <date month="November" year="1996"/>
4519  </front>
4520  <seriesInfo name="RFC" value="2047"/>
4523<reference anchor="RFC2068">
4524  <front>
4525    <title abbrev="HTTP/1.1">Hypertext Transfer Protocol -- HTTP/1.1</title>
4526    <author initials="R." surname="Fielding" fullname="Roy T. Fielding">
4527      <organization>University of California, Irvine, Department of Information and Computer Science</organization>
4528      <address><email></email></address>
4529    </author>
4530    <author initials="J." surname="Gettys" fullname="Jim Gettys">
4531      <organization>MIT Laboratory for Computer Science</organization>
4532      <address><email></email></address>
4533    </author>
4534    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
4535      <organization>Digital Equipment Corporation, Western Research Laboratory</organization>
4536      <address><email></email></address>
4537    </author>
4538    <author initials="H." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
4539      <organization>MIT Laboratory for Computer Science</organization>
4540      <address><email></email></address>
4541    </author>
4542    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
4543      <organization>MIT Laboratory for Computer Science</organization>
4544      <address><email></email></address>
4545    </author>
4546    <date month="January" year="1997"/>
4547  </front>
4548  <seriesInfo name="RFC" value="2068"/>
4551<reference anchor="RFC2145">
4552  <front>
4553    <title abbrev="HTTP Version Numbers">Use and Interpretation of HTTP Version Numbers</title>
4554    <author initials="J.C." surname="Mogul" fullname="Jeffrey C. Mogul">
4555      <organization>Western Research Laboratory</organization>
4556      <address><email></email></address>
4557    </author>
4558    <author initials="R.T." surname="Fielding" fullname="Roy T. Fielding">
4559      <organization>Department of Information and Computer Science</organization>
4560      <address><email></email></address>
4561    </author>
4562    <author initials="J." surname="Gettys" fullname="Jim Gettys">
4563      <organization>MIT Laboratory for Computer Science</organization>
4564      <address><email></email></address>
4565    </author>
4566    <author initials="H.F." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
4567      <organization>W3 Consortium</organization>
4568      <address><email></email></address>
4569    </author>
4570    <date month="May" year="1997"/>
4571  </front>
4572  <seriesInfo name="RFC" value="2145"/>
4575<reference anchor="RFC2616">
4576  <front>
4577    <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
4578    <author initials="R." surname="Fielding" fullname="R. Fielding">
4579      <organization>University of California, Irvine</organization>
4580      <address><email></email></address>
4581    </author>
4582    <author initials="J." surname="Gettys" fullname="J. Gettys">
4583      <organization>W3C</organization>
4584      <address><email></email></address>
4585    </author>
4586    <author initials="J." surname="Mogul" fullname="J. Mogul">
4587      <organization>Compaq Computer Corporation</organization>
4588      <address><email></email></address>
4589    </author>
4590    <author initials="H." surname="Frystyk" fullname="H. Frystyk">
4591      <organization>MIT Laboratory for Computer Science</organization>
4592      <address><email></email></address>
4593    </author>
4594    <author initials="L." surname="Masinter" fullname="L. Masinter">
4595      <organization>Xerox Corporation</organization>
4596      <address><email></email></address>
4597    </author>
4598    <author initials="P." surname="Leach" fullname="P. Leach">
4599      <organization>Microsoft Corporation</organization>
4600      <address><email></email></address>
4601    </author>
4602    <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
4603      <organization>W3C</organization>
4604      <address><email></email></address>
4605    </author>
4606    <date month="June" year="1999"/>
4607  </front>
4608  <seriesInfo name="RFC" value="2616"/>
4611<reference anchor='RFC2817'>
4612  <front>
4613    <title>Upgrading to TLS Within HTTP/1.1</title>
4614    <author initials='R.' surname='Khare' fullname='R. Khare'>
4615      <organization>4K Associates / UC Irvine</organization>
4616      <address><email></email></address>
4617    </author>
4618    <author initials='S.' surname='Lawrence' fullname='S. Lawrence'>
4619      <organization>Agranat Systems, Inc.</organization>
4620      <address><email></email></address>
4621    </author>
4622    <date year='2000' month='May' />
4623  </front>
4624  <seriesInfo name='RFC' value='2817' />
4627<reference anchor='RFC2818'>
4628  <front>
4629    <title>HTTP Over TLS</title>
4630    <author initials='E.' surname='Rescorla' fullname='Eric Rescorla'>
4631      <organization>RTFM, Inc.</organization>
4632      <address><email></email></address>
4633    </author>
4634    <date year='2000' month='May' />
4635  </front>
4636  <seriesInfo name='RFC' value='2818' />
4639<reference anchor='RFC2965'>
4640  <front>
4641    <title>HTTP State Management Mechanism</title>
4642    <author initials='D. M.' surname='Kristol' fullname='David M. Kristol'>
4643      <organization>Bell Laboratories, Lucent Technologies</organization>
4644      <address><email></email></address>
4645    </author>
4646    <author initials='L.' surname='Montulli' fullname='Lou Montulli'>
4647      <organization>, Inc.</organization>
4648      <address><email></email></address>
4649    </author>
4650    <date year='2000' month='October' />
4651  </front>
4652  <seriesInfo name='RFC' value='2965' />
4655<reference anchor='RFC3040'>
4656  <front>
4657    <title>Internet Web Replication and Caching Taxonomy</title>
4658    <author initials='I.' surname='Cooper' fullname='I. Cooper'>
4659      <organization>Equinix, Inc.</organization>
4660    </author>
4661    <author initials='I.' surname='Melve' fullname='I. Melve'>
4662      <organization>UNINETT</organization>
4663    </author>
4664    <author initials='G.' surname='Tomlinson' fullname='G. Tomlinson'>
4665      <organization>CacheFlow Inc.</organization>
4666    </author>
4667    <date year='2001' month='January' />
4668  </front>
4669  <seriesInfo name='RFC' value='3040' />
4672<reference anchor='RFC3864'>
4673  <front>
4674    <title>Registration Procedures for Message Header Fields</title>
4675    <author initials='G.' surname='Klyne' fullname='G. Klyne'>
4676      <organization>Nine by Nine</organization>
4677      <address><email></email></address>
4678    </author>
4679    <author initials='M.' surname='Nottingham' fullname='M. Nottingham'>
4680      <organization>BEA Systems</organization>
4681      <address><email></email></address>
4682    </author>
4683    <author initials='J.' surname='Mogul' fullname='J. Mogul'>
4684      <organization>HP Labs</organization>
4685      <address><email></email></address>
4686    </author>
4687    <date year='2004' month='September' />
4688  </front>
4689  <seriesInfo name='BCP' value='90' />
4690  <seriesInfo name='RFC' value='3864' />
4693<reference anchor="RFC4288">
4694  <front>
4695    <title>Media Type Specifications and Registration Procedures</title>
4696    <author initials="N." surname="Freed" fullname="N. Freed">
4697      <organization>Sun Microsystems</organization>
4698      <address>
4699        <email></email>
4700      </address>
4701    </author>
4702    <author initials="J." surname="Klensin" fullname="J. Klensin">
4703      <address>
4704        <email></email>
4705      </address>
4706    </author>
4707    <date year="2005" month="December"/>
4708  </front>
4709  <seriesInfo name="BCP" value="13"/>
4710  <seriesInfo name="RFC" value="4288"/>
4713<reference anchor='RFC4395'>
4714  <front>
4715    <title>Guidelines and Registration Procedures for New URI Schemes</title>
4716    <author initials='T.' surname='Hansen' fullname='T. Hansen'>
4717      <organization>AT&amp;T Laboratories</organization>
4718      <address>
4719        <email></email>
4720      </address>
4721    </author>
4722    <author initials='T.' surname='Hardie' fullname='T. Hardie'>
4723      <organization>Qualcomm, Inc.</organization>
4724      <address>
4725        <email></email>
4726      </address>
4727    </author>
4728    <author initials='L.' surname='Masinter' fullname='L. Masinter'>
4729      <organization>Adobe Systems</organization>
4730      <address>
4731        <email></email>
4732      </address>
4733    </author>
4734    <date year='2006' month='February' />
4735  </front>
4736  <seriesInfo name='BCP' value='115' />
4737  <seriesInfo name='RFC' value='4395' />
4740<reference anchor='RFC5226'>
4741  <front>
4742    <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
4743    <author initials='T.' surname='Narten' fullname='T. Narten'>
4744      <organization>IBM</organization>
4745      <address><email></email></address>
4746    </author>
4747    <author initials='H.' surname='Alvestrand' fullname='H. Alvestrand'>
4748      <organization>Google</organization>
4749      <address><email></email></address>
4750    </author>
4751    <date year='2008' month='May' />
4752  </front>
4753  <seriesInfo name='BCP' value='26' />
4754  <seriesInfo name='RFC' value='5226' />
4757<reference anchor="RFC5322">
4758  <front>
4759    <title>Internet Message Format</title>
4760    <author initials="P." surname="Resnick" fullname="P. Resnick">
4761      <organization>Qualcomm Incorporated</organization>
4762    </author>
4763    <date year="2008" month="October"/>
4764  </front>
4765  <seriesInfo name="RFC" value="5322"/>
4768<reference anchor="RFC6265">
4769  <front>
4770    <title>HTTP State Management Mechanism</title>
4771    <author initials="A." surname="Barth" fullname="Adam Barth">
4772      <organization abbrev="U.C. Berkeley">
4773        University of California, Berkeley
4774      </organization>
4775      <address><email></email></address>
4776    </author>
4777    <date year="2011" month="April" />
4778  </front>
4779  <seriesInfo name="RFC" value="6265"/>
4782<reference anchor='BCP97'>
4783  <front>
4784    <title>Handling Normative References to Standards-Track Documents</title>
4785    <author initials='J.' surname='Klensin' fullname='J. Klensin'>
4786      <address>
4787        <email></email>
4788      </address>
4789    </author>
4790    <author initials='S.' surname='Hartman' fullname='S. Hartman'>
4791      <organization>MIT</organization>
4792      <address>
4793        <email></email>
4794      </address>
4795    </author>
4796    <date year='2007' month='June' />
4797  </front>
4798  <seriesInfo name='BCP' value='97' />
4799  <seriesInfo name='RFC' value='4897' />
4802<reference anchor="Kri2001" target="">
4803  <front>
4804    <title>HTTP Cookies: Standards, Privacy, and Politics</title>
4805    <author initials="D." surname="Kristol" fullname="David M. Kristol"/>
4806    <date year="2001" month="November"/>
4807  </front>
4808  <seriesInfo name="ACM Transactions on Internet Technology" value="Vol. 1, #2"/>
4811<reference anchor="Spe" target="">
4812  <front>
4813    <title>Analysis of HTTP Performance Problems</title>
4814    <author initials="S." surname="Spero" fullname="Simon E. Spero"/>
4815    <date/>
4816  </front>
4819<reference anchor="Tou1998" target="">
4820  <front>
4821  <title>Analysis of HTTP Performance</title>
4822  <author initials="J." surname="Touch" fullname="Joe Touch">
4823    <organization>USC/Information Sciences Institute</organization>
4824    <address><email></email></address>
4825  </author>
4826  <author initials="J." surname="Heidemann" fullname="John Heidemann">
4827    <organization>USC/Information Sciences Institute</organization>
4828    <address><email></email></address>
4829  </author>
4830  <author initials="K." surname="Obraczka" fullname="Katia Obraczka">
4831    <organization>USC/Information Sciences Institute</organization>
4832    <address><email></email></address>
4833  </author>
4834  <date year="1998" month="Aug"/>
4835  </front>
4836  <seriesInfo name="ISI Research Report" value="ISI/RR-98-463"/>
4837  <annotation>(original report dated Aug. 1996)</annotation>
4843<section title="Tolerant Applications" anchor="tolerant.applications">
4845   Although this document specifies the requirements for the generation
4846   of HTTP/1.1 messages, not all applications will be correct in their
4847   implementation. We therefore recommend that operational applications
4848   be tolerant of deviations whenever those deviations can be
4849   interpreted unambiguously.
4852   The line terminator for header fields is the sequence CRLF.
4853   However, we recommend that applications, when parsing such headers fields,
4854   recognize a single LF as a line terminator and ignore the leading CR.
4857   The character encoding of a representation &SHOULD; be labeled as the lowest
4858   common denominator of the character codes used within that representation, with
4859   the exception that not labeling the representation is preferred over labeling
4860   the representation with the labels US-ASCII or ISO-8859-1. See &payload;.
4863   Additional rules for requirements on parsing and encoding of dates
4864   and other potential problems with date encodings include:
4867  <list style="symbols">
4868     <t>HTTP/1.1 clients and caches &SHOULD; assume that an RFC-850 date
4869        which appears to be more than 50 years in the future is in fact
4870        in the past (this helps solve the "year 2000" problem).</t>
4872     <t>Although all date formats are specified to be case-sensitive,
4873        recipients &SHOULD; match day, week and timezone names
4874        case-insensitively.</t>
4876     <t>An HTTP/1.1 implementation &MAY; internally represent a parsed
4877        Expires date as earlier than the proper value, but &MUST-NOT;
4878        internally represent a parsed Expires date as later than the
4879        proper value.</t>
4881     <t>All expiration-related calculations &MUST; be done in GMT. The
4882        local time zone &MUST-NOT; influence the calculation or comparison
4883        of an age or expiration time.</t>
4885     <t>If an HTTP header field incorrectly carries a date value with a time
4886        zone other than GMT, it &MUST; be converted into GMT using the
4887        most conservative possible conversion.</t>
4888  </list>
4892<section title="HTTP Version History" anchor="compatibility">
4894   HTTP has been in use by the World-Wide Web global information initiative
4895   since 1990. The first version of HTTP, later referred to as HTTP/0.9,
4896   was a simple protocol for hypertext data transfer across the Internet
4897   with only a single request method (GET) and no metadata.
4898   HTTP/1.0, as defined by <xref target="RFC1945"/>, added a range of request
4899   methods and MIME-like messaging that could include metadata about the data
4900   transferred and modifiers on the request/response semantics. However,
4901   HTTP/1.0 did not sufficiently take into consideration the effects of
4902   hierarchical proxies, caching, the need for persistent connections, or
4903   name-based virtual hosts. The proliferation of incompletely-implemented
4904   applications calling themselves "HTTP/1.0" further necessitated a
4905   protocol version change in order for two communicating applications
4906   to determine each other's true capabilities.
4909   HTTP/1.1 remains compatible with HTTP/1.0 by including more stringent
4910   requirements that enable reliable implementations, adding only
4911   those new features that will either be safely ignored by an HTTP/1.0
4912   recipient or only sent when communicating with a party advertising
4913   compliance with HTTP/1.1.
4916   It is beyond the scope of a protocol specification to mandate
4917   compliance with previous versions. HTTP/1.1 was deliberately
4918   designed, however, to make supporting previous versions easy.
4919   We would expect a general-purpose HTTP/1.1 server to understand
4920   any valid request in the format of HTTP/1.0 and respond appropriately
4921   with an HTTP/1.1 message that only uses features understood (or
4922   safely ignored) by HTTP/1.0 clients.  Likewise, would expect
4923   an HTTP/1.1 client to understand any valid HTTP/1.0 response.
4926   Since HTTP/0.9 did not support header fields in a request,
4927   there is no mechanism for it to support name-based virtual
4928   hosts (selection of resource by inspection of the Host header
4929   field).  Any server that implements name-based virtual hosts
4930   ought to disable support for HTTP/0.9.  Most requests that
4931   appear to be HTTP/0.9 are, in fact, badly constructed HTTP/1.x
4932   requests wherein a buggy client failed to properly encode
4933   linear whitespace found in a URI reference and placed in
4934   the request-target.
4937<section title="Changes from HTTP/1.0" anchor="changes.from.1.0">
4939   This section summarizes major differences between versions HTTP/1.0
4940   and HTTP/1.1.
4943<section title="Multi-homed Web Servers" anchor="">
4945   The requirements that clients and servers support the Host header
4946   field (<xref target=""/>), report an error if it is
4947   missing from an HTTP/1.1 request, and accept absolute URIs (<xref target="request-target"/>)
4948   are among the most important changes defined by HTTP/1.1.
4951   Older HTTP/1.0 clients assumed a one-to-one relationship of IP
4952   addresses and servers; there was no other established mechanism for
4953   distinguishing the intended server of a request than the IP address
4954   to which that request was directed. The Host header field was
4955   introduced during the development of HTTP/1.1 and, though it was
4956   quickly implemented by most HTTP/1.0 browsers, additional requirements
4957   were placed on all HTTP/1.1 requests in order to ensure complete
4958   adoption.  At the time of this writing, most HTTP-based services
4959   are dependent upon the Host header field for targeting requests.
4963<section title="Keep-Alive Connections" anchor="compatibility.with.http.1.0.persistent.connections">
4965   For most implementations of HTTP/1.0, each connection is established
4966   by the client prior to the request and closed by the server after
4967   sending the response. However, some implementations implement the
4968   Keep-Alive version of persistent connections described in
4969   <xref x:sec="19.7.1" x:fmt="of" target="RFC2068"/>.
4972   Some clients and servers might wish to be compatible with some
4973   previous implementations of persistent connections in HTTP/1.0
4974   clients and servers. Persistent connections in HTTP/1.0 are
4975   explicitly negotiated as they are not the default behavior. HTTP/1.0
4976   experimental implementations of persistent connections are faulty,
4977   and the new facilities in HTTP/1.1 are designed to rectify these
4978   problems. The problem was that some existing HTTP/1.0 clients might
4979   send Keep-Alive to a proxy server that doesn't understand
4980   Connection, which would then erroneously forward it to the next
4981   inbound server, which would establish the Keep-Alive connection and
4982   result in a hung HTTP/1.0 proxy waiting for the close on the
4983   response. The result is that HTTP/1.0 clients must be prevented from
4984   using Keep-Alive when talking to proxies.
4987   However, talking to proxies is the most important use of persistent
4988   connections, so that prohibition is clearly unacceptable. Therefore,
4989   we need some other mechanism for indicating a persistent connection
4990   is desired, which is safe to use even when talking to an old proxy
4991   that ignores Connection. Persistent connections are the default for
4992   HTTP/1.1 messages; we introduce a new keyword (Connection: close) for
4993   declaring non-persistence. See <xref target="header.connection"/>.
4998<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
5000  Empty list elements in list productions have been deprecated.
5001  (<xref target="notation.abnf"/>)
5004  Rules about implicit linear whitespace between certain grammar productions
5005  have been removed; now it's only allowed when specifically pointed out
5006  in the ABNF. The NUL octet is no longer allowed in comment and quoted-string
5007  text. The quoted-pair rule no longer allows escaping control characters other than HTAB.
5008  Non-ASCII content in header fields and reason phrase has been obsoleted and
5009  made opaque (the TEXT rule was removed)
5010  (<xref target="basic.rules"/>)
5013  Clarify that the string "HTTP" in the HTTP-Version ABNF production is case
5014  sensitive.
5015  (<xref target="http.version"/>)
5018  Require that invalid whitespace around field-names be rejected.
5019  (<xref target="header.fields"/>)
5022  Require recipients to handle bogus Content-Length header fields as errors.
5023  (<xref target="message.body"/>)
5026  Remove reference to non-existent identity transfer-coding value tokens.
5027  (Sections <xref format="counter" target="message.body"/> and
5028  <xref format="counter" target="transfer.codings"/>)
5031  Update use of abs_path production from RFC 1808 to the path-absolute + query
5032  components of RFC 3986. State that the asterisk form is allowed for the OPTIONS
5033  request method only.
5034  (<xref target="request-target"/>)
5037  Clarification that the chunk length does not include the count of the octets
5038  in the chunk header and trailer. Furthermore disallowed line folding
5039  in chunk extensions.
5040  (<xref target="chunked.encoding"/>)
5043  Remove hard limit of two connections per server.
5044  (<xref target="persistent.practical"/>)
5047  Change ABNF productions for header fields to only define the field value.
5048  (<xref target="header.field.definitions"/>)
5051  Clarify exactly when close connection options must be sent.
5052  (<xref target="header.connection"/>)
5055  Define the semantics of the "Upgrade" header field in responses other than
5056  101 (this was incorporated from <xref target="RFC2817"/>).
5057  (<xref target="header.upgrade"/>)
5062<?BEGININC p1-messaging.abnf-appendix ?>
5063<section xmlns:x="" title="Collected ABNF" anchor="collected.abnf">
5065<artwork type="abnf" name="p1-messaging.parsed-abnf">
5066<x:ref>BWS</x:ref> = OWS
5068<x:ref>Chunked-Body</x:ref> = *chunk last-chunk trailer-part CRLF
5069<x:ref>Connection</x:ref> = *( "," OWS ) connection-token *( OWS "," [ OWS
5070 connection-token ] )
5071<x:ref>Content-Length</x:ref> = 1*DIGIT
5073<x:ref>Date</x:ref> = HTTP-date
5075<x:ref>GMT</x:ref> = %x47.4D.54 ; GMT
5077<x:ref>HTTP-Prot-Name</x:ref> = %x48.54.54.50 ; HTTP
5078<x:ref>HTTP-Version</x:ref> = HTTP-Prot-Name "/" 1*DIGIT "." 1*DIGIT
5079<x:ref>HTTP-date</x:ref> = rfc1123-date / obs-date
5080<x:ref>HTTP-message</x:ref> = start-line *( header-field CRLF ) CRLF [ message-body
5081 ]
5082<x:ref>Host</x:ref> = uri-host [ ":" port ]
5084<x:ref>Method</x:ref> = token
5086<x:ref>OWS</x:ref> = *( [ obs-fold ] WSP )
5088<x:ref>RWS</x:ref> = 1*( [ obs-fold ] WSP )
5089<x:ref>Reason-Phrase</x:ref> = *( WSP / VCHAR / obs-text )
5090<x:ref>Request</x:ref> = Request-Line *( header-field CRLF ) CRLF [ message-body ]
5091<x:ref>Request-Line</x:ref> = Method SP request-target SP HTTP-Version CRLF
5092<x:ref>Response</x:ref> = Status-Line *( header-field CRLF ) CRLF [ message-body ]
5094<x:ref>Status-Code</x:ref> = 3DIGIT
5095<x:ref>Status-Line</x:ref> = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
5097<x:ref>TE</x:ref> = [ ( "," / t-codings ) *( OWS "," [ OWS t-codings ] ) ]
5098<x:ref>Trailer</x:ref> = *( "," OWS ) field-name *( OWS "," [ OWS field-name ] )
5099<x:ref>Transfer-Encoding</x:ref> = *( "," OWS ) transfer-coding *( OWS "," [ OWS
5100 transfer-coding ] )
5102<x:ref>URI-reference</x:ref> = &lt;URI-reference, defined in [RFC3986], Section 4.1&gt;
5103<x:ref>Upgrade</x:ref> = *( "," OWS ) product *( OWS "," [ OWS product ] )
5105<x:ref>Via</x:ref> = *( "," OWS ) received-protocol RWS received-by [ RWS comment ]
5106 *( OWS "," [ OWS received-protocol RWS received-by [ RWS comment ] ]
5107 )
5109<x:ref>absolute-URI</x:ref> = &lt;absolute-URI, defined in [RFC3986], Section 4.3&gt;
5110<x:ref>asctime-date</x:ref> = day-name SP date3 SP time-of-day SP year
5111<x:ref>attribute</x:ref> = token
5112<x:ref>authority</x:ref> = &lt;authority, defined in [RFC3986], Section 3.2&gt;
5114<x:ref>chunk</x:ref> = chunk-size *WSP [ chunk-ext ] CRLF chunk-data CRLF
5115<x:ref>chunk-data</x:ref> = 1*OCTET
5116<x:ref>chunk-ext</x:ref> = *( ";" *WSP chunk-ext-name [ "=" chunk-ext-val ] *WSP )
5117<x:ref>chunk-ext-name</x:ref> = token
5118<x:ref>chunk-ext-val</x:ref> = token / quoted-str-nf
5119<x:ref>chunk-size</x:ref> = 1*HEXDIG
5120<x:ref>comment</x:ref> = "(" *( ctext / quoted-cpair / comment ) ")"
5121<x:ref>connection-token</x:ref> = token
5122<x:ref>ctext</x:ref> = OWS / %x21-27 ; '!'-'''
5123 / %x2A-5B ; '*'-'['
5124 / %x5D-7E ; ']'-'~'
5125 / obs-text
5127<x:ref>date1</x:ref> = day SP month SP year
5128<x:ref>date2</x:ref> = day "-" month "-" 2DIGIT
5129<x:ref>date3</x:ref> = month SP ( 2DIGIT / ( SP DIGIT ) )
5130<x:ref>day</x:ref> = 2DIGIT
5131<x:ref>day-name</x:ref> = %x4D.6F.6E ; Mon
5132 / %x54.75.65 ; Tue
5133 / %x57.65.64 ; Wed
5134 / %x54.68.75 ; Thu
5135 / %x46.72.69 ; Fri
5136 / %x53.61.74 ; Sat
5137 / %x53.75.6E ; Sun
5138<x:ref>day-name-l</x:ref> = %x4D.6F.6E.64.61.79 ; Monday
5139 / %x54. ; Tuesday
5140 / %x57.65.64.6E. ; Wednesday
5141 / %x54. ; Thursday
5142 / %x46. ; Friday
5143 / %x53. ; Saturday
5144 / %x53.75.6E.64.61.79 ; Sunday
5146<x:ref>field-content</x:ref> = *( WSP / VCHAR / obs-text )
5147<x:ref>field-name</x:ref> = token
5148<x:ref>field-value</x:ref> = *( field-content / OWS )
5150<x:ref>header-field</x:ref> = field-name ":" OWS [ field-value ] OWS
5151<x:ref>hour</x:ref> = 2DIGIT
5152<x:ref>http-URI</x:ref> = "http://" authority path-abempty [ "?" query ]
5153<x:ref>https-URI</x:ref> = "https://" authority path-abempty [ "?" query ]
5155<x:ref>last-chunk</x:ref> = 1*"0" *WSP [ chunk-ext ] CRLF
5157<x:ref>message-body</x:ref> = *OCTET
5158<x:ref>minute</x:ref> = 2DIGIT
5159<x:ref>month</x:ref> = %x4A.61.6E ; Jan
5160 / %x46.65.62 ; Feb
5161 / %x4D.61.72 ; Mar
5162 / %x41.70.72 ; Apr
5163 / %x4D.61.79 ; May
5164 / %x4A.75.6E ; Jun
5165 / %x4A.75.6C ; Jul
5166 / %x41.75.67 ; Aug
5167 / %x53.65.70 ; Sep
5168 / %x4F.63.74 ; Oct
5169 / %x4E.6F.76 ; Nov
5170 / %x44.65.63 ; Dec
5172<x:ref>obs-date</x:ref> = rfc850-date / asctime-date
5173<x:ref>obs-fold</x:ref> = CRLF
5174<x:ref>obs-text</x:ref> = %x80-FF
5176<x:ref>partial-URI</x:ref> = relative-part [ "?" query ]
5177<x:ref>path-abempty</x:ref> = &lt;path-abempty, defined in [RFC3986], Section 3.3&gt;
5178<x:ref>path-absolute</x:ref> = &lt;path-absolute, defined in [RFC3986], Section 3.3&gt;
5179<x:ref>port</x:ref> = &lt;port, defined in [RFC3986], Section 3.2.3&gt;
5180<x:ref>product</x:ref> = token [ "/" product-version ]
5181<x:ref>product-version</x:ref> = token
5182<x:ref>protocol-name</x:ref> = token
5183<x:ref>protocol-version</x:ref> = token
5184<x:ref>pseudonym</x:ref> = token
5186<x:ref>qdtext</x:ref> = OWS / "!" / %x23-5B ; '#'-'['
5187 / %x5D-7E ; ']'-'~'
5188 / obs-text
5189<x:ref>qdtext-nf</x:ref> = WSP / "!" / %x23-5B ; '#'-'['
5190 / %x5D-7E ; ']'-'~'
5191 / obs-text
5192<x:ref>query</x:ref> = &lt;query, defined in [RFC3986], Section 3.4&gt;
5193<x:ref>quoted-cpair</x:ref> = "\" ( WSP / VCHAR / obs-text )
5194<x:ref>quoted-pair</x:ref> = "\" ( WSP / VCHAR / obs-text )
5195<x:ref>quoted-str-nf</x:ref> = DQUOTE *( qdtext-nf / quoted-pair ) DQUOTE
5196<x:ref>quoted-string</x:ref> = DQUOTE *( qdtext / quoted-pair ) DQUOTE
5197<x:ref>qvalue</x:ref> = ( "0" [ "." *3DIGIT ] ) / ( "1" [ "." *3"0" ] )
5199<x:ref>received-by</x:ref> = ( uri-host [ ":" port ] ) / pseudonym
5200<x:ref>received-protocol</x:ref> = [ protocol-name "/" ] protocol-version
5201<x:ref>relative-part</x:ref> = &lt;relative-part, defined in [RFC3986], Section 4.2&gt;
5202<x:ref>request-target</x:ref> = "*" / absolute-URI / ( path-absolute [ "?" query ] )
5203 / authority
5204<x:ref>rfc1123-date</x:ref> = day-name "," SP date1 SP time-of-day SP GMT
5205<x:ref>rfc850-date</x:ref> = day-name-l "," SP date2 SP time-of-day SP GMT
5207<x:ref>second</x:ref> = 2DIGIT
5208<x:ref>special</x:ref> = "(" / ")" / "&lt;" / "&gt;" / "@" / "," / ";" / ":" / "\" /
5209 DQUOTE / "/" / "[" / "]" / "?" / "=" / "{" / "}"
5210<x:ref>start-line</x:ref> = Request-Line / Status-Line
5212<x:ref>t-codings</x:ref> = "trailers" / ( transfer-extension [ te-params ] )
5213<x:ref>tchar</x:ref> = "!" / "#" / "$" / "%" / "&amp;" / "'" / "*" / "+" / "-" / "." /
5214 "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA
5215<x:ref>te-ext</x:ref> = OWS ";" OWS token [ "=" word ]
5216<x:ref>te-params</x:ref> = OWS ";" OWS "q=" qvalue *te-ext
5217<x:ref>time-of-day</x:ref> = hour ":" minute ":" second
5218<x:ref>token</x:ref> = 1*tchar
5219<x:ref>trailer-part</x:ref> = *( header-field CRLF )
5220<x:ref>transfer-coding</x:ref> = "chunked" / "compress" / "deflate" / "gzip" /
5221 transfer-extension
5222<x:ref>transfer-extension</x:ref> = token *( OWS ";" OWS transfer-parameter )
5223<x:ref>transfer-parameter</x:ref> = attribute BWS "=" BWS value
5225<x:ref>uri-host</x:ref> = &lt;host, defined in [RFC3986], Section 3.2.2&gt;
5227<x:ref>value</x:ref> = word
5229<x:ref>word</x:ref> = token / quoted-string
5231<x:ref>year</x:ref> = 4DIGIT
5234<figure><preamble>ABNF diagnostics:</preamble><artwork type="inline">
5235; Chunked-Body defined but not used
5236; Connection defined but not used
5237; Content-Length defined but not used
5238; Date defined but not used
5239; HTTP-message defined but not used
5240; Host defined but not used
5241; Request defined but not used
5242; Response defined but not used
5243; TE defined but not used
5244; Trailer defined but not used
5245; Transfer-Encoding defined but not used
5246; URI-reference defined but not used
5247; Upgrade defined but not used
5248; Via defined but not used
5249; http-URI defined but not used
5250; https-URI defined but not used
5251; partial-URI defined but not used
5252; special defined but not used
5254<?ENDINC p1-messaging.abnf-appendix ?>
5256<section title="Change Log (to be removed by RFC Editor before publication)" anchor="change.log">
5258<section title="Since RFC 2616">
5260  Extracted relevant partitions from <xref target="RFC2616"/>.
5264<section title="Since draft-ietf-httpbis-p1-messaging-00">
5266  Closed issues:
5267  <list style="symbols">
5268    <t>
5269      <eref target=""/>:
5270      "HTTP Version should be case sensitive"
5271      (<eref target=""/>)
5272    </t>
5273    <t>
5274      <eref target=""/>:
5275      "'unsafe' characters"
5276      (<eref target=""/>)
5277    </t>
5278    <t>
5279      <eref target=""/>:
5280      "Chunk Size Definition"
5281      (<eref target=""/>)
5282    </t>
5283    <t>
5284      <eref target=""/>:
5285      "Message Length"
5286      (<eref target=""/>)
5287    </t>
5288    <t>
5289      <eref target=""/>:
5290      "Media Type Registrations"
5291      (<eref target=""/>)
5292    </t>
5293    <t>
5294      <eref target=""/>:
5295      "URI includes query"
5296      (<eref target=""/>)
5297    </t>
5298    <t>
5299      <eref target=""/>:
5300      "No close on 1xx responses"
5301      (<eref target=""/>)
5302    </t>
5303    <t>
5304      <eref target=""/>:
5305      "Remove 'identity' token references"
5306      (<eref target=""/>)
5307    </t>
5308    <t>
5309      <eref target=""/>:
5310      "Import query BNF"
5311    </t>
5312    <t>
5313      <eref target=""/>:
5314      "qdtext BNF"
5315    </t>
5316    <t>
5317      <eref target=""/>:
5318      "Normative and Informative references"
5319    </t>
5320    <t>
5321      <eref target=""/>:
5322      "RFC2606 Compliance"
5323    </t>
5324    <t>
5325      <eref target=""/>:
5326      "RFC977 reference"
5327    </t>
5328    <t>
5329      <eref target=""/>:
5330      "RFC1700 references"
5331    </t>
5332    <t>
5333      <eref target=""/>:
5334      "inconsistency in date format explanation"
5335    </t>
5336    <t>
5337      <eref target=""/>:
5338      "Date reference typo"
5339    </t>
5340    <t>
5341      <eref target=""/>:
5342      "Informative references"
5343    </t>
5344    <t>
5345      <eref target=""/>:
5346      "ISO-8859-1 Reference"
5347    </t>
5348    <t>
5349      <eref target=""/>:
5350      "Normative up-to-date references"
5351    </t>
5352  </list>
5355  Other changes:
5356  <list style="symbols">
5357    <t>
5358      Update media type registrations to use RFC4288 template.
5359    </t>
5360    <t>
5361      Use names of RFC4234 core rules DQUOTE and WSP,
5362      fix broken ABNF for chunk-data
5363      (work in progress on <eref target=""/>)
5364    </t>
5365  </list>
5369<section title="Since draft-ietf-httpbis-p1-messaging-01">
5371  Closed issues:
5372  <list style="symbols">
5373    <t>
5374      <eref target=""/>:
5375      "Bodies on GET (and other) requests"
5376    </t>
5377    <t>
5378      <eref target=""/>:
5379      "Updating to RFC4288"
5380    </t>
5381    <t>
5382      <eref target=""/>:
5383      "Status Code and Reason Phrase"
5384    </t>
5385    <t>
5386      <eref target=""/>:
5387      "rel_path not used"
5388    </t>
5389  </list>
5392  Ongoing work on ABNF conversion (<eref target=""/>):
5393  <list style="symbols">
5394    <t>
5395      Get rid of duplicate BNF rule names ("host" -> "uri-host", "trailer" ->
5396      "trailer-part").
5397    </t>
5398    <t>
5399      Avoid underscore character in rule names ("http_URL" ->
5400      "http-URL", "abs_path" -> "path-absolute").
5401    </t>
5402    <t>
5403      Add rules for terms imported from URI spec ("absoluteURI", "authority",
5404      "path-absolute", "port", "query", "relativeURI", "host) &mdash; these will
5405      have to be updated when switching over to RFC3986.
5406    </t>
5407    <t>
5408      Synchronize core rules with RFC5234.
5409    </t>
5410    <t>
5411      Get rid of prose rules that span multiple lines.
5412    </t>
5413    <t>
5414      Get rid of unused rules LOALPHA and UPALPHA.
5415    </t>
5416    <t>
5417      Move "Product Tokens" section (back) into Part 1, as "token" is used
5418      in the definition of the Upgrade header field.
5419    </t>
5420    <t>
5421      Add explicit references to BNF syntax and rules imported from other parts of the specification.
5422    </t>
5423    <t>
5424      Rewrite prose rule "token" in terms of "tchar", rewrite prose rule "TEXT".
5425    </t>
5426  </list>
5430<section title="Since draft-ietf-httpbis-p1-messaging-02" anchor="changes.since.02">
5432  Closed issues:
5433  <list style="symbols">
5434    <t>
5435      <eref target=""/>:
5436      "HTTP-date vs. rfc1123-date"
5437    </t>
5438    <t>
5439      <eref target=""/>:
5440      "WS in quoted-pair"
5441    </t>
5442  </list>
5445  Ongoing work on IANA Message Header Field Registration (<eref target=""/>):
5446  <list style="symbols">
5447    <t>
5448      Reference RFC 3984, and update header field registrations for headers defined
5449      in this document.
5450    </t>
5451  </list>
5454  Ongoing work on ABNF conversion (<eref target=""/>):
5455  <list style="symbols">
5456    <t>
5457      Replace string literals when the string really is case-sensitive (HTTP-Version).
5458    </t>
5459  </list>
5463<section title="Since draft-ietf-httpbis-p1-messaging-03" anchor="changes.since.03">
5465  Closed issues:
5466  <list style="symbols">
5467    <t>
5468      <eref target=""/>:
5469      "Connection closing"
5470    </t>
5471    <t>
5472      <eref target=""/>:
5473      "Move registrations and registry information to IANA Considerations"
5474    </t>
5475    <t>
5476      <eref target=""/>:
5477      "need new URL for PAD1995 reference"
5478    </t>
5479    <t>
5480      <eref target=""/>:
5481      "IANA Considerations: update HTTP URI scheme registration"
5482    </t>
5483    <t>
5484      <eref target=""/>:
5485      "Cite HTTPS URI scheme definition"
5486    </t>
5487    <t>
5488      <eref target=""/>:
5489      "List-type headers vs Set-Cookie"
5490    </t>
5491  </list>
5494  Ongoing work on ABNF conversion (<eref target=""/>):
5495  <list style="symbols">
5496    <t>
5497      Replace string literals when the string really is case-sensitive (HTTP-Date).
5498    </t>
5499    <t>
5500      Replace HEX by HEXDIG for future consistence with RFC 5234's core rules.
5501    </t>
5502  </list>
5506<section title="Since draft-ietf-httpbis-p1-messaging-04" anchor="changes.since.04">
5508  Closed issues:
5509  <list style="symbols">
5510    <t>
5511      <eref target=""/>:
5512      "Out-of-date reference for URIs"
5513    </t>
5514    <t>
5515      <eref target=""/>:
5516      "RFC 2822 is updated by RFC 5322"
5517    </t>
5518  </list>
5521  Ongoing work on ABNF conversion (<eref target=""/>):
5522  <list style="symbols">
5523    <t>
5524      Use "/" instead of "|" for alternatives.
5525    </t>
5526    <t>
5527      Get rid of RFC822 dependency; use RFC5234 plus extensions instead.
5528    </t>
5529    <t>
5530      Only reference RFC 5234's core rules.
5531    </t>
5532    <t>
5533      Introduce new ABNF rules for "bad" whitespace ("BWS"), optional
5534      whitespace ("OWS") and required whitespace ("RWS").
5535    </t>
5536    <t>
5537      Rewrite ABNFs to spell out whitespace rules, factor out
5538      header field value format definitions.
5539    </t>
5540  </list>
5544<section title="Since draft-ietf-httpbis-p1-messaging-05" anchor="changes.since.05">
5546  Closed issues:
5547  <list style="symbols">
5548    <t>
5549      <eref target=""/>:
5550      "Header LWS"
5551    </t>
5552    <t>
5553      <eref target=""/>:
5554      "Sort 1.3 Terminology"
5555    </t>
5556    <t>
5557      <eref target=""/>:
5558      "RFC2047 encoded words"
5559    </t>
5560    <t>
5561      <eref target=""/>:
5562      "Character Encodings in TEXT"
5563    </t>
5564    <t>
5565      <eref target=""/>:
5566      "Line Folding"
5567    </t>
5568    <t>
5569      <eref target=""/>:
5570      "OPTIONS * and proxies"
5571    </t>
5572    <t>
5573      <eref target=""/>:
5574      "Reason-Phrase BNF"
5575    </t>
5576    <t>
5577      <eref target=""/>:
5578      "Use of TEXT"
5579    </t>
5580    <t>
5581      <eref target=""/>:
5582      "Join "Differences Between HTTP Entities and RFC 2045 Entities"?"
5583    </t>
5584    <t>
5585      <eref target=""/>:
5586      "RFC822 reference left in discussion of date formats"
5587    </t>
5588  </list>
5591  Final work on ABNF conversion (<eref target=""/>):
5592  <list style="symbols">
5593    <t>
5594      Rewrite definition of list rules, deprecate empty list elements.
5595    </t>
5596    <t>
5597      Add appendix containing collected and expanded ABNF.
5598    </t>
5599  </list>
5602  Other changes:
5603  <list style="symbols">
5604    <t>
5605      Rewrite introduction; add mostly new Architecture Section.
5606    </t>
5607    <t>
5608      Move definition of quality values from Part 3 into Part 1;
5609      make TE request header field grammar independent of accept-params (defined in Part 3).
5610    </t>
5611  </list>
5615<section title="Since draft-ietf-httpbis-p1-messaging-06" anchor="changes.since.06">
5617  Closed issues:
5618  <list style="symbols">
5619    <t>
5620      <eref target=""/>:
5621      "base for numeric protocol elements"
5622    </t>
5623    <t>
5624      <eref target=""/>:
5625      "comment ABNF"
5626    </t>
5627  </list>
5630  Partly resolved issues:
5631  <list style="symbols">
5632    <t>
5633      <eref target=""/>:
5634      "205 Bodies" (took out language that implied that there might be
5635      methods for which a request body MUST NOT be included)
5636    </t>
5637    <t>
5638      <eref target=""/>:
5639      "editorial improvements around HTTP-date"
5640    </t>
5641  </list>
5645<section title="Since draft-ietf-httpbis-p1-messaging-07" anchor="changes.since.07">
5647  Closed issues:
5648  <list style="symbols">
5649    <t>
5650      <eref target=""/>:
5651      "Repeating single-value headers"
5652    </t>
5653    <t>
5654      <eref target=""/>:
5655      "increase connection limit"
5656    </t>
5657    <t>
5658      <eref target=""/>:
5659      "IP addresses in URLs"
5660    </t>
5661    <t>
5662      <eref target=""/>:
5663      "take over HTTP Upgrade Token Registry"
5664    </t>
5665    <t>
5666      <eref target=""/>:
5667      "CR and LF in chunk extension values"
5668    </t>
5669    <t>
5670      <eref target=""/>:
5671      "HTTP/0.9 support"
5672    </t>
5673    <t>
5674      <eref target=""/>:
5675      "pick IANA policy (RFC5226) for Transfer Coding / Content Coding"
5676    </t>
5677    <t>
5678      <eref target=""/>:
5679      "move definitions of gzip/deflate/compress to part 1"
5680    </t>
5681    <t>
5682      <eref target=""/>:
5683      "disallow control characters in quoted-pair"
5684    </t>
5685  </list>
5688  Partly resolved issues:
5689  <list style="symbols">
5690    <t>
5691      <eref target=""/>:
5692      "update IANA requirements wrt Transfer-Coding values" (add the
5693      IANA Considerations subsection)
5694    </t>
5695  </list>
5699<section title="Since draft-ietf-httpbis-p1-messaging-08" anchor="changes.since.08">
5701  Closed issues:
5702  <list style="symbols">
5703    <t>
5704      <eref target=""/>:
5705      "header parsing, treatment of leading and trailing OWS"
5706    </t>
5707  </list>
5710  Partly resolved issues:
5711  <list style="symbols">
5712    <t>
5713      <eref target=""/>:
5714      "Placement of 13.5.1 and 13.5.2"
5715    </t>
5716    <t>
5717      <eref target=""/>:
5718      "use of term "word" when talking about header structure"
5719    </t>
5720  </list>
5724<section title="Since draft-ietf-httpbis-p1-messaging-09" anchor="changes.since.09">
5726  Closed issues:
5727  <list style="symbols">
5728    <t>
5729      <eref target=""/>:
5730      "Clarification of the term 'deflate'"
5731    </t>
5732    <t>
5733      <eref target=""/>:
5734      "OPTIONS * and proxies"
5735    </t>
5736    <t>
5737      <eref target=""/>:
5738      "MIME-Version not listed in P1, general header fields"
5739    </t>
5740    <t>
5741      <eref target=""/>:
5742      "IANA registry for content/transfer encodings"
5743    </t>
5744    <t>
5745      <eref target=""/>:
5746      "Case-sensitivity of HTTP-date"
5747    </t>
5748    <t>
5749      <eref target=""/>:
5750      "use of term "word" when talking about header structure"
5751    </t>
5752  </list>
5755  Partly resolved issues:
5756  <list style="symbols">
5757    <t>
5758      <eref target=""/>:
5759      "Term for the requested resource's URI"
5760    </t>
5761  </list>
5765<section title="Since draft-ietf-httpbis-p1-messaging-10" anchor="changes.since.10">
5767  Closed issues:
5768  <list style="symbols">
5769    <t>
5770      <eref target=""/>:
5771      "Connection Closing"
5772    </t>
5773    <t>
5774      <eref target=""/>:
5775      "Delimiting messages with multipart/byteranges"
5776    </t>
5777    <t>
5778      <eref target=""/>:
5779      "Handling multiple Content-Length headers"
5780    </t>
5781    <t>
5782      <eref target=""/>:
5783      "Clarify entity / representation / variant terminology"
5784    </t>
5785    <t>
5786      <eref target=""/>:
5787      "consider removing the 'changes from 2068' sections"
5788    </t>
5789  </list>
5792  Partly resolved issues:
5793  <list style="symbols">
5794    <t>
5795      <eref target=""/>:
5796      "HTTP(s) URI scheme definitions"
5797    </t>
5798  </list>
5802<section title="Since draft-ietf-httpbis-p1-messaging-11" anchor="changes.since.11">
5804  Closed issues:
5805  <list style="symbols">
5806    <t>
5807      <eref target=""/>:
5808      "Trailer requirements"
5809    </t>
5810    <t>
5811      <eref target=""/>:
5812      "Text about clock requirement for caches belongs in p6"
5813    </t>
5814    <t>
5815      <eref target=""/>:
5816      "effective request URI: handling of missing host in HTTP/1.0"
5817    </t>
5818    <t>
5819      <eref target=""/>:
5820      "confusing Date requirements for clients"
5821    </t>
5822  </list>
5825  Partly resolved issues:
5826  <list style="symbols">
5827    <t>
5828      <eref target=""/>:
5829      "Handling multiple Content-Length headers"
5830    </t>
5831  </list>
5835<section title="Since draft-ietf-httpbis-p1-messaging-12" anchor="changes.since.12">
5837  Closed issues:
5838  <list style="symbols">
5839    <t>
5840      <eref target=""/>:
5841      "RFC2145 Normative"
5842    </t>
5843    <t>
5844      <eref target=""/>:
5845      "HTTP(s) URI scheme definitions" (tune the requirements on userinfo)
5846    </t>
5847    <t>
5848      <eref target=""/>:
5849      "define 'transparent' proxy"
5850    </t>
5851    <t>
5852      <eref target=""/>:
5853      "Header Classification"
5854    </t>
5855    <t>
5856      <eref target=""/>:
5857      "Is * usable as a request-uri for new methods?"
5858    </t>
5859    <t>
5860      <eref target=""/>:
5861      "Migrate Upgrade details from RFC2817"
5862    </t>
5863    <t>
5864      <eref target=""/>:
5865      "untangle ABNFs for header fields"
5866    </t>
5867    <t>
5868      <eref target=""/>:
5869      "update RFC 2109 reference"
5870    </t>
5871  </list>
5875<section title="Since draft-ietf-httpbis-p1-messaging-13" anchor="changes.since.13">
5877  Closed issues:
5878  <list style="symbols">
5879    <t>
5880      <eref target=""/>:
5881      "Allow is not in 13.5.2"
5882    </t>
5883    <t>
5884      <eref target=""/>:
5885      "untangle ABNFs for header fields"
5886    </t>
5887    <t>
5888      <eref target=""/>:
5889      "Content-Length ABNF broken"
5890    </t>
5891  </list>
5895<section title="Since draft-ietf-httpbis-p1-messaging-14" anchor="changes.since.14">
5897  None yet.
Note: See TracBrowser for help on using the repository browser.