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

Last change on this file since 1473 was 1472, checked in by julian.reschke@…, 8 years ago

Update to latest version of rfc2629.xslt, add next/prev link relations (does not affect TXT version)

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