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

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

Move Host header field to Message Routing

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