source: draft-ietf-httpbis/21/draft-ietf-httpbis-p1-messaging-21.xml @ 2492

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

prepare release of -21 drafts on Oct 4

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