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

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

Split connections into forwarding of messages by intermediaries and
connection management (relocations and minor wording additions only).
Move definition of Connection, Via, and Upgrade into connection management.
Related to #284.

Remove miscellaneous notes and now-empty header field section.

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