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

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

Finish work on message routing by cleaning up the process of determining
an effective request URI and removing the now redundant old stuff about
"The Resource Identified by a Request". Related to #222

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