source: draft-ietf-httpbis/25/draft-ietf-httpbis-p1-messaging-25.xml

Last change on this file was 2495, checked in by julian.reschke@…, 7 years ago

prepare publication of -25 drafts on 2013-11-17

  • Property svn:mime-type set to text/xml
File size: 219.7 KB
1<?xml version="1.0" encoding="UTF-8"?>
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.
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,2818" category="std" ipr="pre5378Trust200902" docName="draft-ietf-httpbis-p1-messaging-25">
24  <title abbrev="HTTP/1.1 Message Syntax and Routing">Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
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></email>
37      <uri></uri>
38    </address>
39  </author>
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></email>
50      <uri></uri>
51    </address>
52  </author>
54  <date month="November" year="2013" day="17"/>
55  <workgroup>HTTPbis Working Group</workgroup>
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.
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 (, which is archived at
73    <eref target=""/>.
74  </t>
75  <t>
76    The current issues list is at
77    <eref target=""/> and related
78    documents (including fancy diffs) can be found at
79    <eref target=""/>.
80  </t>
81  <t>
82    The changes in this draft are summarized in <xref target="changes.since.24"/>.
83  </t>
87<section title="Introduction" anchor="introduction">
89   The Hypertext Transfer Protocol (HTTP) is an application-level
90   request/response protocol that uses extensible semantics and self-descriptive
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>
104   This HTTP/1.1 specification obsoletes and moves to historic status
105   RFC 2616, its predecessor
106   RFC 2068, and
107   RFC 2145 (on HTTP versioning).
108   This specification also updates the use of CONNECT to establish a tunnel,
109   previously defined in RFC 2817,
110   and defines the "https" URI scheme that was described informally in
111   RFC 2818.
114   HTTP is a generic interface protocol for information systems. It is
115   designed to hide the details of how a service is implemented by presenting
116   a uniform interface to clients that is independent of the types of
117   resources provided. Likewise, servers do not need to be aware of each
118   client's purpose: an HTTP request can be considered in isolation rather
119   than being associated with a specific type of client or a predetermined
120   sequence of application steps. The result is a protocol that can be used
121   effectively in many different contexts and for which implementations can
122   evolve independently over time.
125   HTTP is also designed for use as an intermediation protocol for translating
126   communication to and from non-HTTP information systems.
127   HTTP proxies and gateways can provide access to alternative information
128   services by translating their diverse protocols into a hypertext
129   format that can be viewed and manipulated by clients in the same way
130   as HTTP services.
133   One consequence of this flexibility is that the protocol cannot be
134   defined in terms of what occurs behind the interface. Instead, we
135   are limited to defining the syntax of communication, the intent
136   of received communication, and the expected behavior of recipients.
137   If the communication is considered in isolation, then successful
138   actions ought to be reflected in corresponding changes to the
139   observable interface provided by servers. However, since multiple
140   clients might act in parallel and perhaps at cross-purposes, we
141   cannot require that such changes be observable beyond the scope
142   of a single response.
145   This document describes the architectural elements that are used or
146   referred to in HTTP, defines the "http" and "https" URI schemes,
147   describes overall network operation and connection management,
148   and defines HTTP message framing and forwarding requirements.
149   Our goal is to define all of the mechanisms necessary for HTTP message
150   handling that are independent of message semantics, thereby defining the
151   complete set of requirements for message parsers and
152   message-forwarding intermediaries.
156<section title="Requirement Notation" anchor="intro.requirements">
158   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
159   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
160   document are to be interpreted as described in <xref target="RFC2119"/>.
163   Conformance criteria and considerations regarding error handling
164   are defined in <xref target="conformance"/>.
168<section title="Syntax Notation" anchor="notation">
169<iref primary="true" item="Grammar" subitem="ALPHA"/>
170<iref primary="true" item="Grammar" subitem="CR"/>
171<iref primary="true" item="Grammar" subitem="CRLF"/>
172<iref primary="true" item="Grammar" subitem="CTL"/>
173<iref primary="true" item="Grammar" subitem="DIGIT"/>
174<iref primary="true" item="Grammar" subitem="DQUOTE"/>
175<iref primary="true" item="Grammar" subitem="HEXDIG"/>
176<iref primary="true" item="Grammar" subitem="HTAB"/>
177<iref primary="true" item="Grammar" subitem="LF"/>
178<iref primary="true" item="Grammar" subitem="OCTET"/>
179<iref primary="true" item="Grammar" subitem="SP"/>
180<iref primary="true" item="Grammar" subitem="VCHAR"/>
182   This specification uses the Augmented Backus-Naur Form (ABNF) notation
183   of <xref target="RFC5234"/> with the list rule extension defined in
184   <xref target="abnf.extension"/>.  <xref target="collected.abnf"/> shows
185   the collected ABNF with the list rule expanded.
187<t anchor="core.rules">
200   The following core rules are included by
201   reference, as defined in <xref target="RFC5234"/>, Appendix B.1:
202   ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls),
203   DIGIT (decimal 0-9), DQUOTE (double quote),
204   HEXDIG (hexadecimal 0-9/A-F/a-f), HTAB (horizontal tab), LF (line feed),
205   OCTET (any 8-bit sequence of data), SP (space), and
206   VCHAR (any visible <xref target="USASCII"/> character).
209   As a convention, ABNF rule names prefixed with "obs-" denote
210   "obsolete" grammar rules that appear for historical reasons.
215<section title="Architecture" anchor="architecture">
217   HTTP was created for the World Wide Web architecture
218   and has evolved over time to support the scalability needs of a worldwide
219   hypertext system. Much of that architecture is reflected in the terminology
220   and syntax productions used to define HTTP.
223<section title="Client/Server Messaging" anchor="operation">
224<iref primary="true" item="client"/>
225<iref primary="true" item="server"/>
226<iref primary="true" item="connection"/>
228   HTTP is a stateless request/response protocol that operates by exchanging
229   messages (<xref target="http.message"/>) across a reliable
230   transport or session-layer
231   "connection" (<xref target=""/>).
232   An HTTP "client" is a program that establishes a connection
233   to a server for the purpose of sending one or more HTTP requests.
234   An HTTP "server" is a program that accepts connections
235   in order to service HTTP requests by sending HTTP responses.
237<iref primary="true" item="user agent"/>
238<iref primary="true" item="origin server"/>
239<iref primary="true" item="browser"/>
240<iref primary="true" item="spider"/>
241<iref primary="true" item="sender"/>
242<iref primary="true" item="recipient"/>
244   The terms client and server refer only to the roles that
245   these programs perform for a particular connection.  The same program
246   might act as a client on some connections and a server on others.
247   We use the term "user agent" to refer to any of the various
248   client programs that initiate a request, including (but not limited to)
249   browsers, spiders (web-based robots), command-line tools, native
250   applications, and mobile apps.  The term "origin server" is
251   used to refer to the program that can originate authoritative responses to
252   a request. For general requirements, we use the terms
253   "sender" and "recipient" to refer to any
254   component that sends or receives, respectively, a given message.
257   HTTP relies upon the Uniform Resource Identifier (URI)
258   standard <xref target="RFC3986"/> to indicate the target resource
259   (<xref target="target-resource"/>) and relationships between resources.
260   Messages are passed in a format similar to that used by Internet mail
261   <xref target="RFC5322"/> and the Multipurpose Internet Mail Extensions
262   (MIME) <xref target="RFC2045"/> (see Appendix A of <xref target="Part2"/> for the differences
263   between HTTP and MIME messages).
266   Most HTTP communication consists of a retrieval request (GET) for
267   a representation of some resource identified by a URI.  In the
268   simplest case, this might be accomplished via a single bidirectional
269   connection (===) between the user agent (UA) and the origin server (O).
271<figure><artwork type="drawing"><![CDATA[
272         request   >
273    UA ======================================= O
274                                <   response
276<iref primary="true" item="message"/>
277<iref primary="true" item="request"/>
278<iref primary="true" item="response"/>
280   A client sends an HTTP request to a server in the form of a request
281   message, beginning with a request-line that includes a method, URI, and
282   protocol version (<xref target="request.line"/>),
283   followed by header fields containing
284   request modifiers, client information, and representation metadata
285   (<xref target="header.fields"/>),
286   an empty line to indicate the end of the header section, and finally
287   a message body containing the payload body (if any,
288   <xref target="message.body"/>).
291   A server responds to a client's request by sending one or more HTTP
292   response
293   messages, each beginning with a status line that
294   includes the protocol version, a success or error code, and textual
295   reason phrase (<xref target="status.line"/>),
296   possibly followed by header fields containing server
297   information, resource metadata, and representation metadata
298   (<xref target="header.fields"/>),
299   an empty line to indicate the end of the header section, and finally
300   a message body containing the payload body (if any,
301   <xref target="message.body"/>).
304   A connection might be used for multiple request/response exchanges,
305   as defined in <xref target="persistent.connections"/>.
308   The following example illustrates a typical message exchange for a
309   GET request on the URI "":
312Client request:
313</preamble><artwork type="message/http; msgtype=&#34;request&#34;"><![CDATA[
314  GET /hello.txt HTTP/1.1
315  User-Agent: curl/7.16.3 libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3
316  Host:
317  Accept-Language: en, mi
319  ]]></artwork></figure>
321Server response:
322</preamble><artwork type="message/http; msgtype=&#34;response&#34;"><![CDATA[
323  HTTP/1.1 200 OK
324  Date: Mon, 27 Jul 2009 12:28:53 GMT
325  Server: Apache
326  Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT
327  ETag: "34aa387-d-1568eb00"
328  Accept-Ranges: bytes
329  Content-Length: 51
330  Vary: Accept-Encoding
331  Content-Type: text/plain
333  Hello World! My payload includes a trailing CRLF.
334  ]]></artwork>
338<section title="Implementation Diversity" anchor="implementation-diversity">
340   When considering the design of HTTP, it is easy to fall into a trap of
341   thinking that all user agents are general-purpose browsers and all origin
342   servers are large public websites. That is not the case in practice.
343   Common HTTP user agents include household appliances, stereos, scales,
344   firmware update scripts, command-line programs, mobile apps,
345   and communication devices in a multitude of shapes and sizes.  Likewise,
346   common HTTP origin servers include home automation units, configurable
347   networking components, office machines, autonomous robots, news feeds,
348   traffic cameras, ad selectors, and video delivery platforms.
351   The term "user agent" does not imply that there is a human user directly
352   interacting with the software agent at the time of a request. In many
353   cases, a user agent is installed or configured to run in the background
354   and save its results for later inspection (or save only a subset of those
355   results that might be interesting or erroneous). Spiders, for example, are
356   typically given a start URI and configured to follow certain behavior while
357   crawling the Web as a hypertext graph.
360   The implementation diversity of HTTP means that we cannot assume the
361   user agent can make interactive suggestions to a user or provide adequate
362   warning for security or privacy options.  In the few cases where this
363   specification requires reporting of errors to the user, it is acceptable
364   for such reporting to only be observable in an error console or log file.
365   Likewise, requirements that an automated action be confirmed by the user
366   before proceeding might be met via advance configuration choices,
367   run-time options, or simple avoidance of the unsafe action; confirmation
368   does not imply any specific user interface or interruption of normal
369   processing if the user has already made that choice.
373<section title="Intermediaries" anchor="intermediaries">
374<iref primary="true" item="intermediary"/>
376   HTTP enables the use of intermediaries to satisfy requests through
377   a chain of connections.  There are three common forms of HTTP
378   intermediary: proxy, gateway, and tunnel.  In some cases,
379   a single intermediary might act as an origin server, proxy, gateway,
380   or tunnel, switching behavior based on the nature of each request.
382<figure><artwork type="drawing"><![CDATA[
383         >             >             >             >
384    UA =========== A =========== B =========== C =========== O
385               <             <             <             <
388   The figure above shows three intermediaries (A, B, and C) between the
389   user agent and origin server. A request or response message that
390   travels the whole chain will pass through four separate connections.
391   Some HTTP communication options
392   might apply only to the connection with the nearest, non-tunnel
393   neighbor, only to the end-points of the chain, or to all connections
394   along the chain. Although the diagram is linear, each participant might
395   be engaged in multiple, simultaneous communications. For example, B
396   might be receiving requests from many clients other than A, and/or
397   forwarding requests to servers other than C, at the same time that it
398   is handling A's request. Likewise, later requests might be sent through a
399   different path of connections, often based on dynamic configuration for
400   load balancing.   
403<iref primary="true" item="upstream"/><iref primary="true" item="downstream"/>
404<iref primary="true" item="inbound"/><iref primary="true" item="outbound"/>
405   We use the terms "upstream" and "downstream"
406   to describe various requirements in relation to the directional flow of a
407   message: all messages flow from upstream to downstream.
408   Likewise, we use the terms inbound and outbound to refer to
409   directions in relation to the request path:
410   "inbound" means toward the origin server and
411   "outbound" means toward the user agent.
413<t><iref primary="true" item="proxy"/>
414   A "proxy" is a message forwarding agent that is selected by the
415   client, usually via local configuration rules, to receive requests
416   for some type(s) of absolute URI and attempt to satisfy those
417   requests via translation through the HTTP interface.  Some translations
418   are minimal, such as for proxy requests for "http" URIs, whereas
419   other requests might require translation to and from entirely different
420   application-level protocols. Proxies are often used to group an
421   organization's HTTP requests through a common intermediary for the
422   sake of security, annotation services, or shared caching.
425<iref primary="true" item="transforming proxy"/>
426<iref primary="true" item="non-transforming proxy"/>
427   An HTTP-to-HTTP proxy is called a "transforming proxy" if it is designed
428   or configured to modify request or response messages in a semantically
429   meaningful way (i.e., modifications, beyond those required by normal
430   HTTP processing, that change the message in a way that would be
431   significant to the original sender or potentially significant to
432   downstream recipients).  For example, a transforming proxy might be
433   acting as a shared annotation server (modifying responses to include
434   references to a local annotation database), a malware filter, a
435   format transcoder, or an intranet-to-Internet privacy filter.  Such
436   transformations are presumed to be desired by the client (or client
437   organization) that selected the proxy and are beyond the scope of
438   this specification.  However, when a proxy is not intended to transform
439   a given message, we use the term "non-transforming proxy" to target
440   requirements that preserve HTTP message semantics. See Section 6.3.4 of <xref target="Part2"/> and
441   Section 5.5 of <xref target="Part6"/> for status and warning codes related to transformations.
443<t><iref primary="true" item="gateway"/><iref primary="true" item="reverse proxy"/>
444<iref primary="true" item="accelerator"/>
445   A "gateway" (a.k.a., "reverse proxy") is an
446   intermediary that acts as an origin server for the outbound connection, but
447   translates received requests and forwards them inbound to another server or
448   servers. Gateways are often used to encapsulate legacy or untrusted
449   information services, to improve server performance through
450   "accelerator" caching, and to enable partitioning or load
451   balancing of HTTP services across multiple machines.
454   All HTTP requirements applicable to an origin server
455   also apply to the outbound communication of a gateway.
456   A gateway communicates with inbound servers using any protocol that
457   it desires, including private extensions to HTTP that are outside
458   the scope of this specification.  However, an HTTP-to-HTTP gateway
459   that wishes to interoperate with third-party HTTP servers ought to conform
460   to user agent requirements on the gateway's inbound connection.
462<t><iref primary="true" item="tunnel"/>
463   A "tunnel" acts as a blind relay between two connections
464   without changing the messages. Once active, a tunnel is not
465   considered a party to the HTTP communication, though the tunnel might
466   have been initiated by an HTTP request. A tunnel ceases to exist when
467   both ends of the relayed connection are closed. Tunnels are used to
468   extend a virtual connection through an intermediary, such as when
469   Transport Layer Security (TLS, <xref target="RFC5246"/>) is used to
470   establish confidential communication through a shared firewall proxy.
472<t><iref primary="true" item="interception proxy"/>
473<iref primary="true" item="transparent proxy"/>
474<iref primary="true" item="captive portal"/>
475   The above categories for intermediary only consider those acting as
476   participants in the HTTP communication.  There are also intermediaries
477   that can act on lower layers of the network protocol stack, filtering or
478   redirecting HTTP traffic without the knowledge or permission of message
479   senders. Network intermediaries often introduce security flaws or
480   interoperability problems by violating HTTP semantics.  For example, an
481   "interception proxy" <xref target="RFC3040"/> (also commonly
482   known as a "transparent proxy" <xref target="RFC1919"/> or
483   "captive portal")
484   differs from an HTTP proxy because it is not selected by the client.
485   Instead, an interception proxy filters or redirects outgoing TCP port 80
486   packets (and occasionally other common port traffic).
487   Interception proxies are commonly found on public network access points,
488   as a means of enforcing account subscription prior to allowing use of
489   non-local Internet services, and within corporate firewalls to enforce
490   network usage policies.
491   They are indistinguishable from a man-in-the-middle attack.
494   HTTP is defined as a stateless protocol, meaning that each request message
495   can be understood in isolation.  Many implementations depend on HTTP's
496   stateless design in order to reuse proxied connections or dynamically
497   load-balance requests across multiple servers.  Hence, a server MUST NOT
498   assume that two requests on the same connection are from the same user
499   agent unless the connection is secured and specific to that agent.
500   Some non-standard HTTP extensions (e.g., <xref target="RFC4559"/>) have
501   been known to violate this requirement, resulting in security and
502   interoperability problems.
506<section title="Caches" anchor="caches">
507<iref primary="true" item="cache"/>
509   A "cache" is a local store of previous response messages and the
510   subsystem that controls its message storage, retrieval, and deletion.
511   A cache stores cacheable responses in order to reduce the response
512   time and network bandwidth consumption on future, equivalent
513   requests. Any client or server MAY employ a cache, though a cache
514   cannot be used by a server while it is acting as a tunnel.
517   The effect of a cache is that the request/response chain is shortened
518   if one of the participants along the chain has a cached response
519   applicable to that request. The following illustrates the resulting
520   chain if B has a cached copy of an earlier response from O (via C)
521   for a request that has not been cached by UA or A.
523<figure><artwork type="drawing"><![CDATA[
524            >             >
525       UA =========== A =========== B - - - - - - C - - - - - - O
526                  <             <
528<t><iref primary="true" item="cacheable"/>
529   A response is "cacheable" if a cache is allowed to store a copy of
530   the response message for use in answering subsequent requests.
531   Even when a response is cacheable, there might be additional
532   constraints placed by the client or by the origin server on when
533   that cached response can be used for a particular request. HTTP
534   requirements for cache behavior and cacheable responses are
535   defined in Section 2 of <xref target="Part6"/>. 
538   There are a wide variety of architectures and configurations
539   of caches deployed across the World Wide Web and
540   inside large organizations. These include national hierarchies
541   of proxy caches to save transoceanic bandwidth, collaborative systems that
542   broadcast or multicast cache entries, archives of pre-fetched cache
543   entries for use in off-line or high-latency environments, and so on.
547<section title="Conformance and Error Handling" anchor="conformance">
549   This specification targets conformance criteria according to the role of
550   a participant in HTTP communication.  Hence, HTTP requirements are placed
551   on senders, recipients, clients, servers, user agents, intermediaries,
552   origin servers, proxies, gateways, or caches, depending on what behavior
553   is being constrained by the requirement. Additional (social) requirements
554   are placed on implementations, resource owners, and protocol element
555   registrations when they apply beyond the scope of a single communication.
558   The verb "generate" is used instead of "send" where a requirement
559   differentiates between creating a protocol element and merely forwarding a
560   received element downstream.
563   An implementation is considered conformant if it complies with all of the
564   requirements associated with the roles it partakes in HTTP.
567   Conformance includes both the syntax and semantics of 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   corresponding ABNF rules. Within a given message, a sender MUST NOT
572   generate protocol elements or syntax alternatives that are only allowed to
573   be generated by participants in other roles (i.e., a role that the sender
574   does not have for that message).
577   When a received protocol element is parsed, the recipient MUST be able to
578   parse any value of reasonable length that is applicable to the recipient's
579   role and matches the grammar defined by the corresponding ABNF rules.
580   Note, however, that some received protocol elements might not be parsed.
581   For example, an intermediary forwarding a message might parse a
582   header-field into generic field-name and field-value components, but then
583   forward the header field without further parsing inside the field-value.
586   HTTP does not have specific length limitations for many of its protocol
587   elements because the lengths that might be appropriate will vary widely,
588   depending on the deployment context and purpose of the implementation.
589   Hence, interoperability between senders and recipients depends on shared
590   expectations regarding what is a reasonable length for each protocol
591   element. Furthermore, what is commonly understood to be a reasonable length
592   for some protocol elements has changed over the course of the past two
593   decades of HTTP use, and is expected to continue changing in the future.
596   At a minimum, a recipient MUST be able to parse and process protocol
597   element lengths that are at least as long as the values that it generates
598   for those same protocol elements in other messages. For example, an origin
599   server that publishes very long URI references to its own resources needs
600   to be able to parse and process those same references when received as a
601   request target.
604   A recipient MUST interpret a received protocol element according to the
605   semantics defined for it by this specification, including extensions to
606   this specification, unless the recipient has determined (through experience
607   or configuration) that the sender incorrectly implements what is implied by
608   those semantics.
609   For example, an origin server might disregard the contents of a received
610   Accept-Encoding header field if inspection of the
611   User-Agent header field indicates a specific implementation
612   version that is known to fail on receipt of certain content codings.
615   Unless noted otherwise, a recipient MAY attempt to recover a usable
616   protocol element from an invalid construct.  HTTP does not define
617   specific error handling mechanisms except when they have a direct impact
618   on security, since different applications of the protocol require
619   different error handling strategies.  For example, a Web browser might
620   wish to transparently recover from a response where the
621   Location header field doesn't parse according to the ABNF,
622   whereas a systems control client might consider any form of error recovery
623   to be dangerous.
627<section title="Protocol Versioning" anchor="http.version">
631   HTTP uses a "&lt;major&gt;.&lt;minor&gt;" numbering scheme to indicate
632   versions of the protocol. This specification defines version "1.1".
633   The protocol version as a whole indicates the sender's conformance
634   with the set of requirements laid out in that version's corresponding
635   specification of HTTP.
638   The version of an HTTP message is indicated by an HTTP-version field
639   in the first line of the message. HTTP-version is case-sensitive.
641<figure><iref primary="true" item="Grammar" subitem="HTTP-version"/><iref primary="true" item="Grammar" subitem="HTTP-name"/><artwork type="abnf2616"><![CDATA[
642  HTTP-version  = HTTP-name "/" DIGIT "." DIGIT
643  HTTP-name     = %x48.54.54.50 ; "HTTP", case-sensitive
646   The HTTP version number consists of two decimal digits separated by a "."
647   (period or decimal point).  The first digit ("major version") indicates the
648   HTTP messaging syntax, whereas the second digit ("minor version") indicates
649   the highest minor version within that major version to which the sender is
650   conformant and able to understand for future communication.  The minor
651   version advertises the sender's communication capabilities even when the
652   sender is only using a backwards-compatible subset of the protocol,
653   thereby letting the recipient know that more advanced features can
654   be used in response (by servers) or in future requests (by clients).
657   When an HTTP/1.1 message is sent to an HTTP/1.0 recipient
658   <xref target="RFC1945"/> or a recipient whose version is unknown,
659   the HTTP/1.1 message is constructed such that it can be interpreted
660   as a valid HTTP/1.0 message if all of the newer features are ignored.
661   This specification places recipient-version requirements on some
662   new features so that a conformant sender will only use compatible
663   features until it has determined, through configuration or the
664   receipt of a message, that the recipient supports HTTP/1.1.
667   The interpretation of a header field does not change between minor
668   versions of the same major HTTP version, though the default
669   behavior of a recipient in the absence of such a field can change.
670   Unless specified otherwise, header fields defined in HTTP/1.1 are
671   defined for all versions of HTTP/1.x.  In particular, the <xref target="" format="none">Host</xref>
672   and <xref target="header.connection" format="none">Connection</xref> header fields ought to be implemented by all
673   HTTP/1.x implementations whether or not they advertise conformance with
674   HTTP/1.1.
677   New header fields can be introduced without changing the protocol version
678   if their defined semantics allow them to be safely ignored by recipients
679   that do not recognize them. Header field extensibility is discussed in
680   <xref target="field.extensibility"/>.
683   Intermediaries that process HTTP messages (i.e., all intermediaries
684   other than those acting as tunnels) MUST send their own HTTP-version
685   in forwarded messages.  In other words, they are not allowed to blindly
686   forward the first line of an HTTP message without ensuring that the
687   protocol version in that message matches a version to which that
688   intermediary is conformant for both the receiving and
689   sending of messages.  Forwarding an HTTP message without rewriting
690   the HTTP-version might result in communication errors when downstream
691   recipients use the message sender's version to determine what features
692   are safe to use for later communication with that sender.
695   A client SHOULD send a request version equal to the highest
696   version to which the client is conformant and
697   whose major version is no higher than the highest version supported
698   by the server, if this is known.  A client MUST NOT send a
699   version to which it is not conformant.
702   A client MAY send a lower request version if it is known that
703   the server incorrectly implements the HTTP specification, but only
704   after the client has attempted at least one normal request and determined
705   from the response status code or header fields (e.g., Server) that
706   the server improperly handles higher request versions.
709   A server SHOULD send a response version equal to the highest version to
710   which the server is conformant that has a major version less than or equal
711   to the one received in the request.
712   A server MUST NOT send a version to which it is not conformant.
713   A server can send a 505 (HTTP Version Not Supported)
714   response if it wishes, for any reason, to refuse service of the client's
715   major protocol version.
718   A server MAY send an HTTP/1.0 response to a request
719   if it is known or suspected that the client incorrectly implements the
720   HTTP specification and is incapable of correctly processing later
721   version responses, such as when a client fails to parse the version
722   number correctly or when an intermediary is known to blindly forward
723   the HTTP-version even when it doesn't conform to the given minor
724   version of the protocol. Such protocol downgrades SHOULD NOT be
725   performed unless triggered by specific client attributes, such as when
726   one or more of the request header fields (e.g., User-Agent)
727   uniquely match the values sent by a client known to be in error.
730   The intention of HTTP's versioning design is that the major number
731   will only be incremented if an incompatible message syntax is
732   introduced, and that the minor number will only be incremented when
733   changes made to the protocol have the effect of adding to the message
734   semantics or implying additional capabilities of the sender.  However,
735   the minor version was not incremented for the changes introduced between
736   <xref target="RFC2068"/> and <xref target="RFC2616"/>, and this revision
737   has specifically avoided any such changes to the protocol.
740   When an HTTP message is received with a major version number that the
741   recipient implements, but a higher minor version number than what the
742   recipient implements, the recipient SHOULD process the message as if it
743   were in the highest minor version within that major version to which the
744   recipient is conformant. A recipient can assume that a message with a
745   higher minor version, when sent to a recipient that has not yet indicated
746   support for that higher version, is sufficiently backwards-compatible to be
747   safely processed by any implementation of the same major version.
751<section title="Uniform Resource Identifiers" anchor="uri">
752<iref primary="true" item="resource"/>
754   Uniform Resource Identifiers (URIs) <xref target="RFC3986"/> are used
755   throughout HTTP as the means for identifying resources (Section 2 of <xref target="Part2"/>).
756   URI references are used to target requests, indicate redirects, and define
757   relationships.
772   This specification adopts the definitions of "URI-reference",
773   "absolute-URI", "relative-part", "authority", "port", "host",
774   "path-abempty", "segment", "query", and "fragment" from the
775   URI generic syntax.
776   In addition, we define an "absolute-path" rule (that differs from
777   RFC 3986's "path-absolute" in that it allows a leading "//")
778   and a "partial-URI" rule for protocol elements
779   that allow a relative URI but not a fragment.
781<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="absolute-path"/><iref primary="true" item="Grammar" subitem="port"/><iref primary="true" item="Grammar" subitem="query"/><iref primary="true" item="Grammar" subitem="fragment"/><iref primary="true" item="Grammar" subitem="segment"/><iref primary="true" item="Grammar" subitem="uri-host"/><iref primary="true" item="Grammar" subitem="partial-URI"><!--exported production--></iref><artwork type="abnf2616"><![CDATA[
782  URI-reference = <URI-reference, defined in [RFC3986], Section 4.1>
783  absolute-URI  = <absolute-URI, defined in [RFC3986], Section 4.3>
784  relative-part = <relative-part, defined in [RFC3986], Section 4.2>
785  authority     = <authority, defined in [RFC3986], Section 3.2>
786  uri-host      = <host, defined in [RFC3986], Section 3.2.2>
787  port          = <port, defined in [RFC3986], Section 3.2.3>
788  path-abempty  = <path-abempty, defined in [RFC3986], Section 3.3>
789  segment       = <segment, defined in [RFC3986], Section 3.3>
790  query         = <query, defined in [RFC3986], Section 3.4>
791  fragment      = <fragment, defined in [RFC3986], Section 3.5>
793  absolute-path = 1*( "/" segment )
794  partial-URI   = relative-part [ "?" query ]
797   Each protocol element in HTTP that allows a URI reference will indicate
798   in its ABNF production whether the element allows any form of reference
799   (URI-reference), only a URI in absolute form (absolute-URI), only the
800   path and optional query components, or some combination of the above.
801   Unless otherwise indicated, URI references are parsed
802   relative to the effective request URI
803   (<xref target="effective.request.uri"/>).
806<section title="http URI scheme" anchor="http.uri">
808  <iref item="http URI scheme" primary="true"/>
809  <iref item="URI scheme" subitem="http" primary="true"/>
811   The "http" URI scheme is hereby defined for the purpose of minting
812   identifiers according to their association with the hierarchical
813   namespace governed by a potential HTTP origin server listening for
814   TCP (<xref target="RFC0793"/>) connections on a given port.
816<figure><iref primary="true" item="Grammar" subitem="http-URI"><!--terminal production--></iref><artwork type="abnf2616"><![CDATA[
817  http-URI = "http:" "//" authority path-abempty [ "?" query ]
818             [ "#" fragment ]
821   The HTTP origin server is identified by the generic syntax's
822   <xref target="uri" format="none">authority</xref> component, which includes a host identifier
823   and optional TCP port (<xref target="RFC3986"/>, Section 3.2.2).
824   The remainder of the URI, consisting of both the hierarchical path
825   component and optional query component, serves as an identifier for
826   a potential resource within that origin server's name space.
829   A sender MUST NOT generate an "http" URI with an empty host identifier.
830   A recipient that processes such a URI reference MUST reject it as invalid.
833   If the host identifier is provided as an IP address,
834   then the origin server is any listener on the indicated TCP port at
835   that IP address. If host is a registered name, then that name is
836   considered an indirect identifier and the recipient might use a name
837   resolution service, such as DNS, to find the address of a listener
838   for that host.
839   If the port subcomponent is empty or not given, then TCP port 80 is
840   assumed (the default reserved port for WWW services).
843   Regardless of the form of host identifier, access to that host is not
844   implied by the mere presence of its name or address. The host might or might
845   not exist and, even when it does exist, might or might not be running an
846   HTTP server or listening to the indicated port. The "http" URI scheme
847   makes use of the delegated nature of Internet names and addresses to
848   establish a naming authority (whatever entity has the ability to place
849   an HTTP server at that Internet name or address) and allows that
850   authority to determine which names are valid and how they might be used.
853   When an "http" URI is used within a context that calls for access to the
854   indicated resource, a client MAY attempt access by resolving
855   the host to an IP address, establishing a TCP connection to that address
856   on the indicated port, and sending an HTTP request message
857   (<xref target="http.message"/>) containing the URI's identifying data
858   (<xref target="message.routing"/>) to the server.
859   If the server responds to that request with a non-interim HTTP response
860   message, as described in Section 6 of <xref target="Part2"/>, then that response
861   is considered an authoritative answer to the client's request.
864   Although HTTP is independent of the transport protocol, the "http"
865   scheme is specific to TCP-based services because the name delegation
866   process depends on TCP for establishing authority.
867   An HTTP service based on some other underlying connection protocol
868   would presumably be identified using a different URI scheme, just as
869   the "https" scheme (below) is used for resources that require an
870   end-to-end secured connection. Other protocols might also be used to
871   provide access to "http" identified resources — it is only the
872   authoritative interface that is specific to TCP.
875   The URI generic syntax for authority also includes a deprecated
876   userinfo subcomponent (<xref target="RFC3986"/>, Section 3.2.1)
877   for including user authentication information in the URI.  Some
878   implementations make use of the userinfo component for internal
879   configuration of authentication information, such as within command
880   invocation options, configuration files, or bookmark lists, even
881   though such usage might expose a user identifier or password.
882   A sender MUST NOT generate the userinfo subcomponent (and its "@"
883   delimiter) when an "http" URI reference is generated within a message as a
884   request target or header field value.
885   Before making use of an "http" URI reference received from an untrusted
886   source, a recipient ought to parse for userinfo and treat its presence as
887   an error; it is likely being used to obscure the authority for the sake of
888   phishing attacks.
892<section title="https URI scheme" anchor="https.uri">
894   <iref item="https URI scheme"/>
895   <iref item="URI scheme" subitem="https"/>
897   The "https" URI scheme is hereby defined for the purpose of minting
898   identifiers according to their association with the hierarchical
899   namespace governed by a potential HTTP origin server listening to a
900   given TCP port for TLS-secured connections
901   (<xref target="RFC0793"/>, <xref target="RFC5246"/>).
904   All of the requirements listed above for the "http" scheme are also
905   requirements for the "https" scheme, except that a default TCP port
906   of 443 is assumed if the port subcomponent is empty or not given,
907   and the user agent MUST ensure that its connection to the origin
908   server is secured through the use of strong encryption, end-to-end,
909   prior to sending the first HTTP request.
911<figure><iref primary="true" item="Grammar" subitem="https-URI"><!--terminal production--></iref><artwork type="abnf2616"><![CDATA[
912  https-URI = "https:" "//" authority path-abempty [ "?" query ]
913              [ "#" fragment ]
916   Note that the "https" URI scheme depends on both TLS and TCP for
917   establishing authority.
918   Resources made available via the "https" scheme have no shared
919   identity with the "http" scheme even if their resource identifiers
920   indicate the same authority (the same host listening to the same
921   TCP port).  They are distinct name spaces and are considered to be
922   distinct origin servers.  However, an extension to HTTP that is
923   defined to apply to entire host domains, such as the Cookie protocol
924   <xref target="RFC6265"/>, can allow information
925   set by one service to impact communication with other services
926   within a matching group of host domains.
929   The process for authoritative access to an "https" identified
930   resource is defined in <xref target="RFC2818"/>.
934<section title="http and https URI Normalization and Comparison" anchor="uri.comparison">
936   Since the "http" and "https" schemes conform to the URI generic syntax,
937   such URIs are normalized and compared according to the algorithm defined
938   in <xref target="RFC3986"/>, Section 6, using the defaults
939   described above for each scheme.
942   If the port is equal to the default port for a scheme, the normal form is
943   to omit the port subcomponent. When not being used in absolute form as the
944   request target of an OPTIONS request, an empty path component is equivalent
945   to an absolute path of "/", so the normal form is to provide a path of "/"
946   instead. The scheme and host are case-insensitive and normally provided in
947   lowercase; all other components are compared in a case-sensitive manner.
948   Characters other than those in the "reserved" set are equivalent to their
949   percent-encoded octets (see <xref target="RFC3986"/>, Section 2.1): the normal form is to not encode them.
952   For example, the following three URIs are equivalent:
954<figure><artwork type="example"><![CDATA[
963<section title="Message Format" anchor="http.message">
968<iref item="header section"/>
969<iref item="headers"/>
970<iref item="header field"/>
972   All HTTP/1.1 messages consist of a start-line followed by a sequence of
973   octets in a format similar to the Internet Message Format
974   <xref target="RFC5322"/>: zero or more header fields (collectively
975   referred to as the "headers" or the "header section"), an empty line
976   indicating the end of the header section, and an optional message body.
978<figure><iref primary="true" item="Grammar" subitem="HTTP-message"><!--terminal production--></iref><artwork type="abnf2616"><![CDATA[
979  HTTP-message   = start-line
980                   *( header-field CRLF )
981                   CRLF
982                   [ message-body ]
985   The normal procedure for parsing an HTTP message is to read the
986   start-line into a structure, read each header field into a hash
987   table by field name until the empty line, and then use the parsed
988   data to determine if a message body is expected.  If a message body
989   has been indicated, then it is read as a stream until an amount
990   of octets equal to the message body length is read or the connection
991   is closed.
994   A recipient MUST parse an HTTP message as a sequence of octets in an
995   encoding that is a superset of US-ASCII <xref target="USASCII"/>.
996   Parsing an HTTP message as a stream of Unicode characters, without regard
997   for the specific encoding, creates security vulnerabilities due to the
998   varying ways that string processing libraries handle invalid multibyte
999   character sequences that contain the octet LF (%x0A).  String-based
1000   parsers can only be safely used within protocol elements after the element
1001   has been extracted from the message, such as within a header field-value
1002   after message parsing has delineated the individual fields.
1005   An HTTP message can be parsed as a stream for incremental processing or
1006   forwarding downstream.  However, recipients cannot rely on incremental
1007   delivery of partial messages, since some implementations will buffer or
1008   delay message forwarding for the sake of network efficiency, security
1009   checks, or payload transformations.
1012   A sender MUST NOT send whitespace between the start-line and
1013   the first header field.
1014   A recipient that receives whitespace between the start-line and
1015   the first header field MUST either reject the message as invalid or
1016   consume each whitespace-preceded line without further processing of it
1017   (i.e., ignore the entire line, along with any subsequent lines preceded
1018   by whitespace, until a properly formed header field is received or the
1019   header section is terminated).
1022   The presence of such whitespace in a request
1023   might be an attempt to trick a server into ignoring that field or
1024   processing the line after it as a new request, either of which might
1025   result in a security vulnerability if other implementations within
1026   the request chain interpret the same message differently.
1027   Likewise, the presence of such whitespace in a response might be
1028   ignored by some clients or cause others to cease parsing.
1031<section title="Start Line" anchor="start.line">
1034   An HTTP message can either be a request from client to server or a
1035   response from server to client.  Syntactically, the two types of message
1036   differ only in the start-line, which is either a request-line (for requests)
1037   or a status-line (for responses), and in the algorithm for determining
1038   the length of the message body (<xref target="message.body"/>).
1041   In theory, a client could receive requests and a server could receive
1042   responses, distinguishing them by their different start-line formats,
1043   but in practice servers are implemented to only expect a request
1044   (a response is interpreted as an unknown or invalid request method)
1045   and clients are implemented to only expect a response.
1047<figure><iref primary="true" item="Grammar" subitem="start-line"/><artwork type="abnf2616"><![CDATA[
1048  start-line     = request-line / status-line
1051<section title="Request Line" anchor="request.line">
1055   A request-line begins with a method token, followed by a single
1056   space (SP), the request-target, another single space (SP), the
1057   protocol version, and ending with CRLF.
1059<figure><iref primary="true" item="Grammar" subitem="request-line"/><artwork type="abnf2616"><![CDATA[
1060  request-line   = method SP request-target SP HTTP-version CRLF
1062<iref primary="true" item="method"/>
1063<t anchor="method">
1064   The method token indicates the request method to be performed on the
1065   target resource. The request method is case-sensitive.
1067<figure><iref primary="true" item="Grammar" subitem="method"/><artwork type="abnf2616"><![CDATA[
1068  method         = token
1071   The request methods defined by this specification can be found in
1072   Section 4 of <xref target="Part2"/>, along with information regarding the HTTP method registry
1073   and considerations for defining new methods.
1075<iref item="request-target"/>
1077   The request-target identifies the target resource upon which to apply
1078   the request, as defined in <xref target="request-target"/>.
1081   Recipients typically parse the request-line into its component parts by
1082   splitting on whitespace (see <xref target="message.robustness"/>), since
1083   no whitespace is allowed in the three components.
1084   Unfortunately, some user agents fail to properly encode or exclude
1085   whitespace found in hypertext references, resulting in those disallowed
1086   characters being sent in a request-target.
1089   Recipients of an invalid request-line SHOULD respond with either a
1090   400 (Bad Request) error or a 301 (Moved Permanently)
1091   redirect with the request-target properly encoded.  A recipient SHOULD NOT
1092   attempt to autocorrect and then process the request without a redirect,
1093   since the invalid request-line might be deliberately crafted to bypass
1094   security filters along the request chain.
1097   HTTP does not place a pre-defined limit on the length of a request-line.
1098   A server that receives a method longer than any that it implements
1099   SHOULD respond with a 501 (Not Implemented) status code.
1100   A server ought to be prepared to receive URIs of unbounded length, as
1101   described in <xref target="conformance"/>, and MUST respond with a
1102   414 (URI Too Long) status code if the received
1103   request-target is longer than the server wishes to parse (see Section 6.5.12 of <xref target="Part2"/>).
1106   Various ad-hoc limitations on request-line length are found in practice.
1107   It is RECOMMENDED that all HTTP senders and recipients support, at a
1108   minimum, request-line lengths of 8000 octets.
1112<section title="Status Line" anchor="status.line">
1118   The first line of a response message is the status-line, consisting
1119   of the protocol version, a space (SP), the status code, another space,
1120   a possibly-empty textual phrase describing the status code, and
1121   ending with CRLF.
1123<figure><iref primary="true" item="Grammar" subitem="status-line"/><artwork type="abnf2616"><![CDATA[
1124  status-line = HTTP-version SP status-code SP reason-phrase CRLF
1127   The status-code element is a 3-digit integer code describing the
1128   result of the server's attempt to understand and satisfy the client's
1129   corresponding request. The rest of the response message is to be
1130   interpreted in light of the semantics defined for that status code.
1131   See Section 6 of <xref target="Part2"/> for information about the semantics of status codes,
1132   including the classes of status code (indicated by the first digit),
1133   the status codes defined by this specification, considerations for the
1134   definition of new status codes, and the IANA registry.
1136<figure><iref primary="true" item="Grammar" subitem="status-code"/><artwork type="abnf2616"><![CDATA[
1137  status-code    = 3DIGIT
1140   The reason-phrase element exists for the sole purpose of providing a
1141   textual description associated with the numeric status code, mostly
1142   out of deference to earlier Internet application protocols that were more
1143   frequently used with interactive text clients. A client SHOULD ignore
1144   the reason-phrase content.
1146<figure><iref primary="true" item="Grammar" subitem="reason-phrase"/><artwork type="abnf2616"><![CDATA[
1147  reason-phrase  = *( HTAB / SP / VCHAR / obs-text )
1152<section title="Header Fields" anchor="header.fields">
1159   Each HTTP header field consists of a case-insensitive field name
1160   followed by a colon (":"), optional leading whitespace, the field value,
1161   and optional trailing whitespace.
1163<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[
1164  header-field   = field-name ":" OWS field-value OWS
1165  field-name     = token
1166  field-value    = *( field-content / obs-fold )
1167  field-content  = *( HTAB / SP / VCHAR / obs-text )
1168  obs-fold       = CRLF ( SP / HTAB )
1169                 ; obsolete line folding
1170                 ; see Section 3.2.4
1173   The field-name token labels the corresponding field-value as having the
1174   semantics defined by that header field.  For example, the Date
1175   header field is defined in Section of <xref target="Part2"/> as containing the origination
1176   timestamp for the message in which it appears.
1179<section title="Field Extensibility" anchor="field.extensibility">
1181   Header fields are fully extensible: there is no limit on the
1182   introduction of new field names, each presumably defining new semantics,
1183   nor on the number of header fields used in a given message.  Existing
1184   fields are defined in each part of this specification and in many other
1185   specifications outside the core standard.
1188   New header fields can be defined such that, when they are understood by a
1189   recipient, they might override or enhance the interpretation of previously
1190   defined header fields, define preconditions on request evaluation, or
1191   refine the meaning of responses.
1194   A proxy MUST forward unrecognized header fields unless the
1195   field-name is listed in the <xref target="header.connection" format="none">Connection</xref> header field
1196   (<xref target="header.connection"/>) or the proxy is specifically
1197   configured to block, or otherwise transform, such fields.
1198   Other recipients SHOULD ignore unrecognized header fields.
1199   These requirements allow HTTP's functionality to be enhanced without
1200   requiring prior update of deployed intermediaries.
1203   All defined header fields ought to be registered with IANA in the
1204   Message Header Field Registry, as described in Section 8.3 of <xref target="Part2"/>.
1208<section title="Field Order" anchor="field.order">
1210   The order in which header fields with differing field names are
1211   received is not significant. However, it is "good practice" to send
1212   header fields that contain control data first, such as <xref target="" format="none">Host</xref>
1213   on requests and Date on responses, so that implementations
1214   can decide when not to handle a message as early as possible.  A server
1215   MUST wait until the entire header section is received before interpreting
1216   a request message, since later header fields might include conditionals,
1217   authentication credentials, or deliberately misleading duplicate
1218   header fields that would impact request processing.
1221   A sender MUST NOT generate multiple header fields with the same field
1222   name in a message unless either the entire field value for that
1223   header field is defined as a comma-separated list [i.e., #(values)]
1224   or the header field is a well-known exception (as noted below).
1227   A recipient MAY combine multiple header fields with the same field name
1228   into one "field-name: field-value" pair, without changing the semantics of
1229   the message, by appending each subsequent field value to the combined
1230   field value in order, separated by a comma. The order in which
1231   header fields with the same field name are received is therefore
1232   significant to the interpretation of the combined field value;
1233   a proxy MUST NOT change the order of these field values when
1234   forwarding a message.
1237  <t>
1238   Note: In practice, the "Set-Cookie" header field (<xref target="RFC6265"/>)
1239   often appears multiple times in a response message and does not use the
1240   list syntax, violating the above requirements on multiple header fields
1241   with the same name. Since it cannot be combined into a single field-value,
1242   recipients ought to handle "Set-Cookie" as a special case while processing
1243   header fields. (See Appendix A.2.3 of <xref target="Kri2001"/> for details.)
1244  </t>
1248<section title="Whitespace" anchor="whitespace">
1249<t anchor="rule.LWS">
1250   This specification uses three rules to denote the use of linear
1251   whitespace: OWS (optional whitespace), RWS (required whitespace), and
1252   BWS ("bad" whitespace).
1254<t anchor="rule.OWS">
1255   The OWS rule is used where zero or more linear whitespace octets might
1256   appear. For protocol elements where optional whitespace is preferred to
1257   improve readability, a sender SHOULD generate the optional whitespace
1258   as a single SP; otherwise, a sender SHOULD NOT generate optional
1259   whitespace except as needed to white-out invalid or unwanted protocol
1260   elements during in-place message filtering.
1262<t anchor="rule.RWS">
1263   The RWS rule is used when at least one linear whitespace octet is required
1264   to separate field tokens. A sender SHOULD generate RWS as a single SP.
1266<t anchor="rule.BWS">
1267   The BWS rule is used where the grammar allows optional whitespace only for
1268   historical reasons. A sender MUST NOT generate BWS in messages.
1269   A recipient MUST parse for such bad whitespace and remove it before
1270   interpreting the protocol element.
1272<t anchor="rule.whitespace">
1277<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[
1278  OWS            = *( SP / HTAB )
1279                 ; optional whitespace
1280  RWS            = 1*( SP / HTAB )
1281                 ; required whitespace
1282  BWS            = OWS
1283                 ; "bad" whitespace
1287<section title="Field Parsing" anchor="field.parsing">
1289   No whitespace is allowed between the header field-name and colon.
1290   In the past, differences in the handling of such whitespace have led to
1291   security vulnerabilities in request routing and response handling.
1292   A server MUST reject any received request message that contains
1293   whitespace between a header field-name and colon with a response code of
1294   400 (Bad Request). A proxy MUST remove any such whitespace
1295   from a response message before forwarding the message downstream.
1298   A field value is preceded by optional whitespace (OWS); a single SP is
1299   preferred. The field value does not include any leading or trailing white
1300   space: OWS occurring before the first non-whitespace octet of the field
1301   value or after the last non-whitespace octet of the field value ought to be
1302   excluded by parsers when extracting the field value from a header field.
1305   A recipient of field-content containing multiple sequential octets of
1306   optional (OWS) or required (RWS) whitespace SHOULD either replace the
1307   sequence with a single SP or transform any non-SP octets in the sequence to
1308   SP octets before interpreting the field value or forwarding the message
1309   downstream.
1312   Historically, HTTP header field values could be extended over multiple
1313   lines by preceding each extra line with at least one space or horizontal
1314   tab (obs-fold). This specification deprecates such line folding except
1315   within the message/http media type
1316   (<xref target=""/>).
1317   A sender MUST NOT generate a message that includes line folding
1318   (i.e., that has any field-value that contains a match to the
1319   <xref target="header.fields" format="none">obs-fold</xref> rule) unless the message is intended for packaging
1320   within the message/http media type.
1323   A server that receives an <xref target="header.fields" format="none">obs-fold</xref> in a request message that
1324   is not within a message/http container MUST either reject the message by
1325   sending a 400 (Bad Request), preferably with a
1326   representation explaining that obsolete line folding is unacceptable, or
1327   replace each received <xref target="header.fields" format="none">obs-fold</xref> with one or more
1328   <xref target="core.rules" format="none">SP</xref> octets prior to interpreting the field value or
1329   forwarding the message downstream.
1332   A proxy or gateway that receives an <xref target="header.fields" format="none">obs-fold</xref> in a response
1333   message that is not within a message/http container MUST either discard
1334   the message and replace it with a 502 (Bad Gateway)
1335   response, preferably with a representation explaining that unacceptable
1336   line folding was received, or replace each received <xref target="header.fields" format="none">obs-fold</xref>
1337   with one or more <xref target="core.rules" format="none">SP</xref> octets prior to interpreting the field
1338   value or forwarding the message downstream.
1341   A user agent that receives an <xref target="header.fields" format="none">obs-fold</xref> in a response message
1342   that is not within a message/http container MUST replace each received
1343   <xref target="header.fields" format="none">obs-fold</xref> with one or more <xref target="core.rules" format="none">SP</xref> octets prior to
1344   interpreting the field value.
1347   Historically, HTTP has allowed field content with text in the ISO-8859-1
1348   <xref target="ISO-8859-1"/> charset, supporting other charsets only
1349   through use of <xref target="RFC2047"/> encoding.
1350   In practice, most HTTP header field values use only a subset of the
1351   US-ASCII charset <xref target="USASCII"/>. Newly defined
1352   header fields SHOULD limit their field values to US-ASCII octets.
1353   A recipient SHOULD treat other octets in field content (obs-text) as
1354   opaque data.
1358<section title="Field Limits" anchor="field.limits">
1360   HTTP does not place a pre-defined limit on the length of each header field
1361   or on the length of the header section as a whole, as described in
1362   <xref target="conformance"/>. Various ad-hoc limitations on individual
1363   header field length are found in practice, often depending on the specific
1364   field semantics.
1367   A server ought to be prepared to receive request header fields of unbounded
1368   length and MUST respond with an appropriate
1369   4xx (Client Error) status code if the received header
1370   field(s) are larger than the server wishes to process.
1373   A client ought to be prepared to receive response header fields of
1374   unbounded length.
1375   A client MAY discard or truncate received header fields that are larger
1376   than the client wishes to process if the field semantics are such that the
1377   dropped value(s) can be safely ignored without changing the
1378   message framing or response semantics.
1382<section title="Field value components" anchor="field.components">
1383<t anchor="rule.token.separators">
1388   Many HTTP header field values consist of words (token or quoted-string)
1389   separated by whitespace or special characters.
1391<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[
1392  word           = token / quoted-string
1394  token          = 1*tchar
1396  tchar          = "!" / "#" / "$" / "%" / "&" / "'" / "*"
1397                 / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
1398                 / DIGIT / ALPHA
1399                 ; any VCHAR, except special
1401  special        = "(" / ")" / "<" / ">" / "@" / ","
1402                 / ";" / ":" / "\" / DQUOTE / "/" / "["
1403                 / "]" / "?" / "=" / "{" / "}"
1405<t anchor="rule.quoted-string">
1409   A string of text is parsed as a single word if it is quoted using
1410   double-quote marks.
1412<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[
1413  quoted-string  = DQUOTE *( qdtext / quoted-pair ) DQUOTE
1414  qdtext         = HTAB / SP /%x21 / %x23-5B / %x5D-7E / obs-text
1415  obs-text       = %x80-FF
1417<t anchor="rule.quoted-pair">
1419   The backslash octet ("\") can be used as a single-octet
1420   quoting mechanism within quoted-string constructs:
1422<figure><iref primary="true" item="Grammar" subitem="quoted-pair"/><artwork type="abnf2616"><![CDATA[
1423  quoted-pair    = "\" ( HTAB / SP / VCHAR / obs-text )
1426   Recipients that process the value of a quoted-string MUST handle a
1427   quoted-pair as if it were replaced by the octet following the backslash.
1430   A sender SHOULD NOT generate a quoted-pair in a quoted-string except where
1431   necessary to quote DQUOTE and backslash octets occurring within that string.
1433<t anchor="rule.comment">
1436   Comments can be included in some HTTP header fields by surrounding
1437   the comment text with parentheses. Comments are only allowed in
1438   fields containing "comment" as part of their field value definition.
1440<figure><iref primary="true" item="Grammar" subitem="comment"/><iref primary="true" item="Grammar" subitem="ctext"/><artwork type="abnf2616"><![CDATA[
1441  comment        = "(" *( ctext / quoted-cpair / comment ) ")"
1442  ctext          = HTAB / SP / %x21-27 / %x2A-5B / %x5D-7E / obs-text
1444<t anchor="rule.quoted-cpair">
1446   The backslash octet ("\") can be used as a single-octet
1447   quoting mechanism within comment constructs:
1449<figure><iref primary="true" item="Grammar" subitem="quoted-cpair"/><artwork type="abnf2616"><![CDATA[
1450  quoted-cpair   = "\" ( HTAB / SP / VCHAR / obs-text )
1453   A sender SHOULD NOT escape octets in comments that do not require escaping
1454   (i.e., other than the backslash octet "\" and the parentheses "(" and ")").
1460<section title="Message Body" anchor="message.body">
1463   The message body (if any) of an HTTP message is used to carry the
1464   payload body of that request or response.  The message body is
1465   identical to the payload body unless a transfer coding has been
1466   applied, as described in <xref target="header.transfer-encoding"/>.
1468<figure><iref primary="true" item="Grammar" subitem="message-body"/><artwork type="abnf2616"><![CDATA[
1469  message-body = *OCTET
1472   The rules for when a message body is allowed in a message differ for
1473   requests and responses.
1476   The presence of a message body in a request is signaled by a
1477   <xref target="header.content-length" format="none">Content-Length</xref> or <xref target="header.transfer-encoding" format="none">Transfer-Encoding</xref> header
1478   field. Request message framing is independent of method semantics,
1479   even if the method does not define any use for a message body.
1482   The presence of a message body in a response depends on both
1483   the request method to which it is responding and the response
1484   status code (<xref target="status.line"/>).
1485   Responses to the HEAD request method never include a message body
1486   because the associated response header fields (e.g.,
1487   <xref target="header.transfer-encoding" format="none">Transfer-Encoding</xref>, <xref target="header.content-length" format="none">Content-Length</xref>, etc.),
1488   if present, indicate only what their values would have been if the request
1489   method had been GET (Section 4.3.2 of <xref target="Part2"/>).
1490   2xx (Successful) responses to CONNECT switch to tunnel
1491   mode instead of having a message body (Section 4.3.6 of <xref target="Part2"/>).
1492   All 1xx (Informational), 204 (No Content), and
1493   304 (Not Modified) responses do not include a message body.
1494   All other responses do include a message body, although the body
1495   might be of zero length.
1498<section title="Transfer-Encoding" anchor="header.transfer-encoding">
1499  <iref primary="true" item="Transfer-Encoding header field"/>
1500  <iref item="chunked (Coding Format)"/>
1503   The Transfer-Encoding header field lists the transfer coding names
1504   corresponding to the sequence of transfer codings that have been
1505   (or will be) applied to the payload body in order to form the message body.
1506   Transfer codings are defined in <xref target="transfer.codings"/>.
1508<figure><iref primary="true" item="Grammar" subitem="Transfer-Encoding"/><artwork type="abnf2616"><![CDATA[
1509  Transfer-Encoding = 1#transfer-coding
1512   Transfer-Encoding is analogous to the Content-Transfer-Encoding field of
1513   MIME, which was designed to enable safe transport of binary data over a
1514   7-bit transport service (<xref target="RFC2045"/>, Section 6).
1515   However, safe transport has a different focus for an 8bit-clean transfer
1516   protocol. In HTTP's case, Transfer-Encoding is primarily intended to
1517   accurately delimit a dynamically generated payload and to distinguish
1518   payload encodings that are only applied for transport efficiency or
1519   security from those that are characteristics of the selected resource.
1522   A recipient MUST be able to parse the chunked transfer coding
1523   (<xref target="chunked.encoding"/>) because it plays a crucial role in
1524   framing messages when the payload body size is not known in advance.
1525   A sender MUST NOT apply chunked more than once to a message body
1526   (i.e., chunking an already chunked message is not allowed).
1527   If any transfer coding other than chunked is applied to a request payload
1528   body, the sender MUST apply chunked as the final transfer coding to
1529   ensure that the message is properly framed.
1530   If any transfer coding other than chunked is applied to a response payload
1531   body, the sender MUST either apply chunked as the final transfer coding
1532   or terminate the message by closing the connection.
1535   For example,
1536</preamble><artwork type="example"><![CDATA[
1537  Transfer-Encoding: gzip, chunked
1539   indicates that the payload body has been compressed using the gzip
1540   coding and then chunked using the chunked coding while forming the
1541   message body.
1544   Unlike Content-Encoding (Section of <xref target="Part2"/>),
1545   Transfer-Encoding is a property of the message, not of the representation, and
1546   any recipient along the request/response chain MAY decode the received
1547   transfer coding(s) or apply additional transfer coding(s) to the message
1548   body, assuming that corresponding changes are made to the Transfer-Encoding
1549   field-value. Additional information about the encoding parameters MAY be
1550   provided by other header fields not defined by this specification.
1553   Transfer-Encoding MAY be sent in a response to a HEAD request or in a
1554   304 (Not Modified) response (Section 4.1 of <xref target="Part4"/>) to a GET request,
1555   neither of which includes a message body,
1556   to indicate that the origin server would have applied a transfer coding
1557   to the message body if the request had been an unconditional GET.
1558   This indication is not required, however, because any recipient on
1559   the response chain (including the origin server) can remove transfer
1560   codings when they are not needed.
1563   A server MUST NOT send a Transfer-Encoding header field in any response
1564   with a status code of
1565   1xx (Informational) or 204 (No Content).
1566   A server MUST NOT send a Transfer-Encoding header field in any
1567   2xx (Successful) response to a CONNECT request (Section 4.3.6 of <xref target="Part2"/>).
1570   Transfer-Encoding was added in HTTP/1.1.  It is generally assumed that
1571   implementations advertising only HTTP/1.0 support will not understand
1572   how to process a transfer-encoded payload.
1573   A client MUST NOT send a request containing Transfer-Encoding unless it
1574   knows the server will handle HTTP/1.1 (or later) requests; such knowledge
1575   might be in the form of specific user configuration or by remembering the
1576   version of a prior received response.
1577   A server MUST NOT send a response containing Transfer-Encoding unless
1578   the corresponding request indicates HTTP/1.1 (or later).
1581   A server that receives a request message with a transfer coding it does
1582   not understand SHOULD respond with 501 (Not Implemented).
1586<section title="Content-Length" anchor="header.content-length">
1587  <iref primary="true" item="Content-Length header field"/>
1590   When a message does not have a <xref target="header.transfer-encoding" format="none">Transfer-Encoding</xref> header
1591   field, a Content-Length header field can provide the anticipated size,
1592   as a decimal number of octets, for a potential payload body.
1593   For messages that do include a payload body, the Content-Length field-value
1594   provides the framing information necessary for determining where the body
1595   (and message) ends.  For messages that do not include a payload body, the
1596   Content-Length indicates the size of the selected representation
1597   (Section 3 of <xref target="Part2"/>).
1599<figure><iref primary="true" item="Grammar" subitem="Content-Length"/><artwork type="abnf2616"><![CDATA[
1600  Content-Length = 1*DIGIT
1603   An example is
1605<figure><artwork type="example"><![CDATA[
1606  Content-Length: 3495
1609   A sender MUST NOT send a Content-Length header field in any message that
1610   contains a <xref target="header.transfer-encoding" format="none">Transfer-Encoding</xref> header field.
1613   A user agent SHOULD send a Content-Length in a request message when no
1614   <xref target="header.transfer-encoding" format="none">Transfer-Encoding</xref> is sent and the request method defines
1615   a meaning for an enclosed payload body. For example, a Content-Length
1616   header field is normally sent in a POST request even when the value is
1617   0 (indicating an empty payload body).  A user agent SHOULD NOT send a
1618   Content-Length header field when the request message does not contain a
1619   payload body and the method semantics do not anticipate such a body.
1622   A server MAY send a Content-Length header field in a response to a HEAD
1623   request (Section 4.3.2 of <xref target="Part2"/>); a server MUST NOT send Content-Length in such a
1624   response unless its field-value equals the decimal number of octets that
1625   would have been sent in the payload body of a response if the same
1626   request had used the GET method.
1629   A server MAY send a Content-Length header field in a
1630   304 (Not Modified) response to a conditional GET request
1631   (Section 4.1 of <xref target="Part4"/>); a server MUST NOT send Content-Length in such a
1632   response unless its field-value equals the decimal number of octets that
1633   would have been sent in the payload body of a 200 (OK)
1634   response to the same request.
1637   A server MUST NOT send a Content-Length header field in any response
1638   with a status code of
1639   1xx (Informational) or 204 (No Content).
1640   A server MUST NOT send a Content-Length header field in any
1641   2xx (Successful) response to a CONNECT request (Section 4.3.6 of <xref target="Part2"/>).
1644   Aside from the cases defined above, in the absence of Transfer-Encoding,
1645   an origin server SHOULD send a Content-Length header field when the
1646   payload body size is known prior to sending the complete header section.
1647   This will allow downstream recipients to measure transfer progress,
1648   know when a received message is complete, and potentially reuse the
1649   connection for additional requests.
1652   Any Content-Length field value greater than or equal to zero is valid.
1653   Since there is no predefined limit to the length of a payload, a
1654   recipient MUST anticipate potentially large decimal numerals and
1655   prevent parsing errors due to integer conversion overflows
1656   (<xref target="attack.protocol.element.size.overflows"/>).
1659   If a message is received that has multiple Content-Length header fields
1660   with field-values consisting of the same decimal value, or a single
1661   Content-Length header field with a field value containing a list of
1662   identical decimal values (e.g., "Content-Length: 42, 42"), indicating that
1663   duplicate Content-Length header fields have been generated or combined by an
1664   upstream message processor, then the recipient MUST either reject the
1665   message as invalid or replace the duplicated field-values with a single
1666   valid Content-Length field containing that decimal value prior to
1667   determining the message body length or forwarding the message.
1670  <t>
1671   Note: HTTP's use of Content-Length for message framing differs
1672   significantly from the same field's use in MIME, where it is an optional
1673   field used only within the "message/external-body" media-type.
1674  </t>
1678<section title="Message Body Length" anchor="message.body.length">
1679  <iref item="chunked (Coding Format)"/>
1681   The length of a message body is determined by one of the following
1682   (in order of precedence):
1685  <list style="numbers">
1686    <t>
1687     Any response to a HEAD request and any response with a
1688     1xx (Informational), 204 (No Content), or
1689     304 (Not Modified) status code is always
1690     terminated by the first empty line after the header fields, regardless of
1691     the header fields present in the message, and thus cannot contain a
1692     message body.
1693    </t>
1694    <t>
1695     Any 2xx (Successful) response to a CONNECT request implies that the
1696     connection will become a tunnel immediately after the empty line that
1697     concludes the header fields.  A client MUST ignore any
1698     <xref target="header.content-length" format="none">Content-Length</xref> or <xref target="header.transfer-encoding" format="none">Transfer-Encoding</xref> header
1699     fields received in such a message.
1700    </t>
1701    <t>
1702     If a <xref target="header.transfer-encoding" format="none">Transfer-Encoding</xref> header field is present
1703     and the chunked transfer coding (<xref target="chunked.encoding"/>)
1704     is the final encoding, the message body length is determined by reading
1705     and decoding the chunked data until the transfer coding indicates the
1706     data is complete.
1707    <vspace blankLines="1"/>
1708     If a <xref target="header.transfer-encoding" format="none">Transfer-Encoding</xref> header field is present in a
1709     response and the chunked transfer coding is not the final encoding, the
1710     message body length is determined by reading the connection until it is
1711     closed by the server.
1712     If a <xref target="header.transfer-encoding" format="none">Transfer-Encoding</xref> header field is present in a request and the
1713     chunked transfer coding is not the final encoding, the message body
1714     length cannot be determined reliably; the server MUST respond with
1715     the 400 (Bad Request) status code and then close the connection.
1716    <vspace blankLines="1"/>
1717     If a message is received with both a <xref target="header.transfer-encoding" format="none">Transfer-Encoding</xref>
1718     and a <xref target="header.content-length" format="none">Content-Length</xref> header field, the Transfer-Encoding
1719     overrides the Content-Length. Such a message might indicate an attempt
1720     to perform request or response smuggling (bypass of security-related
1721     checks on message routing or content) and thus ought to be handled as
1722     an error.  A sender MUST remove the received Content-Length field
1723     prior to forwarding such a message downstream.
1724    </t>
1725    <t>
1726     If a message is received without <xref target="header.transfer-encoding" format="none">Transfer-Encoding</xref> and with
1727     either multiple <xref target="header.content-length" format="none">Content-Length</xref> header fields having
1728     differing field-values or a single Content-Length header field having an
1729     invalid value, then the message framing is invalid and
1730     the recipient MUST treat it as an unrecoverable error to prevent
1731     request or response smuggling.
1732     If this is a request message, the server MUST respond with
1733     a 400 (Bad Request) status code and then close the connection.
1734     If this is a response message received by a proxy,
1735     the proxy MUST close the connection to the server, discard the received
1736     response, and send a 502 (Bad Gateway) response to the
1737     client.
1738     If this is a response message received by a user agent,
1739     the user agent MUST close the connection to the server and discard the
1740     received response.
1741    </t>
1742    <t>
1743     If a valid <xref target="header.content-length" format="none">Content-Length</xref> header field is present without
1744     <xref target="header.transfer-encoding" format="none">Transfer-Encoding</xref>, its decimal value defines the
1745     expected message body length in octets.
1746     If the sender closes the connection or the recipient times out before the
1747     indicated number of octets are received, the recipient MUST consider
1748     the message to be incomplete and close the connection.
1749    </t>
1750    <t>
1751     If this is a request message and none of the above are true, then the
1752     message body length is zero (no message body is present).
1753    </t>
1754    <t>
1755     Otherwise, this is a response message without a declared message body
1756     length, so the message body length is determined by the number of octets
1757     received prior to the server closing the connection.
1758    </t>
1759  </list>
1762   Since there is no way to distinguish a successfully completed,
1763   close-delimited message from a partially-received message interrupted
1764   by network failure, a server SHOULD generate encoding or
1765   length-delimited messages whenever possible.  The close-delimiting
1766   feature exists primarily for backwards compatibility with HTTP/1.0.
1769   A server MAY reject a request that contains a message body but
1770   not a <xref target="header.content-length" format="none">Content-Length</xref> by responding with
1771   411 (Length Required).
1774   Unless a transfer coding other than chunked has been applied,
1775   a client that sends a request containing a message body SHOULD
1776   use a valid <xref target="header.content-length" format="none">Content-Length</xref> header field if the message body
1777   length is known in advance, rather than the chunked transfer coding, since some
1778   existing services respond to chunked with a 411 (Length Required)
1779   status code even though they understand the chunked transfer coding.  This
1780   is typically because such services are implemented via a gateway that
1781   requires a content-length in advance of being called and the server
1782   is unable or unwilling to buffer the entire request before processing.
1785   A user agent that sends a request containing a message body MUST send a
1786   valid <xref target="header.content-length" format="none">Content-Length</xref> header field if it does not know the
1787   server will handle HTTP/1.1 (or later) requests; such knowledge can be in
1788   the form of specific user configuration or by remembering the version of a
1789   prior received response.
1792   If the final response to the last request on a connection has been
1793   completely received and there remains additional data to read, a user agent
1794   MAY discard the remaining data or attempt to determine if that data
1795   belongs as part of the prior response body, which might be the case if the
1796   prior message's Content-Length value is incorrect. A client MUST NOT
1797   process, cache, or forward such extra data as a separate response, since
1798   such behavior would be vulnerable to cache poisoning.
1803<section anchor="incomplete.messages" title="Handling Incomplete Messages">
1805   A server that receives an incomplete request message, usually due to a
1806   canceled request or a triggered time-out exception, MAY send an error
1807   response prior to closing the connection.
1810   A client that receives an incomplete response message, which can occur
1811   when a connection is closed prematurely or when decoding a supposedly
1812   chunked transfer coding fails, MUST record the message as incomplete.
1813   Cache requirements for incomplete responses are defined in
1814   Section 3 of <xref target="Part6"/>.
1817   If a response terminates in the middle of the header section (before the
1818   empty line is received) and the status code might rely on header fields to
1819   convey the full meaning of the response, then the client cannot assume
1820   that meaning has been conveyed; the client might need to repeat the
1821   request in order to determine what action to take next.
1824   A message body that uses the chunked transfer coding is
1825   incomplete if the zero-sized chunk that terminates the encoding has not
1826   been received.  A message that uses a valid <xref target="header.content-length" format="none">Content-Length</xref> is
1827   incomplete if the size of the message body received (in octets) is less than
1828   the value given by Content-Length.  A response that has neither chunked
1829   transfer coding nor Content-Length is terminated by closure of the
1830   connection, and thus is considered complete regardless of the number of
1831   message body octets received, provided that the header section was received
1832   intact.
1836<section title="Message Parsing Robustness" anchor="message.robustness">
1838   Older HTTP/1.0 user agent implementations might send an extra CRLF
1839   after a POST request as a workaround for some early server
1840   applications that failed to read message body content that was
1841   not terminated by a line-ending. An HTTP/1.1 user agent MUST NOT
1842   preface or follow a request with an extra CRLF.  If terminating
1843   the request message body with a line-ending is desired, then the
1844   user agent MUST count the terminating CRLF octets as part of the
1845   message body length.
1848   In the interest of robustness, a server that is expecting to receive and
1849   parse a request-line SHOULD ignore at least one empty line (CRLF)
1850   received prior to the request-line.
1853   Although the line terminator for the start-line and header
1854   fields is the sequence CRLF, a recipient MAY recognize a
1855   single LF as a line terminator and ignore any preceding CR.
1858   Although the request-line and status-line grammar rules require that each
1859   of the component elements be separated by a single SP octet, recipients
1860   MAY instead parse on whitespace-delimited word boundaries and, aside
1861   from the CRLF terminator, treat any form of whitespace as the SP separator
1862   while ignoring preceding or trailing whitespace;
1863   such whitespace includes one or more of the following octets:
1864   SP, HTAB, VT (%x0B), FF (%x0C), or bare CR.
1867   When a server listening only for HTTP request messages, or processing
1868   what appears from the start-line to be an HTTP request message,
1869   receives a sequence of octets that does not match the HTTP-message
1870   grammar aside from the robustness exceptions listed above, the
1871   server SHOULD respond with a 400 (Bad Request) response. 
1876<section title="Transfer Codings" anchor="transfer.codings">
1880   Transfer coding names are used to indicate an encoding
1881   transformation that has been, can be, or might need to be applied to a
1882   payload body in order to ensure "safe transport" through the network.
1883   This differs from a content coding in that the transfer coding is a
1884   property of the message rather than a property of the representation
1885   that is being transferred.
1887<figure><iref primary="true" item="Grammar" subitem="transfer-coding"/><iref primary="true" item="Grammar" subitem="transfer-extension"/><artwork type="abnf2616"><![CDATA[
1888  transfer-coding    = "chunked" ; Section 4.1
1889                     / "compress" ; Section 4.2.1
1890                     / "deflate" ; Section 4.2.2
1891                     / "gzip" ; Section 4.2.3
1892                     / transfer-extension
1893  transfer-extension = token *( OWS ";" OWS transfer-parameter )
1895<t anchor="rule.parameter">
1899   Parameters are in the form of attribute/value pairs.
1901<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[
1902  transfer-parameter = attribute BWS "=" BWS value
1903  attribute          = token
1904  value              = word
1907   All transfer-coding names are case-insensitive and ought to be registered
1908   within the HTTP Transfer Coding registry, as defined in
1909   <xref target="transfer.coding.registry"/>.
1910   They are used in the <xref target="header.te" format="none">TE</xref> (<xref target="header.te"/>) and
1911   <xref target="header.transfer-encoding" format="none">Transfer-Encoding</xref> (<xref target="header.transfer-encoding"/>)
1912   header fields.
1915<section title="Chunked Transfer Coding" anchor="chunked.encoding">
1916  <iref primary="true" item="chunked (Coding Format)"/>
1923   The chunked transfer coding wraps the payload body in order to transfer it
1924   as a series of chunks, each with its own size indicator, followed by an
1925   OPTIONAL trailer containing header fields. Chunked enables content
1926   streams of unknown size to be transferred as a sequence of length-delimited
1927   buffers, which enables the sender to retain connection persistence and the
1928   recipient to know when it has received the entire message.
1930<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="false" 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[
1931  chunked-body   = *chunk
1932                   last-chunk
1933                   trailer-part
1934                   CRLF
1936  chunk          = chunk-size [ chunk-ext ] CRLF
1937                   chunk-data CRLF
1938  chunk-size     = 1*HEXDIG
1939  last-chunk     = 1*("0") [ chunk-ext ] CRLF
1941  chunk-data     = 1*OCTET ; a sequence of chunk-size octets
1944   The chunk-size field is a string of hex digits indicating the size of
1945   the chunk-data in octets. The chunked transfer coding is complete when a
1946   chunk with a chunk-size of zero is received, possibly followed by a
1947   trailer, and finally terminated by an empty line.
1950   A recipient MUST be able to parse and decode the chunked transfer coding.
1953<section title="Chunk Extensions" anchor="chunked.extension">
1960   The chunked encoding allows each chunk to include zero or more chunk
1961   extensions, immediately following the <xref target="chunked.encoding" format="none">chunk-size</xref>, for the
1962   sake of supplying per-chunk metadata (such as a signature or hash),
1963   mid-message control information, or randomization of message body size.
1965<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="false" 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[
1966  chunk-ext      = *( ";" chunk-ext-name [ "=" chunk-ext-val ] )
1968  chunk-ext-name = token
1969  chunk-ext-val  = token / quoted-str-nf
1971  quoted-str-nf  = DQUOTE *( qdtext-nf / quoted-pair ) DQUOTE
1972                 ; like quoted-string, but disallowing line folding
1973  qdtext-nf      = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
1976   The chunked encoding is specific to each connection and is likely to be
1977   removed or recoded by each recipient (including intermediaries) before any
1978   higher-level application would have a chance to inspect the extensions.
1979   Hence, use of chunk extensions is generally limited to specialized HTTP
1980   services such as "long polling" (where client and server can have shared
1981   expectations regarding the use of chunk extensions) or for padding within
1982   an end-to-end secured connection.
1985   A recipient MUST ignore unrecognized chunk extensions.
1986   A server ought to limit the total length of chunk extensions received in a
1987   request to an amount reasonable for the services provided, in the same way
1988   that it applies length limitations and timeouts for other parts of a
1989   message, and generate an appropriate 4xx (Client Error)
1990   response if that amount is exceeded.
1994<section title="Chunked Trailer Part" anchor="chunked.trailer.part">
1997   A trailer allows the sender to include additional fields at the end of a
1998   chunked message in order to supply metadata that might be dynamically
1999   generated while the message body is sent, such as a message integrity
2000   check, digital signature, or post-processing status. The trailer fields are
2001   identical to header fields, except they are sent in a chunked trailer
2002   instead of the message's header section.
2004<figure><iref primary="true" item="Grammar" subitem="trailer-part"/><artwork type="abnf2616"><![CDATA[
2005  trailer-part   = *( header-field CRLF )
2008   A sender MUST NOT generate a trailer that contains a field which needs to
2009   be known by the recipient before it can begin processing the message body.
2010   For example, most recipients need to know the values of
2011   Content-Encoding and Content-Type in order to
2012   select a content handler, so placing those fields in a trailer would force
2013   the recipient to buffer the entire body before it could begin, greatly
2014   increasing user-perceived latency and defeating one of the main advantages
2015   of using chunked to send data streams of unknown length.
2016   A sender MUST NOT generate a trailer containing a
2017   <xref target="header.transfer-encoding" format="none">Transfer-Encoding</xref>,
2018   <xref target="header.content-length" format="none">Content-Length</xref>, or
2019   <xref target="header.trailer" format="none">Trailer</xref> field.
2022   A server MUST generate an empty trailer with the chunked transfer coding
2023   unless at least one of the following is true:
2024  <list style="numbers">
2025    <t>the request included a <xref target="header.te" format="none">TE</xref> header field that indicates
2026    "trailers" is acceptable in the transfer coding of the response, as
2027    described in <xref target="header.te"/>; or,</t>
2029    <t>the trailer fields consist entirely of optional metadata and the
2030    recipient could use the message (in a manner acceptable to the generating
2031    server) without receiving that metadata. In other words, the generating
2032    server is willing to accept the possibility that the trailer fields might
2033    be silently discarded along the path to the client.</t>
2034  </list>
2037   The above requirement prevents the need for an infinite buffer when a
2038   message is being received by an HTTP/1.1 (or later) proxy and forwarded to
2039   an HTTP/1.0 recipient.
2043<section title="Decoding Chunked" anchor="decoding.chunked">
2045   A process for decoding the chunked transfer coding
2046   can be represented in pseudo-code as:
2048<figure><artwork type="code"><![CDATA[
2049  length := 0
2050  read chunk-size, chunk-ext (if any), and CRLF
2051  while (chunk-size > 0) {
2052     read chunk-data and CRLF
2053     append chunk-data to decoded-body
2054     length := length + chunk-size
2055     read chunk-size, chunk-ext (if any), and CRLF
2056  }
2057  read header-field
2058  while (header-field not empty) {
2059     append header-field to existing header fields
2060     read header-field
2061  }
2062  Content-Length := length
2063  Remove "chunked" from Transfer-Encoding
2064  Remove Trailer from existing header fields
2069<section title="Compression Codings" anchor="compression.codings">
2071   The codings defined below can be used to compress the payload of a
2072   message.
2075<section title="Compress Coding" anchor="compress.coding">
2076<iref item="compress (Coding Format)"/>
2078   The "compress" coding is an adaptive Lempel-Ziv-Welch (LZW) coding
2079   <xref target="Welch"/> that is commonly produced by the UNIX file
2080   compression program "compress".
2081   A recipient SHOULD consider "x-compress" to be equivalent to "compress".
2085<section title="Deflate Coding" anchor="deflate.coding">
2086<iref item="deflate (Coding Format)"/>
2088   The "deflate" coding is a "zlib" data format <xref target="RFC1950"/>
2089   containing a "deflate" compressed data stream <xref target="RFC1951"/>
2090   that uses a combination of the Lempel-Ziv (LZ77) compression algorithm and
2091   Huffman coding.
2094  <t>
2095    Note: Some incorrect implementations send the "deflate"
2096    compressed data without the zlib wrapper.
2097   </t>
2101<section title="Gzip Coding" anchor="gzip.coding">
2102<iref item="gzip (Coding Format)"/>
2104   The "gzip" coding is an LZ77 coding with a 32 bit CRC that is commonly
2105   produced by the gzip file compression program <xref target="RFC1952"/>.
2106   A recipient SHOULD consider "x-gzip" to be equivalent to "gzip".
2112<section title="TE" anchor="header.te">
2113  <iref primary="true" item="TE header field"/>
2119   The "TE" header field in a request indicates what transfer codings,
2120   besides chunked, the client is willing to accept in response, and
2121   whether or not the client is willing to accept trailer fields in a
2122   chunked transfer coding.
2125   The TE field-value consists of a comma-separated list of transfer coding
2126   names, each allowing for optional parameters (as described in
2127   <xref target="transfer.codings"/>), and/or the keyword "trailers".
2128   A client MUST NOT send the chunked transfer coding name in TE;
2129   chunked is always acceptable for HTTP/1.1 recipients.
2131<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[
2132  TE        = #t-codings
2133  t-codings = "trailers" / ( transfer-coding [ t-ranking ] )
2134  t-ranking = OWS ";" OWS "q=" rank
2135  rank      = ( "0" [ "." 0*3DIGIT ] )
2136             / ( "1" [ "." 0*3("0") ] )
2139   Three examples of TE use are below.
2141<figure><artwork type="example"><![CDATA[
2142  TE: deflate
2143  TE:
2144  TE: trailers, deflate;q=0.5
2147   The presence of the keyword "trailers" indicates that the client is willing
2148   to accept trailer fields in a chunked transfer coding, as defined in
2149   <xref target="chunked.trailer.part"/>, on behalf of itself and any downstream
2150   clients. For requests from an intermediary, this implies that either:
2151   (a) all downstream clients are willing to accept trailer fields in the
2152   forwarded response; or,
2153   (b) the intermediary will attempt to buffer the response on behalf of
2154   downstream recipients.
2155   Note that HTTP/1.1 does not define any means to limit the size of a
2156   chunked response such that an intermediary can be assured of buffering the
2157   entire response.
2160   When multiple transfer codings are acceptable, the client MAY rank the
2161   codings by preference using a case-insensitive "q" parameter (similar to
2162   the qvalues used in content negotiation fields, Section 5.3.1 of <xref target="Part2"/>). The rank value
2163   is a real number in the range 0 through 1, where 0.001 is the least
2164   preferred and 1 is the most preferred; a value of 0 means "not acceptable".
2167   If the TE field-value is empty or if no TE field is present, the only
2168   acceptable transfer coding is chunked. A message with no transfer coding
2169   is always acceptable.
2172   Since the TE header field only applies to the immediate connection,
2173   a sender of TE MUST also send a "TE" connection option within the
2174   <xref target="header.connection" format="none">Connection</xref> header field (<xref target="header.connection"/>)
2175   in order to prevent the TE field from being forwarded by intermediaries
2176   that do not support its semantics.
2180<section title="Trailer" anchor="header.trailer">
2181  <iref primary="true" item="Trailer header field"/>
2184   When a message includes a message body encoded with the chunked
2185   transfer coding and the sender desires to send metadata in the form of
2186   trailer fields at the end of the message, the sender SHOULD generate a
2187   <xref target="header.trailer" format="none">Trailer</xref> header field before the message body to indicate
2188   which fields will be present in the trailers. This allows the recipient
2189   to prepare for receipt of that metadata before it starts processing the body,
2190   which is useful if the message is being streamed and the recipient wishes
2191   to confirm an integrity check on the fly.
2193<figure><iref primary="true" item="Grammar" subitem="Trailer"/><artwork type="abnf2616"><![CDATA[
2194  Trailer = 1#field-name
2199<section title="Message Routing" anchor="message.routing">
2201   HTTP request message routing is determined by each client based on the
2202   target resource, the client's proxy configuration, and
2203   establishment or reuse of an inbound connection.  The corresponding
2204   response routing follows the same connection chain back to the client.
2207<section title="Identifying a Target Resource" anchor="target-resource">
2208  <iref primary="true" item="target resource"/>
2209  <iref primary="true" item="target URI"/>
2213   HTTP is used in a wide variety of applications, ranging from
2214   general-purpose computers to home appliances.  In some cases,
2215   communication options are hard-coded in a client's configuration.
2216   However, most HTTP clients rely on the same resource identification
2217   mechanism and configuration techniques as general-purpose Web browsers.
2220   HTTP communication is initiated by a user agent for some purpose.
2221   The purpose is a combination of request semantics, which are defined in
2222   <xref target="Part2"/>, and a target resource upon which to apply those
2223   semantics.  A URI reference (<xref target="uri"/>) is typically used as
2224   an identifier for the "target resource", which a user agent
2225   would resolve to its absolute form in order to obtain the
2226   "target URI".  The target URI
2227   excludes the reference's fragment component, if any,
2228   since fragment identifiers are reserved for client-side processing
2229   (<xref target="RFC3986"/>, Section 3.5).
2233<section title="Connecting Inbound" anchor="connecting.inbound">
2235   Once the target URI is determined, a client needs to decide whether
2236   a network request is necessary to accomplish the desired semantics and,
2237   if so, where that request is to be directed.
2240   If the client has a cache <xref target="Part6"/> and the request can be
2241   satisfied by it, then the request is
2242   usually directed there first.
2245   If the request is not satisfied by a cache, then a typical client will
2246   check its configuration to determine whether a proxy is to be used to
2247   satisfy the request.  Proxy configuration is implementation-dependent,
2248   but is often based on URI prefix matching, selective authority matching,
2249   or both, and the proxy itself is usually identified by an "http" or
2250   "https" URI.  If a proxy is applicable, the client connects inbound by
2251   establishing (or reusing) a connection to that proxy.
2254   If no proxy is applicable, a typical client will invoke a handler routine,
2255   usually specific to the target URI's scheme, to connect directly
2256   to an authority for the target resource.  How that is accomplished is
2257   dependent on the target URI scheme and defined by its associated
2258   specification, similar to how this specification defines origin server
2259   access for resolution of the "http" (<xref target="http.uri"/>) and
2260   "https" (<xref target="https.uri"/>) schemes.
2263   HTTP requirements regarding connection management are defined in
2264   <xref target=""/>.
2268<section title="Request Target" anchor="request-target">
2270   Once an inbound connection is obtained,
2271   the client sends an HTTP request message (<xref target="http.message"/>)
2272   with a request-target derived from the target URI.
2273   There are four distinct formats for the request-target, depending on both
2274   the method being requested and whether the request is to a proxy.
2276<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[
2277  request-target = origin-form
2278                 / absolute-form
2279                 / authority-form
2280                 / asterisk-form
2282  origin-form    = absolute-path [ "?" query ]
2283  absolute-form  = absolute-URI
2284  authority-form = authority
2285  asterisk-form  = "*"
2287<t anchor="origin-form"><iref item="origin-form (of request-target)"/>
2288  origin-form
2291   The most common form of request-target is the origin-form.
2292   When making a request directly to an origin server, other than a CONNECT
2293   or server-wide OPTIONS request (as detailed below),
2294   a client MUST send only the absolute path and query components of
2295   the target URI as the request-target.
2296   If the target URI's path component is empty, then the client MUST send
2297   "/" as the path within the origin-form of request-target.
2298   A <xref target="" format="none">Host</xref> header field is also sent, as defined in
2299   <xref target=""/>.
2302   For example, a client wishing to retrieve a representation of the resource
2303   identified as
2305<figure><artwork type="example"><![CDATA[
2307  ]]></artwork></figure>
2309   directly from the origin server would open (or reuse) a TCP connection
2310   to port 80 of the host "" and send the lines:
2312<figure><artwork type="message/http; msgtype=&#34;request&#34;"><![CDATA[
2313  GET /where?q=now HTTP/1.1
2314  Host:
2315  ]]></artwork></figure>
2317   followed by the remainder of the request message.
2319<t anchor="absolute-form"><iref item="absolute-form (of request-target)"/>
2320  absolute-form
2323   When making a request to a proxy, other than a CONNECT or server-wide
2324   OPTIONS request (as detailed below), a client MUST send the target URI
2325   in absolute-form as the request-target.
2326   The proxy is requested to either service that request from a valid cache,
2327   if possible, or make the same request on the client's behalf to either
2328   the next inbound proxy server or directly to the origin server indicated
2329   by the request-target.  Requirements on such "forwarding" of messages are
2330   defined in <xref target="message.forwarding"/>.
2333   An example absolute-form of request-line would be:
2335<figure><artwork type="message/http; msgtype=&#34;request&#34;"><![CDATA[
2336  GET HTTP/1.1
2337  ]]></artwork></figure>
2339   To allow for transition to the absolute-form for all requests in some
2340   future version of HTTP, a server MUST accept the absolute-form
2341   in requests, even though HTTP/1.1 clients will only send them in requests
2342   to proxies.
2344<t anchor="authority-form"><iref item="authority-form (of request-target)"/>
2345  authority-form
2348   The authority-form of request-target is only used for
2349   CONNECT requests (Section 4.3.6 of <xref target="Part2"/>). When making a CONNECT request to establish a
2350   tunnel through one or more proxies, a client MUST send only the target
2351   URI's authority component (excluding any userinfo and its "@" delimiter) as
2352   the request-target. For example,
2354<figure><artwork type="message/http; msgtype=&#34;request&#34;"><![CDATA[
2355  CONNECT HTTP/1.1
2356  ]]></artwork></figure>
2357<t anchor="asterisk-form"><iref item="asterisk-form (of request-target)"/>
2358  asterisk-form
2361   The asterisk-form of request-target is only used for a server-wide
2362   OPTIONS request (Section 4.3.7 of <xref target="Part2"/>).  When a client wishes to request OPTIONS
2363   for the server as a whole, as opposed to a specific named resource of
2364   that server, the client MUST send only "*" (%x2A) as the request-target.
2365   For example,
2367<figure><artwork type="message/http; msgtype=&#34;request&#34;"><![CDATA[
2368  OPTIONS * HTTP/1.1
2369  ]]></artwork></figure>
2371   If a proxy receives an OPTIONS request with an absolute-form of
2372   request-target in which the URI has an empty path and no query component,
2373   then the last proxy on the request chain MUST send a request-target
2374   of "*" when it forwards the request to the indicated origin server.
2377   For example, the request
2378</preamble><artwork type="message/http; msgtype=&#34;request&#34;"><![CDATA[
2379  OPTIONS HTTP/1.1
2380  ]]></artwork></figure>
2382  would be forwarded by the final proxy as
2383</preamble><artwork type="message/http; msgtype=&#34;request&#34;"><![CDATA[
2384  OPTIONS * HTTP/1.1
2385  Host:
2386  ]]></artwork>
2388   after connecting to port 8001 of host "".
2393<section title="Host" anchor="">
2394  <iref primary="true" item="Host header field"/>
2397   The "Host" header field in a request provides the host and port
2398   information from the target URI, enabling the origin
2399   server to distinguish among resources while servicing requests
2400   for multiple host names on a single IP address.
2402<figure><iref primary="true" item="Grammar" subitem="Host"/><artwork type="abnf2616"><![CDATA[
2403  Host = uri-host [ ":" port ] ; Section 2.7.1
2406   A client MUST send a Host header field in all HTTP/1.1 request messages.
2407   If the target URI includes an authority component, then a client MUST
2408   send a field-value for Host that is identical to that authority
2409   component, excluding any userinfo subcomponent and its "@" delimiter
2410   (<xref target="http.uri"/>).
2411   If the authority component is missing or undefined for the target URI,
2412   then a client MUST send a Host header field with an empty field-value.
2415   Since the Host field-value is critical information for handling a request,
2416   a user agent SHOULD generate Host as the first header field following the
2417   request-line.
2420   For example, a GET request to the origin server for
2421   &lt;; would begin with:
2423<figure><artwork type="message/http; msgtype=&#34;request&#34;"><![CDATA[
2424  GET /pub/WWW/ HTTP/1.1
2425  Host:
2426  ]]></artwork></figure>
2428   A client MUST send a Host header field in an HTTP/1.1 request even
2429   if the request-target is in the absolute-form, since this
2430   allows the Host information to be forwarded through ancient HTTP/1.0
2431   proxies that might not have implemented Host.
2434   When a proxy receives a request with an absolute-form of
2435   request-target, the proxy MUST ignore the received
2436   Host header field (if any) and instead replace it with the host
2437   information of the request-target.  A proxy that forwards such a request
2438   MUST generate a new Host field-value based on the received
2439   request-target rather than forward the received Host field-value.
2442   Since the Host header field acts as an application-level routing
2443   mechanism, it is a frequent target for malware seeking to poison
2444   a shared cache or redirect a request to an unintended server.
2445   An interception proxy is particularly vulnerable if it relies on
2446   the Host field-value for redirecting requests to internal
2447   servers, or for use as a cache key in a shared cache, without
2448   first verifying that the intercepted connection is targeting a
2449   valid IP address for that host.
2452   A server MUST respond with a 400 (Bad Request) status code
2453   to any HTTP/1.1 request message that lacks a Host header field and
2454   to any request message that contains more than one Host header field
2455   or a Host header field with an invalid field-value.
2459<section title="Effective Request URI" anchor="effective.request.uri">
2460  <iref primary="true" item="effective request URI"/>
2463   A server that receives an HTTP request message MUST reconstruct
2464   the user agent's original target URI, based on the pieces of information
2465   learned from the request-target, <xref target="" format="none">Host</xref> header field, and
2466   connection context, in order to identify the intended target resource and
2467   properly service the request. The URI derived from this reconstruction
2468   process is referred to as the "effective request URI".
2471   For a user agent, the effective request URI is the target URI.
2474   If the request-target is in absolute-form, then the effective request URI
2475   is the same as the request-target.  Otherwise, the effective request URI
2476   is constructed as follows.
2479   If the request is received over a TLS-secured TCP connection,
2480   then the effective request URI's scheme is "https"; otherwise, the
2481   scheme is "http".
2484   If the request-target is in authority-form, then the effective
2485   request URI's authority component is the same as the request-target.
2486   Otherwise, if a <xref target="" format="none">Host</xref> header field is supplied with a
2487   non-empty field-value, then the authority component is the same as the
2488   Host field-value. Otherwise, the authority component is the concatenation of
2489   the default host name configured for the server, a colon (":"), and the
2490   connection's incoming TCP port number in decimal form.
2493   If the request-target is in authority-form or asterisk-form, then the
2494   effective request URI's combined path and query component is empty.
2495   Otherwise, the combined path and query component is the same as the
2496   request-target.
2499   The components of the effective request URI, once determined as above,
2500   can be combined into absolute-URI form by concatenating the scheme,
2501   "://", authority, and combined path and query component.
2505   Example 1: the following message received over an insecure TCP connection
2507<artwork type="example"><![CDATA[
2508  GET /pub/WWW/TheProject.html HTTP/1.1
2509  Host:
2510  ]]></artwork>
2514  has an effective request URI of
2516<artwork type="example"><![CDATA[
2518  ]]></artwork>
2522   Example 2: the following message received over a TLS-secured TCP connection
2524<artwork type="example"><![CDATA[
2525  OPTIONS * HTTP/1.1
2526  Host:
2527  ]]></artwork>
2531  has an effective request URI of
2533<artwork type="example"><![CDATA[
2535  ]]></artwork>
2538   An origin server that does not allow resources to differ by requested
2539   host MAY ignore the <xref target="" format="none">Host</xref> field-value and instead replace it
2540   with a configured server name when constructing the effective request URI.
2543   Recipients of an HTTP/1.0 request that lacks a <xref target="" format="none">Host</xref> header
2544   field MAY attempt to use heuristics (e.g., examination of the URI path for
2545   something unique to a particular host) in order to guess the
2546   effective request URI's authority component.
2550<section title="Associating a Response to a Request" anchor="">
2552   HTTP does not include a request identifier for associating a given
2553   request message with its corresponding one or more response messages.
2554   Hence, it relies on the order of response arrival to correspond exactly
2555   to the order in which requests are made on the same connection.
2556   More than one response message per request only occurs when one or more
2557   informational responses (1xx, see Section 6.2 of <xref target="Part2"/>) precede a
2558   final response to the same request.
2561   A client that has more than one outstanding request on a connection MUST
2562   maintain a list of outstanding requests in the order sent and MUST
2563   associate each received response message on that connection to the highest
2564   ordered request that has not yet received a final (non-1xx)
2565   response.
2569<section title="Message Forwarding" anchor="message.forwarding">
2571   As described in <xref target="intermediaries"/>, intermediaries can serve
2572   a variety of roles in the processing of HTTP requests and responses.
2573   Some intermediaries are used to improve performance or availability.
2574   Others are used for access control or to filter content.
2575   Since an HTTP stream has characteristics similar to a pipe-and-filter
2576   architecture, there are no inherent limits to the extent an intermediary
2577   can enhance (or interfere) with either direction of the stream.
2580   An intermediary not acting as a tunnel MUST implement the
2581   <xref target="header.connection" format="none">Connection</xref> header field, as specified in
2582   <xref target="header.connection"/>, and exclude fields from being forwarded
2583   that are only intended for the incoming connection.
2586   An intermediary MUST NOT forward a message to itself unless it is
2587   protected from an infinite request loop. In general, an intermediary ought
2588   to recognize its own server names, including any aliases, local variations,
2589   or literal IP addresses, and respond to such requests directly.
2592<section title="Via" anchor="header.via">
2593  <iref primary="true" item="Via header field"/>
2599   The "Via" header field indicates the presence of intermediate protocols and
2600   recipients between the user agent and the server (on requests) or between
2601   the origin server and the client (on responses), similar to the
2602   "Received" header field in email
2603   (Section 3.6.7 of <xref target="RFC5322"/>).
2604   Via can be used for tracking message forwards,
2605   avoiding request loops, and identifying the protocol capabilities of
2606   senders along the request/response chain.
2608<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[
2609  Via = 1#( received-protocol RWS received-by [ RWS comment ] )
2611  received-protocol = [ protocol-name "/" ] protocol-version
2612                      ; see Section 6.7
2613  received-by       = ( uri-host [ ":" port ] ) / pseudonym
2614  pseudonym         = token
2617   Multiple Via field values represent each proxy or gateway that has
2618   forwarded the message. Each intermediary appends its own information
2619   about how the message was received, such that the end result is ordered
2620   according to the sequence of forwarding recipients.
2623   A proxy MUST send an appropriate Via header field, as described below, in
2624   each message that it forwards.
2625   An HTTP-to-HTTP gateway MUST send an appropriate Via header field in
2626   each inbound request message and MAY send a Via header field in
2627   forwarded response messages.
2630   For each intermediary, the received-protocol indicates the protocol and
2631   protocol version used by the upstream sender of the message. Hence, the
2632   Via field value records the advertised protocol capabilities of the
2633   request/response chain such that they remain visible to downstream
2634   recipients; this can be useful for determining what backwards-incompatible
2635   features might be safe to use in response, or within a later request, as
2636   described in <xref target="http.version"/>. For brevity, the protocol-name
2637   is omitted when the received protocol is HTTP.
2640   The received-by field is normally the host and optional port number of a
2641   recipient server or client that subsequently forwarded the message.
2642   However, if the real host is considered to be sensitive information, a
2643   sender MAY replace it with a pseudonym. If a port is not provided,
2644   a recipient MAY interpret that as meaning it was received on the default
2645   TCP port, if any, for the received-protocol.
2648   A sender MAY generate comments in the Via header field to identify the
2649   software of each recipient, analogous to the User-Agent and
2650   Server header fields. However, all comments in the Via field
2651   are optional and a recipient MAY remove them prior to forwarding the
2652   message.
2655   For example, a request message could be sent from an HTTP/1.0 user
2656   agent to an internal proxy code-named "fred", which uses HTTP/1.1 to
2657   forward the request to a public proxy at, which completes
2658   the request by forwarding it to the origin server at
2659   The request received by would then have the following
2660   Via header field:
2662<figure><artwork type="example"><![CDATA[
2663  Via: 1.0 fred, 1.1
2666   An intermediary used as a portal through a network firewall
2667   SHOULD NOT forward the names and ports of hosts within the firewall
2668   region unless it is explicitly enabled to do so. If not enabled, such an
2669   intermediary SHOULD replace each received-by host of any host behind the
2670   firewall by an appropriate pseudonym for that host.
2673   An intermediary MAY combine an ordered subsequence of Via header
2674   field entries into a single such entry if the entries have identical
2675   received-protocol values. For example,
2677<figure><artwork type="example"><![CDATA[
2678  Via: 1.0 ricky, 1.1 ethel, 1.1 fred, 1.0 lucy
2681  could be collapsed to
2683<figure><artwork type="example"><![CDATA[
2684  Via: 1.0 ricky, 1.1 mertz, 1.0 lucy
2687   A sender SHOULD NOT combine multiple entries unless they are all
2688   under the same organizational control and the hosts have already been
2689   replaced by pseudonyms. A sender MUST NOT combine entries that
2690   have different received-protocol values.
2694<section title="Transformations" anchor="message.transformations">
2696   Some intermediaries include features for transforming messages and their
2697   payloads.  A transforming proxy might, for example, convert between image
2698   formats in order to save cache space or to reduce the amount of traffic on
2699   a slow link. However, operational problems might occur when these
2700   transformations are applied to payloads intended for critical applications,
2701   such as medical imaging or scientific data analysis, particularly when
2702   integrity checks or digital signatures are used to ensure that the payload
2703   received is identical to the original.
2706   If a proxy receives a request-target with a host name that is not a
2707   fully qualified domain name, it MAY add its own domain to the host name
2708   it received when forwarding the request.  A proxy MUST NOT change the
2709   host name if it is a fully qualified domain name.
2712   A proxy MUST NOT modify the "absolute-path" and "query" parts of the
2713   received request-target when forwarding it to the next inbound server,
2714   except as noted above to replace an empty path with "/" or "*".
2717   A proxy MUST NOT modify header fields that provide information about the
2718   end points of the communication chain, the resource state, or the selected
2719   representation. A proxy MAY change the message body through application
2720   or removal of a transfer coding (<xref target="transfer.codings"/>).
2723   A non-transforming proxy MUST NOT modify the message payload (Section 3.3 of <xref target="Part2"/>).
2724   A transforming proxy MUST NOT modify the payload of a message that
2725   contains the no-transform cache-control directive.
2728   A transforming proxy MAY transform the payload of a message
2729   that does not contain the no-transform cache-control directive;
2730   if the payload is transformed, the transforming proxy MUST add a
2731   Warning header field with the warn-code of 214 ("Transformation Applied")
2732   if one does not already appear in the message (see Section 5.5 of <xref target="Part6"/>).
2733   If the payload of a 200 (OK) response is transformed, the
2734   transforming proxy can also inform downstream recipients that a
2735   transformation has been applied by changing the response status code to
2736   203 (Non-Authoritative Information) (Section 6.3.4 of <xref target="Part2"/>).
2742<section title="Connection Management" anchor="">
2744   HTTP messaging is independent of the underlying transport or
2745   session-layer connection protocol(s).  HTTP only presumes a reliable
2746   transport with in-order delivery of requests and the corresponding
2747   in-order delivery of responses.  The mapping of HTTP request and
2748   response structures onto the data units of an underlying transport
2749   protocol is outside the scope of this specification.
2752   As described in <xref target="connecting.inbound"/>, the specific
2753   connection protocols to be used for an HTTP interaction are determined by
2754   client configuration and the <xref target="target-resource" format="none">target URI</xref>.
2755   For example, the "http" URI scheme
2756   (<xref target="http.uri"/>) indicates a default connection of TCP
2757   over IP, with a default TCP port of 80, but the client might be
2758   configured to use a proxy via some other connection, port, or protocol.
2761   HTTP implementations are expected to engage in connection management,
2762   which includes maintaining the state of current connections,
2763   establishing a new connection or reusing an existing connection,
2764   processing messages received on a connection, detecting connection
2765   failures, and closing each connection.
2766   Most clients maintain multiple connections in parallel, including
2767   more than one connection per server endpoint.
2768   Most servers are designed to maintain thousands of concurrent connections,
2769   while controlling request queues to enable fair use and detect
2770   denial of service attacks.
2773<section title="Connection" anchor="header.connection">
2774  <iref primary="true" item="Connection header field"/>
2775  <iref primary="true" item="close"/>
2780   The "Connection" header field allows the sender to indicate desired
2781   control options for the current connection.  In order to avoid confusing
2782   downstream recipients, a proxy or gateway MUST remove or replace any
2783   received connection options before forwarding the message.
2786   When a header field aside from Connection is used to supply control
2787   information for or about the current connection, the sender MUST list
2788   the corresponding field-name within the "Connection" header field.
2789   A proxy or gateway MUST parse a received Connection
2790   header field before a message is forwarded and, for each
2791   connection-option in this field, remove any header field(s) from
2792   the message with the same name as the connection-option, and then
2793   remove the Connection header field itself (or replace it with the
2794   intermediary's own connection options for the forwarded message).
2797   Hence, the Connection header field provides a declarative way of
2798   distinguishing header fields that are only intended for the
2799   immediate recipient ("hop-by-hop") from those fields that are
2800   intended for all recipients on the chain ("end-to-end"), enabling the
2801   message to be self-descriptive and allowing future connection-specific
2802   extensions to be deployed without fear that they will be blindly
2803   forwarded by older intermediaries.
2806   The Connection header field's value has the following grammar:
2808<figure><iref primary="true" item="Grammar" subitem="Connection"/><iref primary="true" item="Grammar" subitem="connection-option"/><artwork type="abnf2616"><![CDATA[
2809  Connection        = 1#connection-option
2810  connection-option = token
2813   Connection options are case-insensitive.
2816   A sender MUST NOT send a connection option corresponding to a header
2817   field that is intended for all recipients of the payload.
2818   For example, Cache-Control is never appropriate as a
2819   connection option (Section 5.2 of <xref target="Part6"/>).
2822   The connection options do not always correspond to a header field
2823   present in the message, since a connection-specific header field
2824   might not be needed if there are no parameters associated with a
2825   connection option. In contrast, a connection-specific header field that
2826   is received without a corresponding connection option usually indicates
2827   that the field has been improperly forwarded by an intermediary and
2828   ought to be ignored by the recipient.
2831   When defining new connection options, specification authors ought to survey
2832   existing header field names and ensure that the new connection option does
2833   not share the same name as an already deployed header field.
2834   Defining a new connection option essentially reserves that potential
2835   field-name for carrying additional information related to the
2836   connection option, since it would be unwise for senders to use
2837   that field-name for anything else.
2840   The "close" connection option is defined for a
2841   sender to signal that this connection will be closed after completion of
2842   the response. For example,
2844<figure><artwork type="example"><![CDATA[
2845  Connection: close
2848   in either the request or the response header fields indicates that the
2849   sender is going to close the connection after the current request/response
2850   is complete (<xref target="persistent.tear-down"/>).
2853   A client that does not support <xref target="persistent.connections" format="none">persistent connections</xref> MUST
2854   send the "close" connection option in every request message.
2857   A server that does not support <xref target="persistent.connections" format="none">persistent connections</xref> MUST
2858   send the "close" connection option in every response message that
2859   does not have a 1xx (Informational) status code.
2863<section title="Establishment" anchor="persistent.establishment">
2865   It is beyond the scope of this specification to describe how connections
2866   are established via various transport or session-layer protocols.
2867   Each connection applies to only one transport link.
2871<section title="Persistence" anchor="persistent.connections">
2874   HTTP/1.1 defaults to the use of "persistent connections",
2875   allowing multiple requests and responses to be carried over a single
2876   connection. The "<xref target="header.connection" format="none">close</xref>" connection-option is used to signal
2877   that a connection will not persist after the current request/response.
2878   HTTP implementations SHOULD support persistent connections.
2881   A recipient determines whether a connection is persistent or not based on
2882   the most recently received message's protocol version and
2883   <xref target="header.connection" format="none">Connection</xref> header field (if any):
2884   <list style="symbols">
2885     <t>If the <xref target="header.connection" format="none">close</xref> connection option is present, the
2886        connection will not persist after the current response; else,</t>
2887     <t>If the received protocol is HTTP/1.1 (or later), the connection will
2888        persist after the current response; else,</t>
2889     <t>If the received protocol is HTTP/1.0, the "keep-alive"
2890        connection option is present, the recipient is not a proxy, and
2891        the recipient wishes to honor the HTTP/1.0 "keep-alive" mechanism,
2892        the connection will persist after the current response; otherwise,</t>
2893     <t>The connection will close after the current response.</t>
2894   </list>
2897   A server MAY assume that an HTTP/1.1 client intends to maintain a
2898   persistent connection until a <xref target="header.connection" format="none">close</xref> connection option
2899   is received in a request.
2902   A client MAY reuse a persistent connection until it sends or receives
2903   a <xref target="header.connection" format="none">close</xref> connection option or receives an HTTP/1.0 response
2904   without a "keep-alive" connection option.
2907   In order to remain persistent, all messages on a connection need to
2908   have a self-defined message length (i.e., one not defined by closure
2909   of the connection), as described in <xref target="message.body"/>.
2910   A server MUST read the entire request message body or close
2911   the connection after sending its response, since otherwise the
2912   remaining data on a persistent connection would be misinterpreted
2913   as the next request.  Likewise,
2914   a client MUST read the entire response message body if it intends
2915   to reuse the same connection for a subsequent request.
2918   A proxy server MUST NOT maintain a persistent connection with an
2919   HTTP/1.0 client (see Section 19.7.1 of <xref target="RFC2068"/> for
2920   information and discussion of the problems with the Keep-Alive header field
2921   implemented by many HTTP/1.0 clients).
2924   Clients and servers SHOULD NOT assume that a persistent connection is
2925   maintained for HTTP versions less than 1.1 unless it is explicitly
2926   signaled.
2927   See <xref target="compatibility.with.http.1.0.persistent.connections"/>
2928   for more information on backward compatibility with HTTP/1.0 clients.
2931<section title="Retrying Requests" anchor="persistent.retrying.requests">
2933   Connections can be closed at any time, with or without intention.
2934   Implementations ought to anticipate the need to recover
2935   from asynchronous close events.
2938   When an inbound connection is closed prematurely, a client MAY open a new
2939   connection and automatically retransmit an aborted sequence of requests if
2940   all of those requests have idempotent methods (Section 4.2.2 of <xref target="Part2"/>).
2941   A proxy MUST NOT automatically retry non-idempotent requests.
2944   A user agent MUST NOT automatically retry a request with a non-idempotent
2945   method unless it has some means to know that the request semantics are
2946   actually idempotent, regardless of the method, or some means to detect that
2947   the original request was never applied. For example, a user agent that
2948   knows (through design or configuration) that a POST request to a given
2949   resource is safe can repeat that request automatically.
2950   Likewise, a user agent designed specifically to operate on a version
2951   control repository might be able to recover from partial failure conditions
2952   by checking the target resource revision(s) after a failed connection,
2953   reverting or fixing any changes that were partially applied, and then
2954   automatically retrying the requests that failed.
2957   A client SHOULD NOT automatically retry a failed automatic retry.
2961<section title="Pipelining" anchor="pipelining">
2964   A client that supports persistent connections MAY "pipeline"
2965   its requests (i.e., send multiple requests without waiting for each
2966   response). A server MAY process a sequence of pipelined requests in
2967   parallel if they all have safe methods (Section 4.2.1 of <xref target="Part2"/>), but MUST send
2968   the corresponding responses in the same order that the requests were
2969   received.
2972   A client that pipelines requests SHOULD retry unanswered requests if the
2973   connection closes before it receives all of the corresponding responses.
2974   When retrying pipelined requests after a failed connection (a connection
2975   not explicitly closed by the server in its last complete response), a
2976   client MUST NOT pipeline immediately after connection establishment,
2977   since the first remaining request in the prior pipeline might have caused
2978   an error response that can be lost again if multiple requests are sent on a
2979   prematurely closed connection (see the TCP reset problem described in
2980   <xref target="persistent.tear-down"/>).
2983   Idempotent methods (Section 4.2.2 of <xref target="Part2"/>) are significant to pipelining
2984   because they can be automatically retried after a connection failure.
2985   A user agent SHOULD NOT pipeline requests after a non-idempotent method,
2986   until the final response status code for that method has been received,
2987   unless the user agent has a means to detect and recover from partial
2988   failure conditions involving the pipelined sequence.
2991   An intermediary that receives pipelined requests MAY pipeline those
2992   requests when forwarding them inbound, since it can rely on the outbound
2993   user agent(s) to determine what requests can be safely pipelined. If the
2994   inbound connection fails before receiving a response, the pipelining
2995   intermediary MAY attempt to retry a sequence of requests that have yet
2996   to receive a response if the requests all have idempotent methods;
2997   otherwise, the pipelining intermediary SHOULD forward any received
2998   responses and then close the corresponding outbound connection(s) so that
2999   the outbound user agent(s) can recover accordingly.
3004<section title="Concurrency" anchor="persistent.concurrency">
3006   A client SHOULD limit the number of simultaneous open
3007   connections that it maintains to a given server.
3010   Previous revisions of HTTP gave a specific number of connections as a
3011   ceiling, but this was found to be impractical for many applications. As a
3012   result, this specification does not mandate a particular maximum number of
3013   connections, but instead encourages clients to be conservative when opening
3014   multiple connections.
3017   Multiple connections are typically used to avoid the "head-of-line
3018   blocking" problem, wherein a request that takes significant server-side
3019   processing and/or has a large payload blocks subsequent requests on the
3020   same connection. However, each connection consumes server resources.
3021   Furthermore, using multiple connections can cause undesirable side effects
3022   in congested networks.
3025   Note that servers might reject traffic that they deem abusive, including an
3026   excessive number of connections from a client.
3030<section title="Failures and Time-outs" anchor="persistent.failures">
3032   Servers will usually have some time-out value beyond which they will
3033   no longer maintain an inactive connection. Proxy servers might make
3034   this a higher value since it is likely that the client will be making
3035   more connections through the same server. The use of persistent
3036   connections places no requirements on the length (or existence) of
3037   this time-out for either the client or the server.
3040   A client or server that wishes to time-out SHOULD issue a graceful close
3041   on the connection. Implementations SHOULD constantly monitor open
3042   connections for a received closure signal and respond to it as appropriate,
3043   since prompt closure of both sides of a connection enables allocated system
3044   resources to be reclaimed.
3047   A client, server, or proxy MAY close the transport connection at any
3048   time. For example, a client might have started to send a new request
3049   at the same time that the server has decided to close the "idle"
3050   connection. From the server's point of view, the connection is being
3051   closed while it was idle, but from the client's point of view, a
3052   request is in progress.
3055   A server SHOULD sustain persistent connections, when possible, and allow
3056   the underlying
3057   transport's flow control mechanisms to resolve temporary overloads, rather
3058   than terminate connections with the expectation that clients will retry.
3059   The latter technique can exacerbate network congestion.
3062   A client sending a message body SHOULD monitor
3063   the network connection for an error response while it is transmitting
3064   the request. If the client sees a response that indicates the server does
3065   not wish to receive the message body and is closing the connection, the
3066   client SHOULD immediately cease transmitting the body and close its side
3067   of the connection.
3071<section title="Tear-down" anchor="persistent.tear-down">
3072  <iref primary="false" item="Connection header field"/>
3073  <iref primary="false" item="close"/>
3075   The <xref target="header.connection" format="none">Connection</xref> header field
3076   (<xref target="header.connection"/>) provides a "<xref target="header.connection" format="none">close</xref>"
3077   connection option that a sender SHOULD send when it wishes to close
3078   the connection after the current request/response pair.
3081   A client that sends a <xref target="header.connection" format="none">close</xref> connection option MUST NOT
3082   send further requests on that connection (after the one containing
3083   <xref target="header.connection" format="none">close</xref>) and MUST close the connection after reading the
3084   final response message corresponding to this request.
3087   A server that receives a <xref target="header.connection" format="none">close</xref> connection option MUST
3088   initiate a close of the connection (see below) after it sends the
3089   final response to the request that contained <xref target="header.connection" format="none">close</xref>.
3090   The server SHOULD send a <xref target="header.connection" format="none">close</xref> connection option
3091   in its final response on that connection. The server MUST NOT process
3092   any further requests received on that connection.
3095   A server that sends a <xref target="header.connection" format="none">close</xref> connection option MUST
3096   initiate a close of the connection (see below) after it sends the
3097   response containing <xref target="header.connection" format="none">close</xref>. The server MUST NOT process
3098   any further requests received on that connection.
3101   A client that receives a <xref target="header.connection" format="none">close</xref> connection option MUST
3102   cease sending requests on that connection and close the connection
3103   after reading the response message containing the close; if additional
3104   pipelined requests had been sent on the connection, the client SHOULD NOT
3105   assume that they will be processed by the server.
3108   If a server performs an immediate close of a TCP connection, there is a
3109   significant risk that the client will not be able to read the last HTTP
3110   response.  If the server receives additional data from the client on a
3111   fully-closed connection, such as another request that was sent by the
3112   client before receiving the server's response, the server's TCP stack will
3113   send a reset packet to the client; unfortunately, the reset packet might
3114   erase the client's unacknowledged input buffers before they can be read
3115   and interpreted by the client's HTTP parser.
3118   To avoid the TCP reset problem, servers typically close a connection in
3119   stages. First, the server performs a half-close by closing only the write
3120   side of the read/write connection. The server then continues to read from
3121   the connection until it receives a corresponding close by the client, or
3122   until the server is reasonably certain that its own TCP stack has received
3123   the client's acknowledgement of the packet(s) containing the server's last
3124   response. Finally, the server fully closes the connection.
3127   It is unknown whether the reset problem is exclusive to TCP or might also
3128   be found in other transport connection protocols.
3132<section title="Upgrade" anchor="header.upgrade">
3133  <iref primary="true" item="Upgrade header field"/>
3139   The "Upgrade" header field is intended to provide a simple mechanism
3140   for transitioning from HTTP/1.1 to some other protocol on the same
3141   connection.  A client MAY send a list of protocols in the Upgrade
3142   header field of a request to invite the server to switch to one or
3143   more of those protocols, in order of descending preference, before sending
3144   the final response. A server MAY ignore a received Upgrade header field
3145   if it wishes to continue using the current protocol on that connection.
3147<figure><iref primary="true" item="Grammar" subitem="Upgrade"/><artwork type="abnf2616"><![CDATA[
3148  Upgrade          = 1#protocol
3150  protocol         = protocol-name ["/" protocol-version]
3151  protocol-name    = token
3152  protocol-version = token
3155   A server that sends a 101 (Switching Protocols) response
3156   MUST send an Upgrade header field to indicate the new protocol(s) to
3157   which the connection is being switched; if multiple protocol layers are
3158   being switched, the sender MUST list the protocols in layer-ascending
3159   order. A server MUST NOT switch to a protocol that was not indicated by
3160   the client in the corresponding request's Upgrade header field.
3161   A server MAY choose to ignore the order of preference indicated by the
3162   client and select the new protocol(s) based on other factors, such as the
3163   nature of the request or the current load on the server.
3166   A server that sends a 426 (Upgrade Required) response
3167   MUST send an Upgrade header field to indicate the acceptable protocols,
3168   in order of descending preference.
3171   A server MAY send an Upgrade header field in any other response to
3172   advertise that it implements support for upgrading to the listed protocols,
3173   in order of descending preference, when appropriate for a future request.
3176   The following is a hypothetical example sent by a client:
3177</preamble><artwork type="message/http; msgtype=&#34;request&#34;"><![CDATA[
3178  GET /hello.txt HTTP/1.1
3179  Host:
3180  Connection: upgrade
3181  Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11
3183  ]]></artwork></figure>
3185   Upgrade cannot be used to insist on a protocol change; its acceptance and
3186   use by the server is optional. The capabilities and nature of the
3187   application-level communication after the protocol change is entirely
3188   dependent upon the new protocol(s) chosen. However, immediately after
3189   sending the 101 response, the server is expected to continue responding to
3190   the original request as if it had received its equivalent within the new
3191   protocol (i.e., the server still has an outstanding request to satisfy
3192   after the protocol has been changed, and is expected to do so without
3193   requiring the request to be repeated).
3196   For example, if the Upgrade header field is received in a GET request
3197   and the server decides to switch protocols, it first responds
3198   with a 101 (Switching Protocols) message in HTTP/1.1 and
3199   then immediately follows that with the new protocol's equivalent of a
3200   response to a GET on the target resource.  This allows a connection to be
3201   upgraded to protocols with the same semantics as HTTP without the
3202   latency cost of an additional round-trip.  A server MUST NOT switch
3203   protocols unless the received message semantics can be honored by the new
3204   protocol; an OPTIONS request can be honored by any protocol.
3207   The following is an example response to the above hypothetical request:
3208</preamble><artwork type="message/http; msgtype=&#34;response&#34;"><![CDATA[
3209  HTTP/1.1 101 Switching Protocols
3210  Connection: upgrade
3211  Upgrade: HTTP/2.0
3213  [... data stream switches to HTTP/2.0 with an appropriate response
3214  (as defined by new protocol) to the "GET /hello.txt" request ...]
3215  ]]></artwork></figure>
3217   When Upgrade is sent, the sender MUST also send a
3218   <xref target="header.connection" format="none">Connection</xref> header field (<xref target="header.connection"/>)
3219   that contains an "upgrade" connection option, in order to prevent Upgrade
3220   from being accidentally forwarded by intermediaries that might not implement
3221   the listed protocols.  A server MUST ignore an Upgrade header field that
3222   is received in an HTTP/1.0 request.
3225   A client cannot begin using an upgraded protocol on the connection until
3226   it has completely sent the request message (i.e., the client can't change
3227   the protocol it is sending in the middle of a message).
3228   If a server receives both Upgrade and an Expect header field
3229   with the "100-continue" expectation (Section 5.1.1 of <xref target="Part2"/>), the
3230   server MUST send a 100 (Continue) response before sending
3231   a 101 (Switching Protocols) response.
3234   The Upgrade header field only applies to switching protocols on top of the
3235   existing connection; it cannot be used to switch the underlying connection
3236   (transport) protocol, nor to switch the existing communication to a
3237   different connection. For those purposes, it is more appropriate to use a
3238   3xx (Redirection) response (Section 6.4 of <xref target="Part2"/>).
3241   This specification only defines the protocol name "HTTP" for use by
3242   the family of Hypertext Transfer Protocols, as defined by the HTTP
3243   version rules of <xref target="http.version"/> and future updates to this
3244   specification. Additional tokens ought to be registered with IANA using the
3245   registration procedure defined in <xref target="upgrade.token.registry"/>.
3250<section title="ABNF list extension: #rule" anchor="abnf.extension">
3252  A #rule extension to the ABNF rules of <xref target="RFC5234"/> is used to
3253  improve readability in the definitions of some header field values.
3256  A construct "#" is defined, similar to "*", for defining comma-delimited
3257  lists of elements. The full form is "&lt;n&gt;#&lt;m&gt;element" indicating
3258  at least &lt;n&gt; and at most &lt;m&gt; elements, each separated by a single
3259  comma (",") and optional whitespace (OWS).   
3262  Thus, a sender MUST expand the list construct as follows:
3263</preamble><artwork type="example"><![CDATA[
3264  1#element => element *( OWS "," OWS element )
3267  and:
3268</preamble><artwork type="example"><![CDATA[
3269  #element => [ 1#element ]
3272  and for n &gt;= 1 and m &gt; 1:
3273</preamble><artwork type="example"><![CDATA[
3274  <n>#<m>element => element <n-1>*<m-1>( OWS "," OWS element )
3277  For compatibility with legacy list rules, a recipient MUST parse and ignore
3278  a reasonable number of empty list elements: enough to handle common mistakes
3279  by senders that merge values, but not so much that they could be used as a
3280  denial of service mechanism. In other words, a recipient MUST expand the
3281  list construct as follows:
3283<figure><artwork type="example"><![CDATA[
3284  #element => [ ( "," / element ) *( OWS "," [ OWS element ] ) ]
3286  1#element => *( "," OWS ) element *( OWS "," [ OWS element ] )
3289  Empty elements do not contribute to the count of elements present.
3290  For example, given these ABNF productions:
3292<figure><artwork type="example"><![CDATA[
3293  example-list      = 1#example-list-elmt
3294  example-list-elmt = token ; see Section 3.2.6
3297  Then the following are valid values for example-list (not including the
3298  double quotes, which are present for delimitation only):
3300<figure><artwork type="example"><![CDATA[
3301  "foo,bar"
3302  "foo ,bar,"
3303  "foo , ,bar,charlie   "
3306  In contrast, the following values would be invalid, since at least one
3307  non-empty element is required by the example-list production:
3309<figure><artwork type="example"><![CDATA[
3310  ""
3311  ","
3312  ",   ,"
3315  <xref target="collected.abnf"/> shows the collected ABNF after the list
3316  constructs have been expanded, as described above, for recipients.
3320<section title="IANA Considerations" anchor="IANA.considerations">
3322<section title="Header Field Registration" anchor="header.field.registration">
3324   HTTP header fields are registered within the Message Header Field Registry
3325   maintained at
3326   <eref target=""/>.
3329   This document defines the following HTTP header fields, so their
3330   associated registry entries shall be updated according to the permanent
3331   registrations below (see <xref target="BCP90"/>):
3334<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
3335<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
3336   <ttcol>Header Field Name</ttcol>
3337   <ttcol>Protocol</ttcol>
3338   <ttcol>Status</ttcol>
3339   <ttcol>Reference</ttcol>
3341   <c>Connection</c>
3342   <c>http</c>
3343   <c>standard</c>
3344   <c>
3345      <xref target="header.connection"/>
3346   </c>
3347   <c>Content-Length</c>
3348   <c>http</c>
3349   <c>standard</c>
3350   <c>
3351      <xref target="header.content-length"/>
3352   </c>
3353   <c>Host</c>
3354   <c>http</c>
3355   <c>standard</c>
3356   <c>
3357      <xref target=""/>
3358   </c>
3359   <c>TE</c>
3360   <c>http</c>
3361   <c>standard</c>
3362   <c>
3363      <xref target="header.te"/>
3364   </c>
3365   <c>Trailer</c>
3366   <c>http</c>
3367   <c>standard</c>
3368   <c>
3369      <xref target="header.trailer"/>
3370   </c>
3371   <c>Transfer-Encoding</c>
3372   <c>http</c>
3373   <c>standard</c>
3374   <c>
3375      <xref target="header.transfer-encoding"/>
3376   </c>
3377   <c>Upgrade</c>
3378   <c>http</c>
3379   <c>standard</c>
3380   <c>
3381      <xref target="header.upgrade"/>
3382   </c>
3383   <c>Via</c>
3384   <c>http</c>
3385   <c>standard</c>
3386   <c>
3387      <xref target="header.via"/>
3388   </c>
3393   Furthermore, the header field-name "Close" shall be registered as
3394   "reserved", since using that name as an HTTP header field might
3395   conflict with the "close" connection option of the "<xref target="header.connection" format="none">Connection</xref>"
3396   header field (<xref target="header.connection"/>).
3398<texttable align="left" suppress-title="true">
3399   <ttcol>Header Field Name</ttcol>
3400   <ttcol>Protocol</ttcol>
3401   <ttcol>Status</ttcol>
3402   <ttcol>Reference</ttcol>
3404   <c>Close</c>
3405   <c>http</c>
3406   <c>reserved</c>
3407   <c>
3408      <xref target="header.field.registration"/>
3409   </c>
3412   The change controller is: "IETF ( - Internet Engineering Task Force".
3416<section title="URI Scheme Registration" anchor="uri.scheme.registration">
3418   IANA maintains the registry of URI Schemes <xref target="BCP115"/> at
3419   <eref target=""/>.
3422   This document defines the following URI schemes, so their
3423   associated registry entries shall be updated according to the permanent
3424   registrations below:
3426<texttable align="left" suppress-title="true">
3427   <ttcol>URI Scheme</ttcol>
3428   <ttcol>Description</ttcol>
3429   <ttcol>Reference</ttcol>
3431   <c>http</c>
3432   <c>Hypertext Transfer Protocol</c>
3433   <c><xref target="http.uri"/></c>
3435   <c>https</c>
3436   <c>Hypertext Transfer Protocol Secure</c>
3437   <c><xref target="https.uri"/></c>
3441<section title="Internet Media Type Registration" anchor="">
3443   IANA maintains the registry of Internet media types <xref target="BCP13"/> at
3444   <eref target=""/>.
3447   This document serves as the specification for the Internet media types
3448   "message/http" and "application/http". The following is to be registered with
3449   IANA.
3451<section title="Internet Media Type message/http" anchor="">
3452<iref item="Media Type" subitem="message/http" primary="true"/>
3453<iref item="message/http Media Type" primary="true"/>
3455   The message/http type can be used to enclose a single HTTP request or
3456   response message, provided that it obeys the MIME restrictions for all
3457   "message" types regarding line length and encodings.
3460  <list style="hanging">
3461    <t hangText="Type name:">
3462      message
3463    </t>
3464    <t hangText="Subtype name:">
3465      http
3466    </t>
3467    <t hangText="Required parameters:">
3468      none
3469    </t>
3470    <t hangText="Optional parameters:">
3471      version, msgtype
3472      <list style="hanging">
3473        <t hangText="version:">
3474          The HTTP-version number of the enclosed message
3475          (e.g., "1.1"). If not present, the version can be
3476          determined from the first line of the body.
3477        </t>
3478        <t hangText="msgtype:">
3479          The message type — "request" or "response". If not
3480          present, the type can be determined from the first
3481          line of the body.
3482        </t>
3483      </list>
3484    </t>
3485    <t hangText="Encoding considerations:">
3486      only "7bit", "8bit", or "binary" are permitted
3487    </t>
3488    <t hangText="Security considerations:">
3489      none
3490    </t>
3491    <t hangText="Interoperability considerations:">
3492      none
3493    </t>
3494    <t hangText="Published specification:">
3495      This specification (see <xref target=""/>).
3496    </t>
3497    <t hangText="Applications that use this media type:">
3498    </t>
3499    <t hangText="Additional information:">
3500      <list style="hanging">
3501        <t hangText="Magic number(s):">none</t>
3502        <t hangText="File extension(s):">none</t>
3503        <t hangText="Macintosh file type code(s):">none</t>
3504      </list>
3505    </t>
3506    <t hangText="Person and email address to contact for further information:">
3507      See Authors Section.
3508    </t>
3509    <t hangText="Intended usage:">
3510      COMMON
3511    </t>
3512    <t hangText="Restrictions on usage:">
3513      none
3514    </t>
3515    <t hangText="Author:">
3516      See Authors Section.
3517    </t>
3518    <t hangText="Change controller:">
3519      IESG
3520    </t>
3521  </list>
3524<section title="Internet Media Type application/http" anchor="">
3525<iref item="Media Type" subitem="application/http" primary="true"/>
3526<iref item="application/http Media Type" primary="true"/>
3528   The application/http type can be used to enclose a pipeline of one or more
3529   HTTP request or response messages (not intermixed).
3532  <list style="hanging">
3533    <t hangText="Type name:">
3534      application
3535    </t>
3536    <t hangText="Subtype name:">
3537      http
3538    </t>
3539    <t hangText="Required parameters:">
3540      none
3541    </t>
3542    <t hangText="Optional parameters:">
3543      version, msgtype
3544      <list style="hanging">
3545        <t hangText="version:">
3546          The HTTP-version number of the enclosed messages
3547          (e.g., "1.1"). If not present, the version can be
3548          determined from the first line of the body.
3549        </t>
3550        <t hangText="msgtype:">
3551          The message type — "request" or "response". If not
3552          present, the type can be determined from the first
3553          line of the body.
3554        </t>
3555      </list>
3556    </t>
3557    <t hangText="Encoding considerations:">
3558      HTTP messages enclosed by this type
3559      are in "binary" format; use of an appropriate
3560      Content-Transfer-Encoding is required when
3561      transmitted via E-mail.
3562    </t>
3563    <t hangText="Security considerations:">
3564      none
3565    </t>
3566    <t hangText="Interoperability considerations:">
3567      none
3568    </t>
3569    <t hangText="Published specification:">
3570      This specification (see <xref target=""/>).
3571    </t>
3572    <t hangText="Applications that use this media type:">
3573    </t>
3574    <t hangText="Additional information:">
3575      <list style="hanging">
3576        <t hangText="Magic number(s):">none</t>
3577        <t hangText="File extension(s):">none</t>
3578        <t hangText="Macintosh file type code(s):">none</t>
3579      </list>
3580    </t>
3581    <t hangText="Person and email address to contact for further information:">
3582      See Authors Section.
3583    </t>
3584    <t hangText="Intended usage:">
3585      COMMON
3586    </t>
3587    <t hangText="Restrictions on usage:">
3588      none
3589    </t>
3590    <t hangText="Author:">
3591      See Authors Section.
3592    </t>
3593    <t hangText="Change controller:">
3594      IESG
3595    </t>
3596  </list>
3601<section title="Transfer Coding Registry" anchor="transfer.coding.registry">
3603   The HTTP Transfer Coding Registry defines the name space for transfer
3604   coding names. It is maintained at <eref target=""/>.
3607<section title="Procedure" anchor="transfer.coding.registry.procedure">
3609   Registrations MUST include the following fields:
3610   <list style="symbols">
3611     <t>Name</t>
3612     <t>Description</t>
3613     <t>Pointer to specification text</t>
3614   </list>
3617   Names of transfer codings MUST NOT overlap with names of content codings
3618   (Section of <xref target="Part2"/>) unless the encoding transformation is identical, as
3619   is the case for the compression codings defined in
3620   <xref target="compression.codings"/>.
3623   Values to be added to this name space require IETF Review (see
3624   Section 4.1 of <xref target="RFC5226"/>), and MUST
3625   conform to the purpose of transfer coding defined in this specification.
3628   Use of program names for the identification of encoding formats
3629   is not desirable and is discouraged for future encodings.
3633<section title="Registration" anchor="transfer.coding.registration">
3635   The HTTP Transfer Coding Registry shall be updated with the registrations
3636   below:
3638<texttable align="left" suppress-title="true" anchor="iana.transfer.coding.registration.table">
3639   <ttcol>Name</ttcol>
3640   <ttcol>Description</ttcol>
3641   <ttcol>Reference</ttcol>
3642   <c>chunked</c>
3643   <c>Transfer in a series of chunks</c>
3644   <c>
3645      <xref target="chunked.encoding"/>
3646   </c>
3647   <c>compress</c>
3648   <c>UNIX "compress" data format <xref target="Welch"/></c>
3649   <c>
3650      <xref target="compress.coding"/>
3651   </c>
3652   <c>deflate</c>
3653   <c>"deflate" compressed data (<xref target="RFC1951"/>) inside
3654   the "zlib" data format (<xref target="RFC1950"/>)
3655   </c>
3656   <c>
3657      <xref target="deflate.coding"/>
3658   </c>
3659   <c>gzip</c>
3660   <c>GZIP file format <xref target="RFC1952"/></c>
3661   <c>
3662      <xref target="gzip.coding"/>
3663   </c>
3664   <c>x-compress</c>
3665   <c>Deprecated (alias for compress)</c>
3666   <c>
3667      <xref target="compress.coding"/>
3668   </c>
3669   <c>x-gzip</c>
3670   <c>Deprecated (alias for gzip)</c>
3671   <c>
3672      <xref target="gzip.coding"/>
3673   </c>
3678<section title="Content Coding Registration" anchor="content.coding.registration">
3680   IANA maintains the registry of HTTP Content Codings at
3681   <eref target=""/>.
3684   The HTTP Content Codings Registry shall be updated with the registrations
3685   below:
3687<texttable align="left" suppress-title="true" anchor="iana.content.coding.registration.table">
3688   <ttcol>Name</ttcol>
3689   <ttcol>Description</ttcol>
3690   <ttcol>Reference</ttcol>
3691   <c>compress</c>
3692   <c>UNIX "compress" data format <xref target="Welch"/></c>
3693   <c>
3694      <xref target="compress.coding"/>
3695   </c>
3696   <c>deflate</c>
3697   <c>"deflate" compressed data (<xref target="RFC1951"/>) inside
3698   the "zlib" data format (<xref target="RFC1950"/>)</c>
3699   <c>
3700      <xref target="deflate.coding"/>
3701   </c>
3702   <c>gzip</c>
3703   <c>GZIP file format <xref target="RFC1952"/></c>
3704   <c>
3705      <xref target="gzip.coding"/>
3706   </c>
3707   <c>x-compress</c>
3708   <c>Deprecated (alias for compress)</c>
3709   <c>
3710      <xref target="compress.coding"/>
3711   </c>
3712   <c>x-gzip</c>
3713   <c>Deprecated (alias for gzip)</c>
3714   <c>
3715      <xref target="gzip.coding"/>
3716   </c>
3720<section title="Upgrade Token Registry" anchor="upgrade.token.registry">
3722   The HTTP Upgrade Token Registry defines the name space for protocol-name
3723   tokens used to identify protocols in the <xref target="header.upgrade" format="none">Upgrade</xref> header
3724   field. The registry is maintained at <eref target=""/>.
3727<section title="Procedure" anchor="upgrade.token.registry.procedure">  
3729   Each registered protocol name is associated with contact information
3730   and an optional set of specifications that details how the connection
3731   will be processed after it has been upgraded.
3734   Registrations happen on a "First Come First Served" basis (see
3735   Section 4.1 of <xref target="RFC5226"/>) and are subject to the
3736   following rules:
3737  <list style="numbers">
3738    <t>A protocol-name token, once registered, stays registered forever.</t>
3739    <t>The registration MUST name a responsible party for the
3740       registration.</t>
3741    <t>The registration MUST name a point of contact.</t>
3742    <t>The registration MAY name a set of specifications associated with
3743       that token. Such specifications need not be publicly available.</t>
3744    <t>The registration SHOULD name a set of expected "protocol-version"
3745       tokens associated with that token at the time of registration.</t>
3746    <t>The responsible party MAY change the registration at any time.
3747       The IANA will keep a record of all such changes, and make them
3748       available upon request.</t>
3749    <t>The IESG MAY reassign responsibility for a protocol token.
3750       This will normally only be used in the case when a
3751       responsible party cannot be contacted.</t>
3752  </list>
3755   This registration procedure for HTTP Upgrade Tokens replaces that
3756   previously defined in Section 7.2 of <xref target="RFC2817"/>.
3760<section title="Upgrade Token Registration" anchor="upgrade.token.registration">
3762   The "HTTP" entry in the HTTP Upgrade Token Registry shall be updated with
3763   the registration below:
3765<texttable align="left" suppress-title="true">
3766   <ttcol>Value</ttcol>
3767   <ttcol>Description</ttcol>
3768   <ttcol>Expected Version Tokens</ttcol>
3769   <ttcol>Reference</ttcol>
3771   <c>HTTP</c>
3772   <c>Hypertext Transfer Protocol</c>
3773   <c>any DIGIT.DIGIT (e.g, "2.0")</c>
3774   <c><xref target="http.version"/></c>
3777   The responsible party is: "IETF ( - Internet Engineering Task Force".
3784<section title="Security Considerations" anchor="security.considerations">
3786   This section is meant to inform developers, information providers, and
3787   users of known security concerns relevant to HTTP/1.1 message syntax,
3788   parsing, and routing.
3791<section title="DNS-related Attacks" anchor="dns.related.attacks">
3793   HTTP clients rely heavily on the Domain Name Service (DNS), and are thus
3794   generally prone to security attacks based on the deliberate misassociation
3795   of IP addresses and DNS names not protected by DNSSEC. Clients need to be
3796   cautious in assuming the validity of an IP number/DNS name association unless
3797   the response is protected by DNSSEC (<xref target="RFC4033"/>).
3801<section title="Intermediaries and Caching" anchor="attack.intermediaries">
3803   By their very nature, HTTP intermediaries are men-in-the-middle, and
3804   represent an opportunity for man-in-the-middle attacks. Compromise of
3805   the systems on which the intermediaries run can result in serious security
3806   and privacy problems. Intermediaries have access to security-related
3807   information, personal information about individual users and
3808   organizations, and proprietary information belonging to users and
3809   content providers. A compromised intermediary, or an intermediary
3810   implemented or configured without regard to security and privacy
3811   considerations, might be used in the commission of a wide range of
3812   potential attacks.
3815   Intermediaries that contain a shared cache are especially vulnerable
3816   to cache poisoning attacks.
3819   Implementers need to consider the privacy and security
3820   implications of their design and coding decisions, and of the
3821   configuration options they provide to operators (especially the
3822   default configuration).
3825   Users need to be aware that intermediaries are no more trustworthy than
3826   the people who run them; HTTP itself cannot solve this problem.
3830<section title="Buffer Overflows" anchor="attack.protocol.element.size.overflows">
3832   Because HTTP uses mostly textual, character-delimited fields, attackers can
3833   overflow buffers in implementations, and/or perform a Denial of Service
3834   against implementations that accept fields with unlimited lengths.
3837   To promote interoperability, this specification makes specific
3838   recommendations for minimum size limits on request-line
3839   (<xref target="request.line"/>)
3840   and header fields (<xref target="header.fields"/>). These are
3841   minimum recommendations, chosen to be supportable even by implementations
3842   with limited resources; it is expected that most implementations will
3843   choose substantially higher limits.
3846   This specification also provides a way for servers to reject messages that
3847   have request-targets that are too long (Section 6.5.12 of <xref target="Part2"/>) or request entities
3848   that are too large (Section 6.5 of <xref target="Part2"/>). Additional status codes related to
3849   capacity limits have been defined by extensions to HTTP
3850   <xref target="RFC6585"/>.
3853   Recipients ought to carefully limit the extent to which they read other
3854   fields, including (but not limited to) request methods, response status
3855   phrases, header field-names, and body chunks, so as to avoid denial of
3856   service attacks without impeding interoperability.
3860<section title="Message Integrity" anchor="message.integrity">
3862   HTTP does not define a specific mechanism for ensuring message integrity,
3863   instead relying on the error-detection ability of underlying transport
3864   protocols and the use of length or chunk-delimited framing to detect
3865   completeness. Additional integrity mechanisms, such as hash functions or
3866   digital signatures applied to the content, can be selectively added to
3867   messages via extensible metadata header fields. Historically, the lack of
3868   a single integrity mechanism has been justified by the informal nature of
3869   most HTTP communication.  However, the prevalence of HTTP as an information
3870   access mechanism has resulted in its increasing use within environments
3871   where verification of message integrity is crucial.
3874   User agents are encouraged to implement configurable means for detecting
3875   and reporting failures of message integrity such that those means can be
3876   enabled within environments for which integrity is necessary. For example,
3877   a browser being used to view medical history or drug interaction
3878   information needs to indicate to the user when such information is detected
3879   by the protocol to be incomplete, expired, or corrupted during transfer.
3880   Such mechanisms might be selectively enabled via user agent extensions or
3881   the presence of message integrity metadata in a response.
3882   At a minimum, user agents ought to provide some indication that allows a
3883   user to distinguish between a complete and incomplete response message
3884   (<xref target="incomplete.messages"/>) when such verification is desired.
3888<section title="Server Log Information" anchor="abuse.of.server.log.information">
3890   A server is in the position to save personal data about a user's requests
3891   over time, which might identify their reading patterns or subjects of
3892   interest.  In particular, log information gathered at an intermediary
3893   often contains a history of user agent interaction, across a multitude
3894   of sites, that can be traced to individual users.
3897   HTTP log information is confidential in nature; its handling is often
3898   constrained by laws and regulations.  Log information needs to be securely
3899   stored and appropriate guidelines followed for its analysis.
3900   Anonymization of personal information within individual entries helps,
3901   but is generally not sufficient to prevent real log traces from being
3902   re-identified based on correlation with other access characteristics.
3903   As such, access traces that are keyed to a specific client are unsafe to
3904   publish even if the key is pseudonymous.
3907   To minimize the risk of theft or accidental publication, log information
3908   ought to be purged of personally identifiable information, including
3909   user identifiers, IP addresses, and user-provided query parameters,
3910   as soon as that information is no longer necessary to support operational
3911   needs for security, auditing, or fraud control.
3916<section title="Acknowledgments" anchor="acks">
3918   This edition of HTTP/1.1 builds on the many contributions that went into
3919   <xref target="RFC1945" format="none">RFC 1945</xref>,
3920   <xref target="RFC2068" format="none">RFC 2068</xref>,
3921   <xref target="RFC2145" format="none">RFC 2145</xref>, and
3922   <xref target="RFC2616" format="none">RFC 2616</xref>, including
3923   substantial contributions made by the previous authors, editors, and
3924   working group chairs: Tim Berners-Lee, Ari Luotonen, Roy T. Fielding,
3925   Henrik Frystyk Nielsen, Jim Gettys, Jeffrey C. Mogul, Larry Masinter,
3926   and Paul J. Leach. Mark Nottingham oversaw this effort as working group chair.
3929   Since 1999, the following contributors have helped improve the HTTP
3930   specification by reporting bugs, asking smart questions, drafting or
3931   reviewing text, and evaluating open issues:
3934<t>Adam Barth,
3935Adam Roach,
3936Addison Phillips,
3937Adrian Chadd,
3938Adrien W. de Croy,
3939Alan Ford,
3940Alan Ruttenberg,
3941Albert Lunde,
3942Alek Storm,
3943Alex Rousskov,
3944Alexandre Morgaut,
3945Alexey Melnikov,
3946Alisha Smith,
3947Amichai Rothman,
3948Amit Klein,
3949Amos Jeffries,
3950Andreas Maier,
3951Andreas Petersson,
3952Andrei Popov,
3953Anil Sharma,
3954Anne van Kesteren,
3955Anthony Bryan,
3956Asbjorn Ulsberg,
3957Ashok Kumar,
3958Balachander Krishnamurthy,
3959Barry Leiba,
3960Ben Laurie,
3961Benjamin Carlyle,
3962Benjamin Niven-Jenkins,
3963Bil Corry,
3964Bill Burke,
3965Bjoern Hoehrmann,
3966Bob Scheifler,
3967Boris Zbarsky,
3968Brett Slatkin,
3969Brian Kell,
3970Brian McBarron,
3971Brian Pane,
3972Brian Raymor,
3973Brian Smith,
3974Bryce Nesbitt,
3975Cameron Heavon-Jones,
3976Carl Kugler,
3977Carsten Bormann,
3978Charles Fry,
3979Chris Newman,
3980Cyrus Daboo,
3981Dale Robert Anderson,
3982Dan Wing,
3983Dan Winship,
3984Daniel Stenberg,
3985Darrel Miller,
3986Dave Cridland,
3987Dave Crocker,
3988Dave Kristol,
3989Dave Thaler,
3990David Booth,
3991David Singer,
3992David W. Morris,
3993Diwakar Shetty,
3994Dmitry Kurochkin,
3995Drummond Reed,
3996Duane Wessels,
3997Edward Lee,
3998Eitan Adler,
3999Eliot Lear,
4000Emile Stephan,
4001Eran Hammer-Lahav,
4002Eric D. Williams,
4003Eric J. Bowman,
4004Eric Lawrence,
4005Eric Rescorla,
4006Erik Aronesty,
4007EungJun Yi,
4008Evan Prodromou,
4009Felix Geisendoerfer,
4010Florian Weimer,
4011Frank Ellermann,
4012Fred Akalin,
4013Fred Bohle,
4014Frederic Kayser,
4015Gabor Molnar,
4016Gabriel Montenegro,
4017Geoffrey Sneddon,
4018Gervase Markham,
4019Gili Tzabari,
4020Grahame Grieve,
4021Greg Wilkins,
4022Grzegorz Calkowski,
4023Harald Tveit Alvestrand,
4024Harry Halpin,
4025Helge Hess,
4026Henrik Nordstrom,
4027Henry S. Thompson,
4028Henry Story,
4029Herbert van de Sompel,
4030Herve Ruellan,
4031Howard Melman,
4032Hugo Haas,
4033Ian Fette,
4034Ian Hickson,
4035Ido Safruti,
4036Ilari Liusvaara,
4037Ilya Grigorik,
4038Ingo Struck,
4039J. Ross Nicoll,
4040James Cloos,
4041James H. Manger,
4042James Lacey,
4043James M. Snell,
4044Jamie Lokier,
4045Jan Algermissen,
4046Jeff Hodges (who came up with the term 'effective Request-URI'),
4047Jeff Pinner,
4048Jeff Walden,
4049Jim Luther,
4050Jitu Padhye,
4051Joe D. Williams,
4052Joe Gregorio,
4053Joe Orton,
4054John C. Klensin,
4055John C. Mallery,
4056John Cowan,
4057John Kemp,
4058John Panzer,
4059John Schneider,
4060John Stracke,
4061John Sullivan,
4062Jonas Sicking,
4063Jonathan A. Rees,
4064Jonathan Billington,
4065Jonathan Moore,
4066Jonathan Silvera,
4067Jordi Ros,
4068Joris Dobbelsteen,
4069Josh Cohen,
4070Julien Pierre,
4071Jungshik Shin,
4072Justin Chapweske,
4073Justin Erenkrantz,
4074Justin James,
4075Kalvinder Singh,
4076Karl Dubost,
4077Keith Hoffman,
4078Keith Moore,
4079Ken Murchison,
4080Koen Holtman,
4081Konstantin Voronkov,
4082Kris Zyp,
4083Leif Hedstrom,
4084Lisa Dusseault,
4085Maciej Stachowiak,
4086Manu Sporny,
4087Marc Schneider,
4088Marc Slemko,
4089Mark Baker,
4090Mark Pauley,
4091Mark Watson,
4092Markus Isomaki,
4093Markus Lanthaler,
4094Martin J. Duerst,
4095Martin Musatov,
4096Martin Nilsson,
4097Martin Thomson,
4098Matt Lynch,
4099Matthew Cox,
4100Max Clark,
4101Michael Burrows,
4102Michael Hausenblas,
4103Michael Scharf,
4104Michael Sweet,
4105Michael Tuexen,
4106Michael Welzl,
4107Mike Amundsen,
4108Mike Belshe,
4109Mike Bishop,
4110Mike Kelly,
4111Mike Schinkel,
4112Miles Sabin,
4113Murray S. Kucherawy,
4114Mykyta Yevstifeyev,
4115Nathan Rixham,
4116Nicholas Shanks,
4117Nico Williams,
4118Nicolas Alvarez,
4119Nicolas Mailhot,
4120Noah Slater,
4121Osama Mazahir,
4122Pablo Castro,
4123Pat Hayes,
4124Patrick R. McManus,
4125Paul E. Jones,
4126Paul Hoffman,
4127Paul Marquess,
4128Peter Lepeska,
4129Peter Occil,
4130Peter Saint-Andre,
4131Peter Watkins,
4132Phil Archer,
4133Philippe Mougin,
4134Phillip Hallam-Baker,
4135Piotr Dobrogost,
4136Poul-Henning Kamp,
4137Preethi Natarajan,
4138Rajeev Bector,
4139Ray Polk,
4140Reto Bachmann-Gmuer,
4141Richard Cyganiak,
4142Robby Simpson,
4143Robert Brewer,
4144Robert Collins,
4145Robert Mattson,
4146Robert O'Callahan,
4147Robert Olofsson,
4148Robert Sayre,
4149Robert Siemer,
4150Robert de Wilde,
4151Roberto Javier Godoy,
4152Roberto Peon,
4153Roland Zink,
4154Ronny Widjaja,
4155Ryan Hamilton,
4156S. Mike Dierken,
4157Salvatore Loreto,
4158Sam Johnston,
4159Sam Pullara,
4160Sam Ruby,
4161Saurabh Kulkarni,
4162Scott Lawrence (who maintained the original issues list),
4163Sean B. Palmer,
4164Sebastien Barnoud,
4165Shane McCarron,
4166Shigeki Ohtsu,
4167Stefan Eissing,
4168Stefan Tilkov,
4169Stefanos Harhalakis,
4170Stephane Bortzmeyer,
4171Stephen Farrell,
4172Stephen Ludin,
4173Stuart Williams,
4174Subbu Allamaraju,
4175Subramanian Moonesamy,
4176Sylvain Hellegouarch,
4177Tapan Divekar,
4178Tatsuhiro Tsujikawa,
4179Tatsuya Hayashi,
4180Ted Hardie,
4181Thomas Broyer,
4182Thomas Fossati,
4183Thomas Maslen,
4184Thomas Nordin,
4185Thomas Roessler,
4186Tim Bray,
4187Tim Morgan,
4188Tim Olsen,
4189Tom Zhou,
4190Travis Snoozy,
4191Tyler Close,
4192Vincent Murphy,
4193Wenbo Zhu,
4194Werner Baumann,
4195Wilbur Streett,
4196Wilfredo Sanchez Vega,
4197William A. Rowe Jr.,
4198William Chan,
4199Willy Tarreau,
4200Xiaoshu Wang,
4201Yaron Goland,
4202Yngve Nysaeter Pettersen,
4203Yoav Nir,
4204Yogesh Bang,
4205Yuchung Cheng,
4206Yutaka Oiwa,
4207Yves Lafon (long-time member of the editor team),
4208Zed A. Shaw, and
4209Zhong Yu.
4213   See Section 16 of <xref target="RFC2616"/> for additional
4214   acknowledgements from prior revisions.
4221<references title="Normative References">
4223<reference anchor="Part2">
4224  <front>
4225    <title>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</title>
4226    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
4227      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
4228      <address><email></email></address>
4229    </author>
4230    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
4231      <organization abbrev="greenbytes">greenbytes GmbH</organization>
4232      <address><email></email></address>
4233    </author>
4234    <date month="November" year="2013"/>
4235  </front>
4236  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-25"/>
4240<reference anchor="Part4">
4241  <front>
4242    <title>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</title>
4243    <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
4244      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
4245      <address><email></email></address>
4246    </author>
4247    <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
4248      <organization abbrev="greenbytes">greenbytes GmbH</organization>
4249      <address><email></email></address>
4250    </author>
4251    <date month="November" year="2013"/>
4252  </front>
4253  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p4-conditional-25"/>
4257<reference anchor="Part5">
4258  <front>
4259    <title>Hypertext Transfer Protocol (HTTP/1.1): Range Requests</title>
4260    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
4261      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
4262      <address><email></email></address>
4263    </author>
4264    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
4265      <organization abbrev="W3C">World Wide Web Consortium</organization>
4266      <address><email></email></address>
4267    </author>
4268    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
4269      <organization abbrev="greenbytes">greenbytes GmbH</organization>
4270      <address><email></email></address>
4271    </author>
4272    <date month="November" year="2013"/>
4273  </front>
4274  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-25"/>
4278<reference anchor="Part6">
4279  <front>
4280    <title>Hypertext Transfer Protocol (HTTP/1.1): Caching</title>
4281    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
4282      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
4283      <address><email></email></address>
4284    </author>
4285    <author initials="M." surname="Nottingham" fullname="Mark Nottingham" role="editor">
4286      <organization>Akamai</organization>
4287      <address><email></email></address>
4288    </author>
4289    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
4290      <organization abbrev="greenbytes">greenbytes GmbH</organization>
4291      <address><email></email></address>
4292    </author>
4293    <date month="November" year="2013"/>
4294  </front>
4295  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-25"/>
4299<reference anchor="Part7">
4300  <front>
4301    <title>Hypertext Transfer Protocol (HTTP/1.1): Authentication</title>
4302    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
4303      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
4304      <address><email></email></address>
4305    </author>
4306    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
4307      <organization abbrev="greenbytes">greenbytes GmbH</organization>
4308      <address><email></email></address>
4309    </author>
4310    <date month="November" year="2013"/>
4311  </front>
4312  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p7-auth-25"/>
4316<reference anchor="RFC5234">
4317  <front>
4318    <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
4319    <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
4320      <organization>Brandenburg InternetWorking</organization>
4321      <address>
4322        <email></email>
4323      </address> 
4324    </author>
4325    <author initials="P." surname="Overell" fullname="Paul Overell">
4326      <organization>THUS plc.</organization>
4327      <address>
4328        <email></email>
4329      </address>
4330    </author>
4331    <date month="January" year="2008"/>
4332  </front>
4333  <seriesInfo name="STD" value="68"/>
4334  <seriesInfo name="RFC" value="5234"/>
4337<reference anchor="RFC2119">
4338  <front>
4339    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
4340    <author initials="S." surname="Bradner" fullname="Scott Bradner">
4341      <organization>Harvard University</organization>
4342      <address><email></email></address>
4343    </author>
4344    <date month="March" year="1997"/>
4345  </front>
4346  <seriesInfo name="BCP" value="14"/>
4347  <seriesInfo name="RFC" value="2119"/>
4350<reference anchor="RFC3986">
4351 <front>
4352  <title abbrev="URI Generic Syntax">Uniform Resource Identifier (URI): Generic Syntax</title>
4353  <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
4354    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
4355    <address>
4356       <email></email>
4357       <uri></uri>
4358    </address>
4359  </author>
4360  <author initials="R." surname="Fielding" fullname="Roy T. Fielding">
4361    <organization abbrev="Day Software">Day Software</organization>
4362    <address>
4363      <email></email>
4364      <uri></uri>
4365    </address>
4366  </author>
4367  <author initials="L." surname="Masinter" fullname="Larry Masinter">
4368    <organization abbrev="Adobe Systems">Adobe Systems Incorporated</organization>
4369    <address>
4370      <email></email>
4371      <uri></uri>
4372    </address>
4373  </author>
4374  <date month="January" year="2005"/>
4375 </front>
4376 <seriesInfo name="STD" value="66"/>
4377 <seriesInfo name="RFC" value="3986"/>
4380<reference anchor="RFC0793">
4381  <front>
4382    <title>Transmission Control Protocol</title>
4383    <author initials="J." surname="Postel" fullname="Jon Postel">
4384      <organization>University of Southern California (USC)/Information Sciences Institute</organization>
4385    </author>
4386    <date year="1981" month="September"/>
4387  </front>
4388  <seriesInfo name="STD" value="7"/>
4389  <seriesInfo name="RFC" value="793"/>
4392<reference anchor="USASCII">
4393  <front>
4394    <title>Coded Character Set -- 7-bit American Standard Code for Information Interchange</title>
4395    <author>
4396      <organization>American National Standards Institute</organization>
4397    </author>
4398    <date year="1986"/>
4399  </front>
4400  <seriesInfo name="ANSI" value="X3.4"/>
4403<reference anchor="RFC1950">
4404  <front>
4405    <title>ZLIB Compressed Data Format Specification version 3.3</title>
4406    <author initials="L.P." surname="Deutsch" fullname="L. Peter Deutsch">
4407      <organization>Aladdin Enterprises</organization>
4408      <address><email></email></address>
4409    </author>
4410    <author initials="J-L." surname="Gailly" fullname="Jean-Loup Gailly"/>
4411    <date month="May" year="1996"/>
4412  </front>
4413  <seriesInfo name="RFC" value="1950"/>
4414  <!--<annotation>
4415    RFC 1950 is an Informational RFC, thus it might be less stable than
4416    this specification. On the other hand, this downward reference was
4417    present since the publication of <xref target="RFC2068" x:fmt="none">RFC 2068</xref> in 1997,
4418    therefore it is unlikely to cause problems in practice. See also
4419    <xref target="BCP97"/>.
4420  </annotation>-->
4423<reference anchor="RFC1951">
4424  <front>
4425    <title>DEFLATE Compressed Data Format Specification version 1.3</title>
4426    <author initials="P." surname="Deutsch" fullname="L. Peter Deutsch">
4427      <organization>Aladdin Enterprises</organization>
4428      <address><email></email></address>
4429    </author>
4430    <date month="May" year="1996"/>
4431  </front>
4432  <seriesInfo name="RFC" value="1951"/>
4433  <!--<annotation>
4434    RFC 1951 is an Informational RFC, thus it might be less stable than
4435    this specification. On the other hand, this downward reference was
4436    present since the publication of <xref target="RFC2068" x:fmt="none">RFC 2068</xref> in 1997,
4437    therefore it is unlikely to cause problems in practice. See also
4438    <xref target="BCP97"/>.
4439  </annotation>-->
4442<reference anchor="RFC1952">
4443  <front>
4444    <title>GZIP file format specification version 4.3</title>
4445    <author initials="P." surname="Deutsch" fullname="L. Peter Deutsch">
4446      <organization>Aladdin Enterprises</organization>
4447      <address><email></email></address>
4448    </author>
4449    <author initials="J-L." surname="Gailly" fullname="Jean-Loup Gailly">
4450      <address><email></email></address>
4451    </author>
4452    <author initials="M." surname="Adler" fullname="Mark Adler">
4453      <address><email></email></address>
4454    </author>
4455    <author initials="L.P." surname="Deutsch" fullname="L. Peter Deutsch">
4456      <address><email></email></address>
4457    </author>
4458    <author initials="G." surname="Randers-Pehrson" fullname="Glenn Randers-Pehrson">
4459      <address><email></email></address>
4460    </author>
4461    <date month="May" year="1996"/>
4462  </front>
4463  <seriesInfo name="RFC" value="1952"/>
4464  <!--<annotation>
4465    RFC 1952 is an Informational RFC, thus it might be less stable than
4466    this specification. On the other hand, this downward reference was
4467    present since the publication of <xref target="RFC2068" x:fmt="none">RFC 2068</xref> in 1997,
4468    therefore it is unlikely to cause problems in practice. See also
4469    <xref target="BCP97"/>.
4470  </annotation>-->
4473<reference anchor="Welch">
4474  <front>
4475    <title>A Technique for High Performance Data Compression</title>
4476    <author initials="T.A." surname="Welch" fullname="Terry A. Welch"/>
4477    <date month="June" year="1984"/>
4478  </front>
4479  <seriesInfo name="IEEE Computer" value="17(6)"/>
4484<references title="Informative References">
4486<reference anchor="ISO-8859-1">
4487  <front>
4488    <title>
4489     Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1
4490    </title>
4491    <author>
4492      <organization>International Organization for Standardization</organization>
4493    </author>
4494    <date year="1998"/>
4495  </front>
4496  <seriesInfo name="ISO/IEC" value="8859-1:1998"/>
4499<reference anchor="RFC1919">
4500  <front>
4501    <title>Classical versus Transparent IP Proxies</title>
4502    <author initials="M." surname="Chatel" fullname="Marc Chatel">
4503      <address><email></email></address>
4504    </author>
4505    <date year="1996" month="March"/>
4506  </front>
4507  <seriesInfo name="RFC" value="1919"/>
4510<reference anchor="RFC1945">
4511  <front>
4512    <title abbrev="HTTP/1.0">Hypertext Transfer Protocol -- HTTP/1.0</title>
4513    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
4514      <organization>MIT, Laboratory for Computer Science</organization>
4515      <address><email></email></address>
4516    </author>
4517    <author initials="R.T." surname="Fielding" fullname="Roy T. Fielding">
4518      <organization>University of California, Irvine, Department of Information and Computer Science</organization>
4519      <address><email></email></address>
4520    </author>
4521    <author initials="H.F." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
4522      <organization>W3 Consortium, MIT Laboratory for Computer Science</organization>
4523      <address><email></email></address>
4524    </author>
4525    <date month="May" year="1996"/>
4526  </front>
4527  <seriesInfo name="RFC" value="1945"/>
4530<reference anchor="RFC2045">
4531  <front>
4532    <title abbrev="Internet Message Bodies">Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</title>
4533    <author initials="N." surname="Freed" fullname="Ned Freed">
4534      <organization>Innosoft International, Inc.</organization>
4535      <address><email></email></address>
4536    </author>
4537    <author initials="N.S." surname="Borenstein" fullname="Nathaniel S. Borenstein">
4538      <organization>First Virtual Holdings</organization>
4539      <address><email></email></address>
4540    </author>
4541    <date month="November" year="1996"/>
4542  </front>
4543  <seriesInfo name="RFC" value="2045"/>
4546<reference anchor="RFC2047">
4547  <front>
4548    <title abbrev="Message Header Extensions">MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text</title>
4549    <author initials="K." surname="Moore" fullname="Keith Moore">
4550      <organization>University of Tennessee</organization>
4551      <address><email></email></address>
4552    </author>
4553    <date month="November" year="1996"/>
4554  </front>
4555  <seriesInfo name="RFC" value="2047"/>
4558<reference anchor="RFC2068">
4559  <front>
4560    <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
4561    <author initials="R." surname="Fielding" fullname="Roy T. Fielding">
4562      <organization>University of California, Irvine, Department of Information and Computer Science</organization>
4563      <address><email></email></address>
4564    </author>
4565    <author initials="J." surname="Gettys" fullname="Jim Gettys">
4566      <organization>MIT Laboratory for Computer Science</organization>
4567      <address><email></email></address>
4568    </author>
4569    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
4570      <organization>Digital Equipment Corporation, Western Research Laboratory</organization>
4571      <address><email></email></address>
4572    </author>
4573    <author initials="H." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
4574      <organization>MIT Laboratory for Computer Science</organization>
4575      <address><email></email></address>
4576    </author>
4577    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
4578      <organization>MIT Laboratory for Computer Science</organization>
4579      <address><email></email></address>
4580    </author>
4581    <date month="January" year="1997"/>
4582  </front>
4583  <seriesInfo name="RFC" value="2068"/>
4586<reference anchor="RFC2145">
4587  <front>
4588    <title abbrev="HTTP Version Numbers">Use and Interpretation of HTTP Version Numbers</title>
4589    <author initials="J.C." surname="Mogul" fullname="Jeffrey C. Mogul">
4590      <organization>Western Research Laboratory</organization>
4591      <address><email></email></address>
4592    </author>
4593    <author initials="R.T." surname="Fielding" fullname="Roy T. Fielding">
4594      <organization>Department of Information and Computer Science</organization>
4595      <address><email></email></address>
4596    </author>
4597    <author initials="J." surname="Gettys" fullname="Jim Gettys">
4598      <organization>MIT Laboratory for Computer Science</organization>
4599      <address><email></email></address>
4600    </author>
4601    <author initials="H.F." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
4602      <organization>W3 Consortium</organization>
4603      <address><email></email></address>
4604    </author>
4605    <date month="May" year="1997"/>
4606  </front>
4607  <seriesInfo name="RFC" value="2145"/>
4610<reference anchor="RFC2616">
4611  <front>
4612    <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
4613    <author initials="R." surname="Fielding" fullname="R. Fielding">
4614      <organization>University of California, Irvine</organization>
4615      <address><email></email></address>
4616    </author>
4617    <author initials="J." surname="Gettys" fullname="J. Gettys">
4618      <organization>W3C</organization>
4619      <address><email></email></address>
4620    </author>
4621    <author initials="J." surname="Mogul" fullname="J. Mogul">
4622      <organization>Compaq Computer Corporation</organization>
4623      <address><email></email></address>
4624    </author>
4625    <author initials="H." surname="Frystyk" fullname="H. Frystyk">
4626      <organization>MIT Laboratory for Computer Science</organization>
4627      <address><email></email></address>
4628    </author>
4629    <author initials="L." surname="Masinter" fullname="L. Masinter">
4630      <organization>Xerox Corporation</organization>
4631      <address><email></email></address>
4632    </author>
4633    <author initials="P." surname="Leach" fullname="P. Leach">
4634      <organization>Microsoft Corporation</organization>
4635      <address><email></email></address>
4636    </author>
4637    <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
4638      <organization>W3C</organization>
4639      <address><email></email></address>
4640    </author>
4641    <date month="June" year="1999"/>
4642  </front>
4643  <seriesInfo name="RFC" value="2616"/>
4646<reference anchor="RFC2817">
4647  <front>
4648    <title>Upgrading to TLS Within HTTP/1.1</title>
4649    <author initials="R." surname="Khare" fullname="R. Khare">
4650      <organization>4K Associates / UC Irvine</organization>
4651      <address><email></email></address>
4652    </author>
4653    <author initials="S." surname="Lawrence" fullname="S. Lawrence">
4654      <organization>Agranat Systems, Inc.</organization>
4655      <address><email></email></address>
4656    </author>
4657    <date year="2000" month="May"/>
4658  </front>
4659  <seriesInfo name="RFC" value="2817"/>
4662<reference anchor="RFC2818">
4663  <front>
4664    <title>HTTP Over TLS</title>
4665    <author initials="E." surname="Rescorla" fullname="Eric Rescorla">
4666      <organization>RTFM, Inc.</organization>
4667      <address><email></email></address>
4668    </author>
4669    <date year="2000" month="May"/>
4670  </front>
4671  <seriesInfo name="RFC" value="2818"/>
4674<reference anchor="RFC3040">
4675  <front>
4676    <title>Internet Web Replication and Caching Taxonomy</title>
4677    <author initials="I." surname="Cooper" fullname="I. Cooper">
4678      <organization>Equinix, Inc.</organization>
4679    </author>
4680    <author initials="I." surname="Melve" fullname="I. Melve">
4681      <organization>UNINETT</organization>
4682    </author>
4683    <author initials="G." surname="Tomlinson" fullname="G. Tomlinson">
4684      <organization>CacheFlow Inc.</organization>
4685    </author>
4686    <date year="2001" month="January"/>
4687  </front>
4688  <seriesInfo name="RFC" value="3040"/>
4691<reference anchor="BCP90">
4692  <front>
4693    <title>Registration Procedures for Message Header Fields</title>
4694    <author initials="G." surname="Klyne" fullname="G. Klyne">
4695      <organization>Nine by Nine</organization>
4696      <address><email></email></address>
4697    </author>
4698    <author initials="M." surname="Nottingham" fullname="M. Nottingham">
4699      <organization>BEA Systems</organization>
4700      <address><email></email></address>
4701    </author>
4702    <author initials="J." surname="Mogul" fullname="J. Mogul">
4703      <organization>HP Labs</organization>
4704      <address><email></email></address>
4705    </author>
4706    <date year="2004" month="September"/>
4707  </front>
4708  <seriesInfo name="BCP" value="90"/>
4709  <seriesInfo name="RFC" value="3864"/>
4712<reference anchor="RFC4033">
4713  <front>
4714    <title>DNS Security Introduction and Requirements</title>
4715    <author initials="R." surname="Arends" fullname="R. Arends"/>
4716    <author initials="R." surname="Austein" fullname="R. Austein"/>
4717    <author initials="M." surname="Larson" fullname="M. Larson"/>
4718    <author initials="D." surname="Massey" fullname="D. Massey"/>
4719    <author initials="S." surname="Rose" fullname="S. Rose"/>
4720    <date year="2005" month="March"/>
4721  </front>
4722  <seriesInfo name="RFC" value="4033"/>
4725<reference anchor="BCP13">
4726  <front>
4727    <title>Media Type Specifications and Registration Procedures</title>
4728    <author initials="N." surname="Freed" fullname="Ned Freed">
4729      <organization>Oracle</organization>
4730      <address>
4731        <email></email>
4732      </address>
4733    </author>
4734    <author initials="J." surname="Klensin" fullname="John C. Klensin">
4735      <address>
4736        <email></email>
4737      </address>
4738    </author>
4739    <author initials="T." surname="Hansen" fullname="Tony Hansen">
4740      <organization>AT&amp;T Laboratories</organization>
4741      <address>
4742        <email></email>
4743      </address>
4744    </author>
4745    <date year="2013" month="January"/>
4746  </front>
4747  <seriesInfo name="BCP" value="13"/>
4748  <seriesInfo name="RFC" value="6838"/>
4751<reference anchor="BCP115">
4752  <front>
4753    <title>Guidelines and Registration Procedures for New URI Schemes</title>
4754    <author initials="T." surname="Hansen" fullname="T. Hansen">
4755      <organization>AT&amp;T Laboratories</organization>
4756      <address>
4757        <email></email>
4758      </address>
4759    </author>
4760    <author initials="T." surname="Hardie" fullname="T. Hardie">
4761      <organization>Qualcomm, Inc.</organization>
4762      <address>
4763        <email></email>
4764      </address>
4765    </author>
4766    <author initials="L." surname="Masinter" fullname="L. Masinter">
4767      <organization>Adobe Systems</organization>
4768      <address>
4769        <email></email>
4770      </address>
4771    </author>
4772    <date year="2006" month="February"/>
4773  </front>
4774  <seriesInfo name="BCP" value="115"/>
4775  <seriesInfo name="RFC" value="4395"/>
4778<reference anchor="RFC4559">
4779  <front>
4780    <title>SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows</title>
4781    <author initials="K." surname="Jaganathan" fullname="K. Jaganathan"/>
4782    <author initials="L." surname="Zhu" fullname="L. Zhu"/>
4783    <author initials="J." surname="Brezak" fullname="J. Brezak"/>
4784    <date year="2006" month="June"/>
4785  </front>
4786  <seriesInfo name="RFC" value="4559"/>
4789<reference anchor="RFC5226">
4790  <front>
4791    <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
4792    <author initials="T." surname="Narten" fullname="T. Narten">
4793      <organization>IBM</organization>
4794      <address><email></email></address>
4795    </author>
4796    <author initials="H." surname="Alvestrand" fullname="H. Alvestrand">
4797      <organization>Google</organization>
4798      <address><email></email></address>
4799    </author>
4800    <date year="2008" month="May"/>
4801  </front>
4802  <seriesInfo name="BCP" value="26"/>
4803  <seriesInfo name="RFC" value="5226"/>
4806<reference anchor="RFC5246">
4807   <front>
4808      <title>The Transport Layer Security (TLS) Protocol Version 1.2</title>
4809      <author initials="T." surname="Dierks" fullname="T. Dierks">
4810         <organization/>
4811      </author>
4812      <author initials="E." surname="Rescorla" fullname="E. Rescorla">
4813         <organization>RTFM, Inc.</organization>
4814      </author>
4815      <date year="2008" month="August"/>
4816   </front>
4817   <seriesInfo name="RFC" value="5246"/>
4820<reference anchor="RFC5322">
4821  <front>
4822    <title>Internet Message Format</title>
4823    <author initials="P." surname="Resnick" fullname="P. Resnick">
4824      <organization>Qualcomm Incorporated</organization>
4825    </author>
4826    <date year="2008" month="October"/>
4827  </front>
4828  <seriesInfo name="RFC" value="5322"/>
4831<reference anchor="RFC6265">
4832  <front>
4833    <title>HTTP State Management Mechanism</title>
4834    <author initials="A." surname="Barth" fullname="Adam Barth">
4835      <organization abbrev="U.C. Berkeley">
4836        University of California, Berkeley
4837      </organization>
4838      <address><email></email></address>
4839    </author>
4840    <date year="2011" month="April"/>
4841  </front>
4842  <seriesInfo name="RFC" value="6265"/>
4845<reference anchor="RFC6585">
4846  <front>
4847    <title>Additional HTTP Status Codes</title>
4848    <author initials="M." surname="Nottingham" fullname="M. Nottingham">
4849      <organization>Rackspace</organization>
4850    </author>
4851    <author initials="R." surname="Fielding" fullname="R. Fielding">
4852      <organization>Adobe</organization>
4853    </author>
4854    <date year="2012" month="April"/>
4855   </front>
4856   <seriesInfo name="RFC" value="6585"/>
4859<!--<reference anchor='BCP97'>
4860  <front>
4861    <title>Handling Normative References to Standards-Track Documents</title>
4862    <author initials='J.' surname='Klensin' fullname='J. Klensin'>
4863      <address>
4864        <email></email>
4865      </address>
4866    </author>
4867    <author initials='S.' surname='Hartman' fullname='S. Hartman'>
4868      <organization>MIT</organization>
4869      <address>
4870        <email></email>
4871      </address>
4872    </author>
4873    <date year='2007' month='June' />
4874  </front>
4875  <seriesInfo name='BCP' value='97' />
4876  <seriesInfo name='RFC' value='4897' />
4879<reference anchor="Kri2001" target="">
4880  <front>
4881    <title>HTTP Cookies: Standards, Privacy, and Politics</title>
4882    <author initials="D." surname="Kristol" fullname="David M. Kristol"/>
4883    <date year="2001" month="November"/>
4884  </front>
4885  <seriesInfo name="ACM Transactions on Internet Technology" value="1(2)"/>
4891<section title="HTTP Version History" anchor="compatibility">
4893   HTTP has been in use by the World-Wide Web global information initiative
4894   since 1990. The first version of HTTP, later referred to as HTTP/0.9,
4895   was a simple protocol for hypertext data transfer across the Internet
4896   with only a single request method (GET) and no metadata.
4897   HTTP/1.0, as defined by <xref target="RFC1945"/>, added a range of request
4898   methods and MIME-like messaging that could include metadata about the data
4899   transferred and modifiers on the request/response semantics. However,
4900   HTTP/1.0 did not sufficiently take into consideration the effects of
4901   hierarchical proxies, caching, the need for persistent connections, or
4902   name-based virtual hosts. The proliferation of incompletely-implemented
4903   applications calling themselves "HTTP/1.0" further necessitated a
4904   protocol version change in order for two communicating applications
4905   to determine each other's true capabilities.
4908   HTTP/1.1 remains compatible with HTTP/1.0 by including more stringent
4909   requirements that enable reliable implementations, adding only
4910   those new features that will either be safely ignored by an HTTP/1.0
4911   recipient or only sent when communicating with a party advertising
4912   conformance with HTTP/1.1.
4915   It is beyond the scope of a protocol specification to mandate
4916   conformance with previous versions. HTTP/1.1 was deliberately
4917   designed, however, to make supporting previous versions easy.
4918   We would expect a general-purpose HTTP/1.1 server to understand
4919   any valid request in the format of HTTP/1.0 and respond appropriately
4920   with an HTTP/1.1 message that only uses features understood (or
4921   safely ignored) by HTTP/1.0 clients.  Likewise, we would expect
4922   an HTTP/1.1 client to understand any valid HTTP/1.0 response.
4925   Since HTTP/0.9 did not support header fields in a request,
4926   there is no mechanism for it to support name-based virtual
4927   hosts (selection of resource by inspection of the <xref target="" format="none">Host</xref> header
4928   field).  Any server that implements name-based virtual hosts
4929   ought to disable support for HTTP/0.9.  Most requests that
4930   appear to be HTTP/0.9 are, in fact, badly constructed HTTP/1.x
4931   requests wherein a buggy client failed to properly encode
4932   linear whitespace found in a URI reference and placed in
4933   the request-target.
4936<section title="Changes from HTTP/1.0" anchor="changes.from.1.0">
4938   This section summarizes major differences between versions HTTP/1.0
4939   and HTTP/1.1.
4942<section title="Multi-homed Web Servers" anchor="">
4944   The requirements that clients and servers support the <xref target="" format="none">Host</xref>
4945   header field (<xref target=""/>), report an error if it is
4946   missing from an HTTP/1.1 request, and accept absolute URIs (<xref target="request-target"/>)
4947   are among the most important changes defined by HTTP/1.1.
4950   Older HTTP/1.0 clients assumed a one-to-one relationship of IP
4951   addresses and servers; there was no other established mechanism for
4952   distinguishing the intended server of a request than the IP address
4953   to which that request was directed. The <xref target="" format="none">Host</xref> header field was
4954   introduced during the development of HTTP/1.1 and, though it was
4955   quickly implemented by most HTTP/1.0 browsers, additional requirements
4956   were placed on all HTTP/1.1 requests in order to ensure complete
4957   adoption.  At the time of this writing, most HTTP-based services
4958   are dependent upon the Host header field for targeting requests.
4962<section title="Keep-Alive Connections" anchor="compatibility.with.http.1.0.persistent.connections">
4964   In HTTP/1.0, each connection is established by the client prior to the
4965   request and closed by the server after sending the response. However, some
4966   implementations implement the explicitly negotiated ("Keep-Alive") version
4967   of persistent connections described in Section 19.7.1 of <xref target="RFC2068"/>.
4970   Some clients and servers might wish to be compatible with these previous
4971   approaches to persistent connections, by explicitly negotiating for them
4972   with a "Connection: keep-alive" request header field. However, some
4973   experimental implementations of HTTP/1.0 persistent connections are faulty;
4974   for example, if an HTTP/1.0 proxy server doesn't understand
4975   <xref target="header.connection" format="none">Connection</xref>, it will erroneously forward that header field
4976   to the next inbound server, which would result in a hung connection.
4979   One attempted solution was the introduction of a Proxy-Connection header
4980   field, targeted specifically at proxies. In practice, this was also
4981   unworkable, because proxies are often deployed in multiple layers, bringing
4982   about the same problem discussed above.
4985   As a result, clients are encouraged not to send the Proxy-Connection header
4986   field in any requests.
4989   Clients are also encouraged to consider the use of Connection: keep-alive
4990   in requests carefully; while they can enable persistent connections with
4991   HTTP/1.0 servers, clients using them will need to monitor the
4992   connection for "hung" requests (which indicate that the client ought stop
4993   sending the header field), and this mechanism ought not be used by clients
4994   at all when a proxy is being used.
4998<section title="Introduction of Transfer-Encoding" anchor="introduction.of.transfer-encoding">
5000   HTTP/1.1 introduces the <xref target="header.transfer-encoding" format="none">Transfer-Encoding</xref> header field
5001   (<xref target="header.transfer-encoding"/>).
5002   Transfer codings need to be decoded prior to forwarding an HTTP message
5003   over a MIME-compliant protocol.
5009<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
5011  HTTP's approach to error handling has been explained.
5012  (<xref target="conformance"/>)
5015  The HTTP-version ABNF production has been clarified to be case-sensitive.
5016  Additionally, version numbers has been restricted to single digits, due
5017  to the fact that implementations are known to handle multi-digit version
5018  numbers incorrectly.
5019  (<xref target="http.version"/>)
5022  Userinfo (i.e., username and password) are now disallowed in HTTP and
5023  HTTPS URIs, because of security issues related to their transmission on the
5024  wire.
5025  (<xref target="http.uri"/>)
5028  The HTTPS URI scheme is now defined by this specification; previously,
5029  it was done in  Section 2.4 of <xref target="RFC2818"/>.
5030  Furthermore, it implies end-to-end security.
5031  (<xref target="https.uri"/>)
5034  HTTP messages can be (and often are) buffered by implementations; despite
5035  it sometimes being available as a stream, HTTP is fundamentally a
5036  message-oriented protocol.
5037  Minimum supported sizes for various protocol elements have been
5038  suggested, to improve interoperability.
5039  (<xref target="http.message"/>)
5042  Invalid whitespace around field-names is now required to be rejected,
5043  because accepting it represents a security vulnerability.
5044  The ABNF productions defining header fields now only list the field value.
5045  (<xref target="header.fields"/>)
5048  Rules about implicit linear whitespace between certain grammar productions
5049  have been removed; now whitespace is only allowed where specifically
5050  defined in the ABNF.
5051  (<xref target="whitespace"/>)
5054  Header fields that span multiple lines ("line folding") are deprecated.
5055  (<xref target="field.parsing"/>)
5058  The NUL octet is no longer allowed in comment and quoted-string text, and
5059  handling of backslash-escaping in them has been clarified.
5060  The quoted-pair rule no longer allows escaping control characters other than
5061  HTAB.
5062  Non-ASCII content in header fields and the reason phrase has been obsoleted
5063  and made opaque (the TEXT rule was removed).
5064  (<xref target="field.components"/>)
5067  Bogus "<xref target="header.content-length" format="none">Content-Length</xref>" header fields are now required to be
5068  handled as errors by recipients.
5069  (<xref target="header.content-length"/>)
5072  The algorithm for determining the message body length has been clarified
5073  to indicate all of the special cases (e.g., driven by methods or status
5074  codes) that affect it, and that new protocol elements cannot define such
5075  special cases.
5076  CONNECT is a new, special case in determining message body length.
5077  "multipart/byteranges" is no longer a way of determining message body length
5078  detection.
5079  (<xref target="message.body.length"/>)
5082  The "identity" transfer coding token has been removed.
5083  (Sections <xref format="counter" target="message.body"/> and
5084  <xref format="counter" target="transfer.codings"/>)
5087  Chunk length does not include the count of the octets in the
5088  chunk header and trailer.
5089  Line folding in chunk extensions is  disallowed.
5090  (<xref target="chunked.encoding"/>)
5093  The meaning of the "deflate" content coding has been clarified.
5094  (<xref target="deflate.coding"/>)
5097  The segment + query components of RFC 3986 have been used to define the
5098  request-target, instead of abs_path from RFC 1808.
5099  The asterisk-form of the request-target is only allowed with the OPTIONS
5100  method.
5101  (<xref target="request-target"/>)
5104  The term "Effective Request URI" has been introduced.
5105  (<xref target="effective.request.uri"/>)
5108  Gateways do not need to generate <xref target="header.via" format="none">Via</xref> header fields anymore.
5109  (<xref target="header.via"/>)
5112  Exactly when "close" connection options have to be sent has been clarified.
5113  Also, "hop-by-hop" header fields are required to appear in the Connection header
5114  field; just because they're defined as hop-by-hop in this specification
5115  doesn't exempt them.
5116  (<xref target="header.connection"/>)
5119  The limit of two connections per server has been removed.
5120  An idempotent sequence of requests is no longer required to be retried.
5121  The requirement to retry requests under certain circumstances when the
5122  server prematurely closes the connection has been removed.
5123  Also, some extraneous requirements about when servers are allowed to close
5124  connections prematurely have been removed.
5125  (<xref target="persistent.connections"/>)
5128  The semantics of the <xref target="header.upgrade" format="none">Upgrade</xref> header field is now defined in
5129  responses other than 101 (this was incorporated from <xref target="RFC2817"/>). Furthermore, the ordering in the field value is now
5130  significant.
5131  (<xref target="header.upgrade"/>)
5134  Empty list elements in list productions (e.g., a list header field containing
5135  ", ,") have been deprecated.
5136  (<xref target="abnf.extension"/>)
5139  Registration of Transfer Codings now requires IETF Review
5140  (<xref target="transfer.coding.registry"/>)
5143  This specification now defines the Upgrade Token Registry, previously
5144  defined in Section 7.2 of <xref target="RFC2817"/>.
5145  (<xref target="upgrade.token.registry"/>)
5148  The expectation to support HTTP/0.9 requests has been removed.
5149  (<xref target="compatibility"/>)
5152  Issues with the Keep-Alive and Proxy-Connection header fields in requests
5153  are pointed out, with use of the latter being discouraged altogether.
5154  (<xref target="compatibility.with.http.1.0.persistent.connections"/>)
5160<section title="Collected ABNF" anchor="collected.abnf">
5162<artwork type="abnf" name="p1-messaging.parsed-abnf"><![CDATA[
5163BWS = OWS
5165Connection = *( "," OWS ) connection-option *( OWS "," [ OWS
5166 connection-option ] )
5167Content-Length = 1*DIGIT
5169HTTP-message = start-line *( header-field CRLF ) CRLF [ message-body
5170 ]
5171HTTP-name = %x48.54.54.50 ; HTTP
5172HTTP-version = HTTP-name "/" DIGIT "." DIGIT
5173Host = uri-host [ ":" port ]
5175OWS = *( SP / HTAB )
5177RWS = 1*( SP / HTAB )
5179TE = [ ( "," / t-codings ) *( OWS "," [ OWS t-codings ] ) ]
5180Trailer = *( "," OWS ) field-name *( OWS "," [ OWS field-name ] )
5181Transfer-Encoding = *( "," OWS ) transfer-coding *( OWS "," [ OWS
5182 transfer-coding ] )
5184URI-reference = <URI-reference, defined in [RFC3986], Section 4.1>
5185Upgrade = *( "," OWS ) protocol *( OWS "," [ OWS protocol ] )
5187Via = *( "," OWS ) ( received-protocol RWS received-by [ RWS comment
5188 ] ) *( OWS "," [ OWS ( received-protocol RWS received-by [ RWS
5189 comment ] ) ] )
5191absolute-URI = <absolute-URI, defined in [RFC3986], Section 4.3>
5192absolute-form = absolute-URI
5193absolute-path = 1*( "/" segment )
5194asterisk-form = "*"
5195attribute = token
5196authority = <authority, defined in [RFC3986], Section 3.2>
5197authority-form = authority
5199chunk = chunk-size [ chunk-ext ] CRLF chunk-data CRLF
5200chunk-data = 1*OCTET
5201chunk-ext = *( ";" chunk-ext-name [ "=" chunk-ext-val ] )
5202chunk-ext-name = token
5203chunk-ext-val = token / quoted-str-nf
5204chunk-size = 1*HEXDIG
5205chunked-body = *chunk last-chunk trailer-part CRLF
5206comment = "(" *( ctext / quoted-cpair / comment ) ")"
5207connection-option = token
5208ctext = HTAB / SP / %x21-27 ; '!'-'''
5209 / %x2A-5B ; '*'-'['
5210 / %x5D-7E ; ']'-'~'
5211 / obs-text
5213field-content = *( HTAB / SP / VCHAR / obs-text )
5214field-name = token
5215field-value = *( field-content / obs-fold )
5216fragment = <fragment, defined in [RFC3986], Section 3.5>
5218header-field = field-name ":" OWS field-value OWS
5219http-URI = "http://" authority path-abempty [ "?" query ] [ "#"
5220 fragment ]
5221https-URI = "https://" authority path-abempty [ "?" query ] [ "#"
5222 fragment ]
5224last-chunk = 1*"0" [ chunk-ext ] CRLF
5226message-body = *OCTET
5227method = token
5229obs-fold = CRLF ( SP / HTAB )
5230obs-text = %x80-FF
5231origin-form = absolute-path [ "?" query ]
5233partial-URI = relative-part [ "?" query ]
5234path-abempty = <path-abempty, defined in [RFC3986], Section 3.3>
5235port = <port, defined in [RFC3986], Section 3.2.3>
5236protocol = protocol-name [ "/" protocol-version ]
5237protocol-name = token
5238protocol-version = token
5239pseudonym = token
5241qdtext = HTAB / SP / "!" / %x23-5B ; '#'-'['
5242 / %x5D-7E ; ']'-'~'
5243 / obs-text
5244qdtext-nf = HTAB / SP / "!" / %x23-5B ; '#'-'['
5245 / %x5D-7E ; ']'-'~'
5246 / obs-text
5247query = <query, defined in [RFC3986], Section 3.4>
5248quoted-cpair = "\" ( HTAB / SP / VCHAR / obs-text )
5249quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
5250quoted-str-nf = DQUOTE *( qdtext-nf / quoted-pair ) DQUOTE
5251quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
5253rank = ( "0" [ "." *3DIGIT ] ) / ( "1" [ "." *3"0" ] )
5254reason-phrase = *( HTAB / SP / VCHAR / obs-text )
5255received-by = ( uri-host [ ":" port ] ) / pseudonym
5256received-protocol = [ protocol-name "/" ] protocol-version
5257relative-part = <relative-part, defined in [RFC3986], Section 4.2>
5258request-line = method SP request-target SP HTTP-version CRLF
5259request-target = origin-form / absolute-form / authority-form /
5260 asterisk-form
5262segment = <segment, defined in [RFC3986], Section 3.3>
5263special = "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\" /
5264 DQUOTE / "/" / "[" / "]" / "?" / "=" / "{" / "}"
5265start-line = request-line / status-line
5266status-code = 3DIGIT
5267status-line = HTTP-version SP status-code SP reason-phrase CRLF
5269t-codings = "trailers" / ( transfer-coding [ t-ranking ] )
5270t-ranking = OWS ";" OWS "q=" rank
5271tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." /
5272 "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA
5273token = 1*tchar
5274trailer-part = *( header-field CRLF )
5275transfer-coding = "chunked" / "compress" / "deflate" / "gzip" /
5276 transfer-extension
5277transfer-extension = token *( OWS ";" OWS transfer-parameter )
5278transfer-parameter = attribute BWS "=" BWS value
5280uri-host = <host, defined in [RFC3986], Section 3.2.2>
5282value = word
5284word = token / quoted-string
5290<section title="Change Log (to be removed by RFC Editor before publication)" anchor="change.log">
5292<section title="Since RFC 2616">
5294  Changes up to the IETF Last Call draft are summarized
5295  in <eref target=""/>.
5299<section title="Since draft-ietf-httpbis-p1-messaging-24" anchor="changes.since.24">
5301  Closed issues:
5302  <list style="symbols">
5303    <t>
5304      <eref target=""/>:
5305      "APPSDIR review of draft-ietf-httpbis-p1-messaging-24"
5306    </t>
5307    <t>
5308      <eref target=""/>:
5309      "integer value parsing"
5310    </t>
5311    <t>
5312      <eref target=""/>:
5313      "move IANA registrations to correct draft"
5314    </t>
5315  </list>
Note: See TracBrowser for help on using the repository browser.