source: draft-ietf-httpbis/24/draft-ietf-httpbis-p1-messaging-24.xml @ 2709

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

Prepare release of -24 on Sept 25

  • Property svn:mime-type set to text/xml
File size: 223.8 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-24">
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="September" year="2013" day="25"/>
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.23"/>.
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 HTTP protocol
568   elements. A sender MUST NOT generate protocol elements that convey a
569   meaning that is known by that sender to be false. A sender MUST NOT
570   generate protocol elements that do not match the grammar defined by the
571   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 MUST NOT 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
710   version to which the server is conformant and
711   whose major version is less than or equal to the one received in the
712   request.  A server MUST NOT send a version to which it is not
713   conformant.  A server MAY send a 505 (HTTP Version Not
714   Supported) response if it cannot send a response using the
715   major version used in the client's request.
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 SHOULD 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 have to 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 that
2825   connection option.  Recipients that trigger certain connection
2826   behavior based on the presence of connection options MUST do so
2827   based on the presence of the connection-option rather than only the
2828   presence of the optional header field.  In other words, if the
2829   connection option is received as a header field but not indicated
2830   within the Connection field-value, then the recipient MUST ignore
2831   the connection-specific header field because it has likely been
2832   forwarded by an intermediary that is only partially conformant.
2835   When defining new connection options, specifications ought to
2836   carefully consider existing deployed header fields and ensure
2837   that the new connection option does not share the same name as
2838   an unrelated header field that might already be deployed.
2839   Defining a new connection option essentially reserves that potential
2840   field-name for carrying additional information related to the
2841   connection option, since it would be unwise for senders to use
2842   that field-name for anything else.
2845   The "close" connection option is defined for a
2846   sender to signal that this connection will be closed after completion of
2847   the response. For example,
2849<figure><artwork type="example"><![CDATA[
2850  Connection: close
2853   in either the request or the response header fields indicates that the
2854   sender is going to close the connection after the current request/response
2855   is complete (<xref target="persistent.tear-down"/>).
2858   A client that does not support <xref target="persistent.connections" format="none">persistent connections</xref> MUST
2859   send the "close" connection option in every request message.
2862   A server that does not support <xref target="persistent.connections" format="none">persistent connections</xref> MUST
2863   send the "close" connection option in every response message that
2864   does not have a 1xx (Informational) status code.
2868<section title="Establishment" anchor="persistent.establishment">
2870   It is beyond the scope of this specification to describe how connections
2871   are established via various transport or session-layer protocols.
2872   Each connection applies to only one transport link.
2876<section title="Persistence" anchor="persistent.connections">
2879   HTTP/1.1 defaults to the use of "persistent connections",
2880   allowing multiple requests and responses to be carried over a single
2881   connection. The "<xref target="header.connection" format="none">close</xref>" connection-option is used to signal
2882   that a connection will not persist after the current request/response.
2883   HTTP implementations SHOULD support persistent connections.
2886   A recipient determines whether a connection is persistent or not based on
2887   the most recently received message's protocol version and
2888   <xref target="header.connection" format="none">Connection</xref> header field (if any):
2889   <list style="symbols">
2890     <t>If the <xref target="header.connection" format="none">close</xref> connection option is present, the
2891        connection will not persist after the current response; else,</t>
2892     <t>If the received protocol is HTTP/1.1 (or later), the connection will
2893        persist after the current response; else,</t>
2894     <t>If the received protocol is HTTP/1.0, the "keep-alive"
2895        connection option is present, the recipient is not a proxy, and
2896        the recipient wishes to honor the HTTP/1.0 "keep-alive" mechanism,
2897        the connection will persist after the current response; otherwise,</t>
2898     <t>The connection will close after the current response.</t>
2899   </list>
2902   A server MAY assume that an HTTP/1.1 client intends to maintain a
2903   persistent connection until a <xref target="header.connection" format="none">close</xref> connection option
2904   is received in a request.
2907   A client MAY reuse a persistent connection until it sends or receives
2908   a <xref target="header.connection" format="none">close</xref> connection option or receives an HTTP/1.0 response
2909   without a "keep-alive" connection option.
2912   In order to remain persistent, all messages on a connection need to
2913   have a self-defined message length (i.e., one not defined by closure
2914   of the connection), as described in <xref target="message.body"/>.
2915   A server MUST read the entire request message body or close
2916   the connection after sending its response, since otherwise the
2917   remaining data on a persistent connection would be misinterpreted
2918   as the next request.  Likewise,
2919   a client MUST read the entire response message body if it intends
2920   to reuse the same connection for a subsequent request.
2923   A proxy server MUST NOT maintain a persistent connection with an
2924   HTTP/1.0 client (see Section 19.7.1 of <xref target="RFC2068"/> for
2925   information and discussion of the problems with the Keep-Alive header field
2926   implemented by many HTTP/1.0 clients).
2929   Clients and servers SHOULD NOT assume that a persistent connection is
2930   maintained for HTTP versions less than 1.1 unless it is explicitly
2931   signaled.
2932   See <xref target="compatibility.with.http.1.0.persistent.connections"/>
2933   for more information on backward compatibility with HTTP/1.0 clients.
2936<section title="Retrying Requests" anchor="persistent.retrying.requests">
2938   Connections can be closed at any time, with or without intention.
2939   Implementations ought to anticipate the need to recover
2940   from asynchronous close events.
2943   When an inbound connection is closed prematurely, a client MAY open a new
2944   connection and automatically retransmit an aborted sequence of requests if
2945   all of those requests have idempotent methods (Section 4.2.2 of <xref target="Part2"/>).
2946   A proxy MUST NOT automatically retry non-idempotent requests.
2949   A user agent MUST NOT automatically retry a request with a non-idempotent
2950   method unless it has some means to know that the request semantics are
2951   actually idempotent, regardless of the method, or some means to detect that
2952   the original request was never applied. For example, a user agent that
2953   knows (through design or configuration) that a POST request to a given
2954   resource is safe can repeat that request automatically.
2955   Likewise, a user agent designed specifically to operate on a version
2956   control repository might be able to recover from partial failure conditions
2957   by checking the target resource revision(s) after a failed connection,
2958   reverting or fixing any changes that were partially applied, and then
2959   automatically retrying the requests that failed.
2962   A client SHOULD NOT automatically retry a failed automatic retry.
2966<section title="Pipelining" anchor="pipelining">
2969   A client that supports persistent connections MAY "pipeline"
2970   its requests (i.e., send multiple requests without waiting for each
2971   response). A server MAY process a sequence of pipelined requests in
2972   parallel if they all have safe methods (Section 4.2.1 of <xref target="Part2"/>), but MUST send
2973   the corresponding responses in the same order that the requests were
2974   received.
2977   A client that pipelines requests SHOULD retry unanswered requests if the
2978   connection closes before it receives all of the corresponding responses.
2979   When retrying pipelined requests after a failed connection (a connection
2980   not explicitly closed by the server in its last complete response), a
2981   client MUST NOT pipeline immediately after connection establishment,
2982   since the first remaining request in the prior pipeline might have caused
2983   an error response that can be lost again if multiple requests are sent on a
2984   prematurely closed connection (see the TCP reset problem described in
2985   <xref target="persistent.tear-down"/>).
2988   Idempotent methods (Section 4.2.2 of <xref target="Part2"/>) are significant to pipelining
2989   because they can be automatically retried after a connection failure.
2990   A user agent SHOULD NOT pipeline requests after a non-idempotent method,
2991   until the final response status code for that method has been received,
2992   unless the user agent has a means to detect and recover from partial
2993   failure conditions involving the pipelined sequence.
2996   An intermediary that receives pipelined requests MAY pipeline those
2997   requests when forwarding them inbound, since it can rely on the outbound
2998   user agent(s) to determine what requests can be safely pipelined. If the
2999   inbound connection fails before receiving a response, the pipelining
3000   intermediary MAY attempt to retry a sequence of requests that have yet
3001   to receive a response if the requests all have idempotent methods;
3002   otherwise, the pipelining intermediary SHOULD forward any received
3003   responses and then close the corresponding outbound connection(s) so that
3004   the outbound user agent(s) can recover accordingly.
3009<section title="Concurrency" anchor="persistent.concurrency">
3011   A client SHOULD limit the number of simultaneous open
3012   connections that it maintains to a given server.
3015   Previous revisions of HTTP gave a specific number of connections as a
3016   ceiling, but this was found to be impractical for many applications. As a
3017   result, this specification does not mandate a particular maximum number of
3018   connections, but instead encourages clients to be conservative when opening
3019   multiple connections.
3022   Multiple connections are typically used to avoid the "head-of-line
3023   blocking" problem, wherein a request that takes significant server-side
3024   processing and/or has a large payload blocks subsequent requests on the
3025   same connection. However, each connection consumes server resources.
3026   Furthermore, using multiple connections can cause undesirable side effects
3027   in congested networks.
3030   Note that servers might reject traffic that they deem abusive, including an
3031   excessive number of connections from a client.
3035<section title="Failures and Time-outs" anchor="persistent.failures">
3037   Servers will usually have some time-out value beyond which they will
3038   no longer maintain an inactive connection. Proxy servers might make
3039   this a higher value since it is likely that the client will be making
3040   more connections through the same server. The use of persistent
3041   connections places no requirements on the length (or existence) of
3042   this time-out for either the client or the server.
3045   A client or server that wishes to time-out SHOULD issue a graceful close
3046   on the connection. Implementations SHOULD constantly monitor open
3047   connections for a received closure signal and respond to it as appropriate,
3048   since prompt closure of both sides of a connection enables allocated system
3049   resources to be reclaimed.
3052   A client, server, or proxy MAY close the transport connection at any
3053   time. For example, a client might have started to send a new request
3054   at the same time that the server has decided to close the "idle"
3055   connection. From the server's point of view, the connection is being
3056   closed while it was idle, but from the client's point of view, a
3057   request is in progress.
3060   A server SHOULD sustain persistent connections, when possible, and allow
3061   the underlying
3062   transport's flow control mechanisms to resolve temporary overloads, rather
3063   than terminate connections with the expectation that clients will retry.
3064   The latter technique can exacerbate network congestion.
3067   A client sending a message body SHOULD monitor
3068   the network connection for an error response while it is transmitting
3069   the request. If the client sees a response that indicates the server does
3070   not wish to receive the message body and is closing the connection, the
3071   client SHOULD immediately cease transmitting the body and close its side
3072   of the connection.
3076<section title="Tear-down" anchor="persistent.tear-down">
3077  <iref primary="false" item="Connection header field"/>
3078  <iref primary="false" item="close"/>
3080   The <xref target="header.connection" format="none">Connection</xref> header field
3081   (<xref target="header.connection"/>) provides a "<xref target="header.connection" format="none">close</xref>"
3082   connection option that a sender SHOULD send when it wishes to close
3083   the connection after the current request/response pair.
3086   A client that sends a <xref target="header.connection" format="none">close</xref> connection option MUST NOT
3087   send further requests on that connection (after the one containing
3088   <xref target="header.connection" format="none">close</xref>) and MUST close the connection after reading the
3089   final response message corresponding to this request.
3092   A server that receives a <xref target="header.connection" format="none">close</xref> connection option MUST
3093   initiate a close of the connection (see below) after it sends the
3094   final response to the request that contained <xref target="header.connection" format="none">close</xref>.
3095   The server SHOULD send a <xref target="header.connection" format="none">close</xref> connection option
3096   in its final response on that connection. The server MUST NOT process
3097   any further requests received on that connection.
3100   A server that sends a <xref target="header.connection" format="none">close</xref> connection option MUST
3101   initiate a close of the connection (see below) after it sends the
3102   response containing <xref target="header.connection" format="none">close</xref>. The server MUST NOT process
3103   any further requests received on that connection.
3106   A client that receives a <xref target="header.connection" format="none">close</xref> connection option MUST
3107   cease sending requests on that connection and close the connection
3108   after reading the response message containing the close; if additional
3109   pipelined requests had been sent on the connection, the client SHOULD NOT
3110   assume that they will be processed by the server.
3113   If a server performs an immediate close of a TCP connection, there is a
3114   significant risk that the client will not be able to read the last HTTP
3115   response.  If the server receives additional data from the client on a
3116   fully-closed connection, such as another request that was sent by the
3117   client before receiving the server's response, the server's TCP stack will
3118   send a reset packet to the client; unfortunately, the reset packet might
3119   erase the client's unacknowledged input buffers before they can be read
3120   and interpreted by the client's HTTP parser.
3123   To avoid the TCP reset problem, servers typically close a connection in
3124   stages. First, the server performs a half-close by closing only the write
3125   side of the read/write connection. The server then continues to read from
3126   the connection until it receives a corresponding close by the client, or
3127   until the server is reasonably certain that its own TCP stack has received
3128   the client's acknowledgement of the packet(s) containing the server's last
3129   response. Finally, the server fully closes the connection.
3132   It is unknown whether the reset problem is exclusive to TCP or might also
3133   be found in other transport connection protocols.
3137<section title="Upgrade" anchor="header.upgrade">
3138  <iref primary="true" item="Upgrade header field"/>
3144   The "Upgrade" header field is intended to provide a simple mechanism
3145   for transitioning from HTTP/1.1 to some other protocol on the same
3146   connection.  A client MAY send a list of protocols in the Upgrade
3147   header field of a request to invite the server to switch to one or
3148   more of those protocols, in order of descending preference, before sending
3149   the final response. A server MAY ignore a received Upgrade header field
3150   if it wishes to continue using the current protocol on that connection.
3152<figure><iref primary="true" item="Grammar" subitem="Upgrade"/><artwork type="abnf2616"><![CDATA[
3153  Upgrade          = 1#protocol
3155  protocol         = protocol-name ["/" protocol-version]
3156  protocol-name    = token
3157  protocol-version = token
3160   A server that sends a 101 (Switching Protocols) response
3161   MUST send an Upgrade header field to indicate the new protocol(s) to
3162   which the connection is being switched; if multiple protocol layers are
3163   being switched, the sender MUST list the protocols in layer-ascending
3164   order. A server MUST NOT switch to a protocol that was not indicated by
3165   the client in the corresponding request's Upgrade header field.
3166   A server MAY choose to ignore the order of preference indicated by the
3167   client and select the new protocol(s) based on other factors, such as the
3168   nature of the request or the current load on the server.
3171   A server that sends a 426 (Upgrade Required) response
3172   MUST send an Upgrade header field to indicate the acceptable protocols,
3173   in order of descending preference.
3176   A server MAY send an Upgrade header field in any other response to
3177   advertise that it implements support for upgrading to the listed protocols,
3178   in order of descending preference, when appropriate for a future request.
3181   The following is a hypothetical example sent by a client:
3182</preamble><artwork type="message/http; msgtype=&#34;request&#34;"><![CDATA[
3183  GET /hello.txt HTTP/1.1
3184  Host:
3185  Connection: upgrade
3186  Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11
3188  ]]></artwork></figure>
3190   Upgrade cannot be used to insist on a protocol change; its acceptance and
3191   use by the server is optional. The capabilities and nature of the
3192   application-level communication after the protocol change is entirely
3193   dependent upon the new protocol(s) chosen. However, immediately after
3194   sending the 101 response, the server is expected to continue responding to
3195   the original request as if it had received its equivalent within the new
3196   protocol (i.e., the server still has an outstanding request to satisfy
3197   after the protocol has been changed, and is expected to do so without
3198   requiring the request to be repeated).
3201   For example, if the Upgrade header field is received in a GET request
3202   and the server decides to switch protocols, it first responds
3203   with a 101 (Switching Protocols) message in HTTP/1.1 and
3204   then immediately follows that with the new protocol's equivalent of a
3205   response to a GET on the target resource.  This allows a connection to be
3206   upgraded to protocols with the same semantics as HTTP without the
3207   latency cost of an additional round-trip.  A server MUST NOT switch
3208   protocols unless the received message semantics can be honored by the new
3209   protocol; an OPTIONS request can be honored by any protocol.
3212   The following is an example response to the above hypothetical request:
3213</preamble><artwork type="message/http; msgtype=&#34;response&#34;"><![CDATA[
3214  HTTP/1.1 101 Switching Protocols
3215  Connection: upgrade
3216  Upgrade: HTTP/2.0
3218  [... data stream switches to HTTP/2.0 with an appropriate response
3219  (as defined by new protocol) to the "GET /hello.txt" request ...]
3220  ]]></artwork></figure>
3222   When Upgrade is sent, the sender MUST also send a
3223   <xref target="header.connection" format="none">Connection</xref> header field (<xref target="header.connection"/>)
3224   that contains an "upgrade" connection option, in order to prevent Upgrade
3225   from being accidentally forwarded by intermediaries that might not implement
3226   the listed protocols.  A server MUST ignore an Upgrade header field that
3227   is received in an HTTP/1.0 request.
3230   A client cannot begin using an upgraded protocol on the connection until
3231   it has completely sent the request message (i.e., the client can't change
3232   the protocol it is sending in the middle of a message).
3233   If a server receives both Upgrade and an Expect header field
3234   with the "100-continue" expectation (Section 5.1.1 of <xref target="Part2"/>), the
3235   server MUST send a 100 (Continue) response before sending
3236   a 101 (Switching Protocols) response.
3239   The Upgrade header field only applies to switching protocols on top of the
3240   existing connection; it cannot be used to switch the underlying connection
3241   (transport) protocol, nor to switch the existing communication to a
3242   different connection. For those purposes, it is more appropriate to use a
3243   3xx (Redirection) response (Section 6.4 of <xref target="Part2"/>).
3246   This specification only defines the protocol name "HTTP" for use by
3247   the family of Hypertext Transfer Protocols, as defined by the HTTP
3248   version rules of <xref target="http.version"/> and future updates to this
3249   specification. Additional tokens ought to be registered with IANA using the
3250   registration procedure defined in <xref target="upgrade.token.registry"/>.
3255<section title="ABNF list extension: #rule" anchor="abnf.extension">
3257  A #rule extension to the ABNF rules of <xref target="RFC5234"/> is used to
3258  improve readability in the definitions of some header field values.
3261  A construct "#" is defined, similar to "*", for defining comma-delimited
3262  lists of elements. The full form is "&lt;n&gt;#&lt;m&gt;element" indicating
3263  at least &lt;n&gt; and at most &lt;m&gt; elements, each separated by a single
3264  comma (",") and optional whitespace (OWS).   
3267  Thus, a sender MUST expand the list construct as follows:
3268</preamble><artwork type="example"><![CDATA[
3269  1#element => element *( OWS "," OWS element )
3272  and:
3273</preamble><artwork type="example"><![CDATA[
3274  #element => [ 1#element ]
3277  and for n &gt;= 1 and m &gt; 1:
3278</preamble><artwork type="example"><![CDATA[
3279  <n>#<m>element => element <n-1>*<m-1>( OWS "," OWS element )
3282  For compatibility with legacy list rules, a recipient MUST parse and ignore
3283  a reasonable number of empty list elements: enough to handle common mistakes
3284  by senders that merge values, but not so much that they could be used as a
3285  denial of service mechanism. In other words, a recipient MUST expand the
3286  list construct as follows:
3288<figure><artwork type="example"><![CDATA[
3289  #element => [ ( "," / element ) *( OWS "," [ OWS element ] ) ]
3291  1#element => *( "," OWS ) element *( OWS "," [ OWS element ] )
3294  Empty elements do not contribute to the count of elements present.
3295  For example, given these ABNF productions:
3297<figure><artwork type="example"><![CDATA[
3298  example-list      = 1#example-list-elmt
3299  example-list-elmt = token ; see Section 3.2.6
3302  Then the following are valid values for example-list (not including the
3303  double quotes, which are present for delimitation only):
3305<figure><artwork type="example"><![CDATA[
3306  "foo,bar"
3307  "foo ,bar,"
3308  "foo , ,bar,charlie   "
3311  In contrast, the following values would be invalid, since at least one
3312  non-empty element is required by the example-list production:
3314<figure><artwork type="example"><![CDATA[
3315  ""
3316  ","
3317  ",   ,"
3320  <xref target="collected.abnf"/> shows the collected ABNF after the list
3321  constructs have been expanded, as described above, for recipients.
3325<section title="IANA Considerations" anchor="IANA.considerations">
3327<section title="Header Field Registration" anchor="header.field.registration">
3329   HTTP header fields are registered within the Message Header Field Registry
3330   maintained at
3331   <eref target=""/>.
3334   This document defines the following HTTP header fields, so their
3335   associated registry entries shall be updated according to the permanent
3336   registrations below (see <xref target="BCP90"/>):
3339<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
3340<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
3341   <ttcol>Header Field Name</ttcol>
3342   <ttcol>Protocol</ttcol>
3343   <ttcol>Status</ttcol>
3344   <ttcol>Reference</ttcol>
3346   <c>Connection</c>
3347   <c>http</c>
3348   <c>standard</c>
3349   <c>
3350      <xref target="header.connection"/>
3351   </c>
3352   <c>Content-Length</c>
3353   <c>http</c>
3354   <c>standard</c>
3355   <c>
3356      <xref target="header.content-length"/>
3357   </c>
3358   <c>Host</c>
3359   <c>http</c>
3360   <c>standard</c>
3361   <c>
3362      <xref target=""/>
3363   </c>
3364   <c>TE</c>
3365   <c>http</c>
3366   <c>standard</c>
3367   <c>
3368      <xref target="header.te"/>
3369   </c>
3370   <c>Trailer</c>
3371   <c>http</c>
3372   <c>standard</c>
3373   <c>
3374      <xref target="header.trailer"/>
3375   </c>
3376   <c>Transfer-Encoding</c>
3377   <c>http</c>
3378   <c>standard</c>
3379   <c>
3380      <xref target="header.transfer-encoding"/>
3381   </c>
3382   <c>Upgrade</c>
3383   <c>http</c>
3384   <c>standard</c>
3385   <c>
3386      <xref target="header.upgrade"/>
3387   </c>
3388   <c>Via</c>
3389   <c>http</c>
3390   <c>standard</c>
3391   <c>
3392      <xref target="header.via"/>
3393   </c>
3398   Furthermore, the header field-name "Close" shall be registered as
3399   "reserved", since using that name as an HTTP header field might
3400   conflict with the "close" connection option of the "<xref target="header.connection" format="none">Connection</xref>"
3401   header field (<xref target="header.connection"/>).
3403<texttable align="left" suppress-title="true">
3404   <ttcol>Header Field Name</ttcol>
3405   <ttcol>Protocol</ttcol>
3406   <ttcol>Status</ttcol>
3407   <ttcol>Reference</ttcol>
3409   <c>Close</c>
3410   <c>http</c>
3411   <c>reserved</c>
3412   <c>
3413      <xref target="header.field.registration"/>
3414   </c>
3417   The change controller is: "IETF ( - Internet Engineering Task Force".
3421<section title="URI Scheme Registration" anchor="uri.scheme.registration">
3423   IANA maintains the registry of URI Schemes <xref target="BCP115"/> at
3424   <eref target=""/>.
3427   This document defines the following URI schemes, so their
3428   associated registry entries shall be updated according to the permanent
3429   registrations below:
3431<texttable align="left" suppress-title="true">
3432   <ttcol>URI Scheme</ttcol>
3433   <ttcol>Description</ttcol>
3434   <ttcol>Reference</ttcol>
3436   <c>http</c>
3437   <c>Hypertext Transfer Protocol</c>
3438   <c><xref target="http.uri"/></c>
3440   <c>https</c>
3441   <c>Hypertext Transfer Protocol Secure</c>
3442   <c><xref target="https.uri"/></c>
3446<section title="Internet Media Type Registration" anchor="">
3448   This document serves as the specification for the Internet media types
3449   "message/http" and "application/http". The following is to be registered with
3450   IANA (see <xref target="BCP13"/>).
3452<section title="Internet Media Type message/http" anchor="">
3453<iref item="Media Type" subitem="message/http" primary="true"/>
3454<iref item="message/http Media Type" primary="true"/>
3456   The message/http type can be used to enclose a single HTTP request or
3457   response message, provided that it obeys the MIME restrictions for all
3458   "message" types regarding line length and encodings.
3461  <list style="hanging">
3462    <t hangText="Type name:">
3463      message
3464    </t>
3465    <t hangText="Subtype name:">
3466      http
3467    </t>
3468    <t hangText="Required parameters:">
3469      none
3470    </t>
3471    <t hangText="Optional parameters:">
3472      version, msgtype
3473      <list style="hanging">
3474        <t hangText="version:">
3475          The HTTP-version number of the enclosed message
3476          (e.g., "1.1"). If not present, the version can be
3477          determined from the first line of the body.
3478        </t>
3479        <t hangText="msgtype:">
3480          The message type — "request" or "response". If not
3481          present, the type can be determined from the first
3482          line of the body.
3483        </t>
3484      </list>
3485    </t>
3486    <t hangText="Encoding considerations:">
3487      only "7bit", "8bit", or "binary" are permitted
3488    </t>
3489    <t hangText="Security considerations:">
3490      none
3491    </t>
3492    <t hangText="Interoperability considerations:">
3493      none
3494    </t>
3495    <t hangText="Published specification:">
3496      This specification (see <xref target=""/>).
3497    </t>
3498    <t hangText="Applications that use this media type:">
3499    </t>
3500    <t hangText="Additional information:">
3501      <list style="hanging">
3502        <t hangText="Magic number(s):">none</t>
3503        <t hangText="File extension(s):">none</t>
3504        <t hangText="Macintosh file type code(s):">none</t>
3505      </list>
3506    </t>
3507    <t hangText="Person and email address to contact for further information:">
3508      See Authors Section.
3509    </t>
3510    <t hangText="Intended usage:">
3511      COMMON
3512    </t>
3513    <t hangText="Restrictions on usage:">
3514      none
3515    </t>
3516    <t hangText="Author:">
3517      See Authors Section.
3518    </t>
3519    <t hangText="Change controller:">
3520      IESG
3521    </t>
3522  </list>
3525<section title="Internet Media Type application/http" anchor="">
3526<iref item="Media Type" subitem="application/http" primary="true"/>
3527<iref item="application/http Media Type" primary="true"/>
3529   The application/http type can be used to enclose a pipeline of one or more
3530   HTTP request or response messages (not intermixed).
3533  <list style="hanging">
3534    <t hangText="Type name:">
3535      application
3536    </t>
3537    <t hangText="Subtype name:">
3538      http
3539    </t>
3540    <t hangText="Required parameters:">
3541      none
3542    </t>
3543    <t hangText="Optional parameters:">
3544      version, msgtype
3545      <list style="hanging">
3546        <t hangText="version:">
3547          The HTTP-version number of the enclosed messages
3548          (e.g., "1.1"). If not present, the version can be
3549          determined from the first line of the body.
3550        </t>
3551        <t hangText="msgtype:">
3552          The message type — "request" or "response". If not
3553          present, the type can be determined from the first
3554          line of the body.
3555        </t>
3556      </list>
3557    </t>
3558    <t hangText="Encoding considerations:">
3559      HTTP messages enclosed by this type
3560      are in "binary" format; use of an appropriate
3561      Content-Transfer-Encoding is required when
3562      transmitted via E-mail.
3563    </t>
3564    <t hangText="Security considerations:">
3565      none
3566    </t>
3567    <t hangText="Interoperability considerations:">
3568      none
3569    </t>
3570    <t hangText="Published specification:">
3571      This specification (see <xref target=""/>).
3572    </t>
3573    <t hangText="Applications that use this media type:">
3574    </t>
3575    <t hangText="Additional information:">
3576      <list style="hanging">
3577        <t hangText="Magic number(s):">none</t>
3578        <t hangText="File extension(s):">none</t>
3579        <t hangText="Macintosh file type code(s):">none</t>
3580      </list>
3581    </t>
3582    <t hangText="Person and email address to contact for further information:">
3583      See Authors Section.
3584    </t>
3585    <t hangText="Intended usage:">
3586      COMMON
3587    </t>
3588    <t hangText="Restrictions on usage:">
3589      none
3590    </t>
3591    <t hangText="Author:">
3592      See Authors Section.
3593    </t>
3594    <t hangText="Change controller:">
3595      IESG
3596    </t>
3597  </list>
3602<section title="Transfer Coding Registry" anchor="transfer.coding.registry">
3604   The HTTP Transfer Coding Registry defines the name space for transfer
3605   coding names. It is maintained at <eref target=""/>.
3608<section title="Procedure" anchor="transfer.coding.registry.procedure">
3610   Registrations MUST include the following fields:
3611   <list style="symbols">
3612     <t>Name</t>
3613     <t>Description</t>
3614     <t>Pointer to specification text</t>
3615   </list>
3618   Names of transfer codings MUST NOT overlap with names of content codings
3619   (Section of <xref target="Part2"/>) unless the encoding transformation is identical, as
3620   is the case for the compression codings defined in
3621   <xref target="compression.codings"/>.
3624   Values to be added to this name space require IETF Review (see
3625   Section 4.1 of <xref target="RFC5226"/>), and MUST
3626   conform to the purpose of transfer coding defined in this specification.
3629   Use of program names for the identification of encoding formats
3630   is not desirable and is discouraged for future encodings.
3634<section title="Registration" anchor="transfer.coding.registration">
3636   The HTTP Transfer Coding Registry shall be updated with the registrations
3637   below:
3639<texttable align="left" suppress-title="true" anchor="iana.transfer.coding.registration.table">
3640   <ttcol>Name</ttcol>
3641   <ttcol>Description</ttcol>
3642   <ttcol>Reference</ttcol>
3643   <c>chunked</c>
3644   <c>Transfer in a series of chunks</c>
3645   <c>
3646      <xref target="chunked.encoding"/>
3647   </c>
3648   <c>compress</c>
3649   <c>UNIX "compress" data format <xref target="Welch"/></c>
3650   <c>
3651      <xref target="compress.coding"/>
3652   </c>
3653   <c>deflate</c>
3654   <c>"deflate" compressed data (<xref target="RFC1951"/>) inside
3655   the "zlib" data format (<xref target="RFC1950"/>)
3656   </c>
3657   <c>
3658      <xref target="deflate.coding"/>
3659   </c>
3660   <c>gzip</c>
3661   <c>GZIP file format <xref target="RFC1952"/></c>
3662   <c>
3663      <xref target="gzip.coding"/>
3664   </c>
3665   <c>x-compress</c>
3666   <c>Deprecated (alias for compress)</c>
3667   <c>
3668      <xref target="compress.coding"/>
3669   </c>
3670   <c>x-gzip</c>
3671   <c>Deprecated (alias for gzip)</c>
3672   <c>
3673      <xref target="gzip.coding"/>
3674   </c>
3679<section title="Upgrade Token Registry" anchor="upgrade.token.registry">
3681   The HTTP Upgrade Token Registry defines the name space for protocol-name
3682   tokens used to identify protocols in the <xref target="header.upgrade" format="none">Upgrade</xref> header
3683   field. The registry is maintained at <eref target=""/>.
3686<section title="Procedure" anchor="upgrade.token.registry.procedure">  
3688   Each registered protocol name is associated with contact information
3689   and an optional set of specifications that details how the connection
3690   will be processed after it has been upgraded.
3693   Registrations happen on a "First Come First Served" basis (see
3694   Section 4.1 of <xref target="RFC5226"/>) and are subject to the
3695   following rules:
3696  <list style="numbers">
3697    <t>A protocol-name token, once registered, stays registered forever.</t>
3698    <t>The registration MUST name a responsible party for the
3699       registration.</t>
3700    <t>The registration MUST name a point of contact.</t>
3701    <t>The registration MAY name a set of specifications associated with
3702       that token. Such specifications need not be publicly available.</t>
3703    <t>The registration SHOULD name a set of expected "protocol-version"
3704       tokens associated with that token at the time of registration.</t>
3705    <t>The responsible party MAY change the registration at any time.
3706       The IANA will keep a record of all such changes, and make them
3707       available upon request.</t>
3708    <t>The IESG MAY reassign responsibility for a protocol token.
3709       This will normally only be used in the case when a
3710       responsible party cannot be contacted.</t>
3711  </list>
3714   This registration procedure for HTTP Upgrade Tokens replaces that
3715   previously defined in Section 7.2 of <xref target="RFC2817"/>.
3719<section title="Upgrade Token Registration" anchor="upgrade.token.registration">
3721   The HTTP Upgrade Token Registry shall be updated with the registration
3722   below:
3724<texttable align="left" suppress-title="true">
3725   <ttcol>Value</ttcol>
3726   <ttcol>Description</ttcol>
3727   <ttcol>Expected Version Tokens</ttcol>
3728   <ttcol>Reference</ttcol>
3730   <c>HTTP</c>
3731   <c>Hypertext Transfer Protocol</c>
3732   <c>any DIGIT.DIGIT (e.g, "2.0")</c>
3733   <c><xref target="http.version"/></c>
3736   The responsible party is: "IETF ( - Internet Engineering Task Force".
3743<section title="Security Considerations" anchor="security.considerations">
3745   This section is meant to inform developers, information providers, and
3746   users of known security concerns relevant to HTTP/1.1 message syntax,
3747   parsing, and routing.
3750<section title="DNS-related Attacks" anchor="dns.related.attacks">
3752   HTTP clients rely heavily on the Domain Name Service (DNS), and are thus
3753   generally prone to security attacks based on the deliberate misassociation
3754   of IP addresses and DNS names not protected by DNSSEC. Clients need to be
3755   cautious in assuming the validity of an IP number/DNS name association unless
3756   the response is protected by DNSSEC (<xref target="RFC4033"/>).
3760<section title="Intermediaries and Caching" anchor="attack.intermediaries">
3762   By their very nature, HTTP intermediaries are men-in-the-middle, and
3763   represent an opportunity for man-in-the-middle attacks. Compromise of
3764   the systems on which the intermediaries run can result in serious security
3765   and privacy problems. Intermediaries have access to security-related
3766   information, personal information about individual users and
3767   organizations, and proprietary information belonging to users and
3768   content providers. A compromised intermediary, or an intermediary
3769   implemented or configured without regard to security and privacy
3770   considerations, might be used in the commission of a wide range of
3771   potential attacks.
3774   Intermediaries that contain a shared cache are especially vulnerable
3775   to cache poisoning attacks.
3778   Implementers need to consider the privacy and security
3779   implications of their design and coding decisions, and of the
3780   configuration options they provide to operators (especially the
3781   default configuration).
3784   Users need to be aware that intermediaries are no more trustworthy than
3785   the people who run them; HTTP itself cannot solve this problem.
3789<section title="Buffer Overflows" anchor="attack.protocol.element.size.overflows">
3791   Because HTTP uses mostly textual, character-delimited fields, attackers can
3792   overflow buffers in implementations, and/or perform a Denial of Service
3793   against implementations that accept fields with unlimited lengths.
3796   To promote interoperability, this specification makes specific
3797   recommendations for minimum size limits on request-line
3798   (<xref target="request.line"/>)
3799   and header fields (<xref target="header.fields"/>). These are
3800   minimum recommendations, chosen to be supportable even by implementations
3801   with limited resources; it is expected that most implementations will
3802   choose substantially higher limits.
3805   This specification also provides a way for servers to reject messages that
3806   have request-targets that are too long (Section 6.5.12 of <xref target="Part2"/>) or request entities
3807   that are too large (Section 6.5 of <xref target="Part2"/>). Additional status codes related to
3808   capacity limits have been defined by extensions to HTTP
3809   <xref target="RFC6585"/>.
3812   Recipients ought to carefully limit the extent to which they read other
3813   fields, including (but not limited to) request methods, response status
3814   phrases, header field-names, and body chunks, so as to avoid denial of
3815   service attacks without impeding interoperability.
3819<section title="Message Integrity" anchor="message.integrity">
3821   HTTP does not define a specific mechanism for ensuring message integrity,
3822   instead relying on the error-detection ability of underlying transport
3823   protocols and the use of length or chunk-delimited framing to detect
3824   completeness. Additional integrity mechanisms, such as hash functions or
3825   digital signatures applied to the content, can be selectively added to
3826   messages via extensible metadata header fields. Historically, the lack of
3827   a single integrity mechanism has been justified by the informal nature of
3828   most HTTP communication.  However, the prevalence of HTTP as an information
3829   access mechanism has resulted in its increasing use within environments
3830   where verification of message integrity is crucial.
3833   User agents are encouraged to implement configurable means for detecting
3834   and reporting failures of message integrity such that those means can be
3835   enabled within environments for which integrity is necessary. For example,
3836   a browser being used to view medical history or drug interaction
3837   information needs to indicate to the user when such information is detected
3838   by the protocol to be incomplete, expired, or corrupted during transfer.
3839   Such mechanisms might be selectively enabled via user agent extensions or
3840   the presence of message integrity metadata in a response.
3841   At a minimum, user agents ought to provide some indication that allows a
3842   user to distinguish between a complete and incomplete response message
3843   (<xref target="incomplete.messages"/>) when such verification is desired.
3847<section title="Server Log Information" anchor="abuse.of.server.log.information">
3849   A server is in the position to save personal data about a user's requests
3850   over time, which might identify their reading patterns or subjects of
3851   interest.  In particular, log information gathered at an intermediary
3852   often contains a history of user agent interaction, across a multitude
3853   of sites, that can be traced to individual users.
3856   HTTP log information is confidential in nature; its handling is often
3857   constrained by laws and regulations.  Log information needs to be securely
3858   stored and appropriate guidelines followed for its analysis.
3859   Anonymization of personal information within individual entries helps,
3860   but is generally not sufficient to prevent real log traces from being
3861   re-identified based on correlation with other access characteristics.
3862   As such, access traces that are keyed to a specific client are unsafe to
3863   publish even if the key is pseudonymous.
3866   To minimize the risk of theft or accidental publication, log information
3867   ought to be purged of personally identifiable information, including
3868   user identifiers, IP addresses, and user-provided query parameters,
3869   as soon as that information is no longer necessary to support operational
3870   needs for security, auditing, or fraud control.
3875<section title="Acknowledgments" anchor="acks">
3877   This edition of HTTP/1.1 builds on the many contributions that went into
3878   <xref target="RFC1945" format="none">RFC 1945</xref>,
3879   <xref target="RFC2068" format="none">RFC 2068</xref>,
3880   <xref target="RFC2145" format="none">RFC 2145</xref>, and
3881   <xref target="RFC2616" format="none">RFC 2616</xref>, including
3882   substantial contributions made by the previous authors, editors, and
3883   working group chairs: Tim Berners-Lee, Ari Luotonen, Roy T. Fielding,
3884   Henrik Frystyk Nielsen, Jim Gettys, Jeffrey C. Mogul, Larry Masinter,
3885   and Paul J. Leach. Mark Nottingham oversaw this effort as working group chair.
3888   Since 1999, the following contributors have helped improve the HTTP
3889   specification by reporting bugs, asking smart questions, drafting or
3890   reviewing text, and evaluating open issues:
3893<t>Adam Barth,
3894Adam Roach,
3895Addison Phillips,
3896Adrian Chadd,
3897Adrien W. de Croy,
3898Alan Ford,
3899Alan Ruttenberg,
3900Albert Lunde,
3901Alek Storm,
3902Alex Rousskov,
3903Alexandre Morgaut,
3904Alexey Melnikov,
3905Alisha Smith,
3906Amichai Rothman,
3907Amit Klein,
3908Amos Jeffries,
3909Andreas Maier,
3910Andreas Petersson,
3911Anil Sharma,
3912Anne van Kesteren,
3913Anthony Bryan,
3914Asbjorn Ulsberg,
3915Ashok Kumar,
3916Balachander Krishnamurthy,
3917Barry Leiba,
3918Ben Laurie,
3919Benjamin Carlyle,
3920Benjamin Niven-Jenkins,
3921Bil Corry,
3922Bill Burke,
3923Bjoern Hoehrmann,
3924Bob Scheifler,
3925Boris Zbarsky,
3926Brett Slatkin,
3927Brian Kell,
3928Brian McBarron,
3929Brian Pane,
3930Brian Raymor,
3931Brian Smith,
3932Bryce Nesbitt,
3933Cameron Heavon-Jones,
3934Carl Kugler,
3935Carsten Bormann,
3936Charles Fry,
3937Chris Newman,
3938Cyrus Daboo,
3939Dale Robert Anderson,
3940Dan Wing,
3941Dan Winship,
3942Daniel Stenberg,
3943Darrel Miller,
3944Dave Cridland,
3945Dave Crocker,
3946Dave Kristol,
3947Dave Thaler,
3948David Booth,
3949David Singer,
3950David W. Morris,
3951Diwakar Shetty,
3952Dmitry Kurochkin,
3953Drummond Reed,
3954Duane Wessels,
3955Edward Lee,
3956Eitan Adler,
3957Eliot Lear,
3958Eran Hammer-Lahav,
3959Eric D. Williams,
3960Eric J. Bowman,
3961Eric Lawrence,
3962Eric Rescorla,
3963Erik Aronesty,
3964Evan Prodromou,
3965Felix Geisendoerfer,
3966Florian Weimer,
3967Frank Ellermann,
3968Fred Akalin,
3969Fred Bohle,
3970Frederic Kayser,
3971Gabor Molnar,
3972Gabriel Montenegro,
3973Geoffrey Sneddon,
3974Gervase Markham,
3975Gili Tzabari,
3976Grahame Grieve,
3977Greg Wilkins,
3978Grzegorz Calkowski,
3979Harald Tveit Alvestrand,
3980Harry Halpin,
3981Helge Hess,
3982Henrik Nordstrom,
3983Henry S. Thompson,
3984Henry Story,
3985Herbert van de Sompel,
3986Herve Ruellan,
3987Howard Melman,
3988Hugo Haas,
3989Ian Fette,
3990Ian Hickson,
3991Ido Safruti,
3992Ilari Liusvaara,
3993Ilya Grigorik,
3994Ingo Struck,
3995J. Ross Nicoll,
3996James Cloos,
3997James H. Manger,
3998James Lacey,
3999James M. Snell,
4000Jamie Lokier,
4001Jan Algermissen,
4002Jeff Hodges (who came up with the term 'effective Request-URI'),
4003Jeff Pinner,
4004Jeff Walden,
4005Jim Luther,
4006Jitu Padhye,
4007Joe D. Williams,
4008Joe Gregorio,
4009Joe Orton,
4010John C. Klensin,
4011John C. Mallery,
4012John Cowan,
4013John Kemp,
4014John Panzer,
4015John Schneider,
4016John Stracke,
4017John Sullivan,
4018Jonas Sicking,
4019Jonathan A. Rees,
4020Jonathan Billington,
4021Jonathan Moore,
4022Jonathan Silvera,
4023Jordi Ros,
4024Joris Dobbelsteen,
4025Josh Cohen,
4026Julien Pierre,
4027Jungshik Shin,
4028Justin Chapweske,
4029Justin Erenkrantz,
4030Justin James,
4031Kalvinder Singh,
4032Karl Dubost,
4033Keith Hoffman,
4034Keith Moore,
4035Ken Murchison,
4036Koen Holtman,
4037Konstantin Voronkov,
4038Kris Zyp,
4039Lisa Dusseault,
4040Maciej Stachowiak,
4041Manu Sporny,
4042Marc Schneider,
4043Marc Slemko,
4044Mark Baker,
4045Mark Pauley,
4046Mark Watson,
4047Markus Isomaki,
4048Markus Lanthaler,
4049Martin J. Duerst,
4050Martin Musatov,
4051Martin Nilsson,
4052Martin Thomson,
4053Matt Lynch,
4054Matthew Cox,
4055Max Clark,
4056Michael Burrows,
4057Michael Hausenblas,
4058Michael Sweet,
4059Michael Tuexen,
4060Michael Welzl,
4061Mike Amundsen,
4062Mike Belshe,
4063Mike Bishop,
4064Mike Kelly,
4065Mike Schinkel,
4066Miles Sabin,
4067Murray S. Kucherawy,
4068Mykyta Yevstifeyev,
4069Nathan Rixham,
4070Nicholas Shanks,
4071Nico Williams,
4072Nicolas Alvarez,
4073Nicolas Mailhot,
4074Noah Slater,
4075Osama Mazahir,
4076Pablo Castro,
4077Pat Hayes,
4078Patrick R. McManus,
4079Paul E. Jones,
4080Paul Hoffman,
4081Paul Marquess,
4082Peter Lepeska,
4083Peter Occil,
4084Peter Saint-Andre,
4085Peter Watkins,
4086Phil Archer,
4087Philippe Mougin,
4088Phillip Hallam-Baker,
4089Piotr Dobrogost,
4090Poul-Henning Kamp,
4091Preethi Natarajan,
4092Rajeev Bector,
4093Ray Polk,
4094Reto Bachmann-Gmuer,
4095Richard Cyganiak,
4096Robby Simpson,
4097Robert Brewer,
4098Robert Collins,
4099Robert Mattson,
4100Robert O'Callahan,
4101Robert Olofsson,
4102Robert Sayre,
4103Robert Siemer,
4104Robert de Wilde,
4105Roberto Javier Godoy,
4106Roberto Peon,
4107Roland Zink,
4108Ronny Widjaja,
4109Ryan Hamilton,
4110S. Mike Dierken,
4111Salvatore Loreto,
4112Sam Johnston,
4113Sam Pullara,
4114Sam Ruby,
4115Scott Lawrence (who maintained the original issues list),
4116Sean B. Palmer,
4117Sebastien Barnoud,
4118Shane McCarron,
4119Shigeki Ohtsu,
4120Stefan Eissing,
4121Stefan Tilkov,
4122Stefanos Harhalakis,
4123Stephane Bortzmeyer,
4124Stephen Farrell,
4125Stephen Ludin,
4126Stuart Williams,
4127Subbu Allamaraju,
4128Sylvain Hellegouarch,
4129Tapan Divekar,
4130Tatsuhiro Tsujikawa,
4131Tatsuya Hayashi,
4132Ted Hardie,
4133Thomas Broyer,
4134Thomas Fossati,
4135Thomas Maslen,
4136Thomas Nordin,
4137Thomas Roessler,
4138Tim Bray,
4139Tim Morgan,
4140Tim Olsen,
4141Tom Zhou,
4142Travis Snoozy,
4143Tyler Close,
4144Vincent Murphy,
4145Wenbo Zhu,
4146Werner Baumann,
4147Wilbur Streett,
4148Wilfredo Sanchez Vega,
4149William A. Rowe Jr.,
4150William Chan,
4151Willy Tarreau,
4152Xiaoshu Wang,
4153Yaron Goland,
4154Yngve Nysaeter Pettersen,
4155Yoav Nir,
4156Yogesh Bang,
4157Yuchung Cheng,
4158Yutaka Oiwa,
4159Yves Lafon (long-time member of the editor team),
4160Zed A. Shaw, and
4161Zhong Yu.
4165   See Section 16 of <xref target="RFC2616"/> for additional
4166   acknowledgements from prior revisions.
4173<references title="Normative References">
4175<reference anchor="Part2">
4176  <front>
4177    <title>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</title>
4178    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
4179      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
4180      <address><email></email></address>
4181    </author>
4182    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
4183      <organization abbrev="greenbytes">greenbytes GmbH</organization>
4184      <address><email></email></address>
4185    </author>
4186    <date month="September" year="2013"/>
4187  </front>
4188  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-24"/>
4192<reference anchor="Part4">
4193  <front>
4194    <title>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</title>
4195    <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
4196      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
4197      <address><email></email></address>
4198    </author>
4199    <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
4200      <organization abbrev="greenbytes">greenbytes GmbH</organization>
4201      <address><email></email></address>
4202    </author>
4203    <date month="September" year="2013"/>
4204  </front>
4205  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p4-conditional-24"/>
4209<reference anchor="Part5">
4210  <front>
4211    <title>Hypertext Transfer Protocol (HTTP/1.1): Range Requests</title>
4212    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
4213      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
4214      <address><email></email></address>
4215    </author>
4216    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
4217      <organization abbrev="W3C">World Wide Web Consortium</organization>
4218      <address><email></email></address>
4219    </author>
4220    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
4221      <organization abbrev="greenbytes">greenbytes GmbH</organization>
4222      <address><email></email></address>
4223    </author>
4224    <date month="September" year="2013"/>
4225  </front>
4226  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-24"/>
4230<reference anchor="Part6">
4231  <front>
4232    <title>Hypertext Transfer Protocol (HTTP/1.1): Caching</title>
4233    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
4234      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
4235      <address><email></email></address>
4236    </author>
4237    <author initials="M." surname="Nottingham" fullname="Mark Nottingham" role="editor">
4238      <organization>Akamai</organization>
4239      <address><email></email></address>
4240    </author>
4241    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
4242      <organization abbrev="greenbytes">greenbytes GmbH</organization>
4243      <address><email></email></address>
4244    </author>
4245    <date month="September" year="2013"/>
4246  </front>
4247  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-24"/>
4251<reference anchor="Part7">
4252  <front>
4253    <title>Hypertext Transfer Protocol (HTTP/1.1): Authentication</title>
4254    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
4255      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
4256      <address><email></email></address>
4257    </author>
4258    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
4259      <organization abbrev="greenbytes">greenbytes GmbH</organization>
4260      <address><email></email></address>
4261    </author>
4262    <date month="September" year="2013"/>
4263  </front>
4264  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p7-auth-24"/>
4268<reference anchor="RFC5234">
4269  <front>
4270    <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
4271    <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
4272      <organization>Brandenburg InternetWorking</organization>
4273      <address>
4274        <email></email>
4275      </address> 
4276    </author>
4277    <author initials="P." surname="Overell" fullname="Paul Overell">
4278      <organization>THUS plc.</organization>
4279      <address>
4280        <email></email>
4281      </address>
4282    </author>
4283    <date month="January" year="2008"/>
4284  </front>
4285  <seriesInfo name="STD" value="68"/>
4286  <seriesInfo name="RFC" value="5234"/>
4289<reference anchor="RFC2119">
4290  <front>
4291    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
4292    <author initials="S." surname="Bradner" fullname="Scott Bradner">
4293      <organization>Harvard University</organization>
4294      <address><email></email></address>
4295    </author>
4296    <date month="March" year="1997"/>
4297  </front>
4298  <seriesInfo name="BCP" value="14"/>
4299  <seriesInfo name="RFC" value="2119"/>
4302<reference anchor="RFC3986">
4303 <front>
4304  <title abbrev="URI Generic Syntax">Uniform Resource Identifier (URI): Generic Syntax</title>
4305  <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
4306    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
4307    <address>
4308       <email></email>
4309       <uri></uri>
4310    </address>
4311  </author>
4312  <author initials="R." surname="Fielding" fullname="Roy T. Fielding">
4313    <organization abbrev="Day Software">Day Software</organization>
4314    <address>
4315      <email></email>
4316      <uri></uri>
4317    </address>
4318  </author>
4319  <author initials="L." surname="Masinter" fullname="Larry Masinter">
4320    <organization abbrev="Adobe Systems">Adobe Systems Incorporated</organization>
4321    <address>
4322      <email></email>
4323      <uri></uri>
4324    </address>
4325  </author>
4326  <date month="January" year="2005"/>
4327 </front>
4328 <seriesInfo name="STD" value="66"/>
4329 <seriesInfo name="RFC" value="3986"/>
4332<reference anchor="RFC0793">
4333  <front>
4334    <title>Transmission Control Protocol</title>
4335    <author initials="J." surname="Postel" fullname="Jon Postel">
4336      <organization>University of Southern California (USC)/Information Sciences Institute</organization>
4337    </author>
4338    <date year="1981" month="September"/>
4339  </front>
4340  <seriesInfo name="STD" value="7"/>
4341  <seriesInfo name="RFC" value="793"/>
4344<reference anchor="USASCII">
4345  <front>
4346    <title>Coded Character Set -- 7-bit American Standard Code for Information Interchange</title>
4347    <author>
4348      <organization>American National Standards Institute</organization>
4349    </author>
4350    <date year="1986"/>
4351  </front>
4352  <seriesInfo name="ANSI" value="X3.4"/>
4355<reference anchor="RFC1950">
4356  <front>
4357    <title>ZLIB Compressed Data Format Specification version 3.3</title>
4358    <author initials="L.P." surname="Deutsch" fullname="L. Peter Deutsch">
4359      <organization>Aladdin Enterprises</organization>
4360      <address><email></email></address>
4361    </author>
4362    <author initials="J-L." surname="Gailly" fullname="Jean-Loup Gailly"/>
4363    <date month="May" year="1996"/>
4364  </front>
4365  <seriesInfo name="RFC" value="1950"/>
4366  <!--<annotation>
4367    RFC 1950 is an Informational RFC, thus it might be less stable than
4368    this specification. On the other hand, this downward reference was
4369    present since the publication of <xref target="RFC2068" x:fmt="none">RFC 2068</xref> in 1997,
4370    therefore it is unlikely to cause problems in practice. See also
4371    <xref target="BCP97"/>.
4372  </annotation>-->
4375<reference anchor="RFC1951">
4376  <front>
4377    <title>DEFLATE Compressed Data Format Specification version 1.3</title>
4378    <author initials="P." surname="Deutsch" fullname="L. Peter Deutsch">
4379      <organization>Aladdin Enterprises</organization>
4380      <address><email></email></address>
4381    </author>
4382    <date month="May" year="1996"/>
4383  </front>
4384  <seriesInfo name="RFC" value="1951"/>
4385  <!--<annotation>
4386    RFC 1951 is an Informational RFC, thus it might be less stable than
4387    this specification. On the other hand, this downward reference was
4388    present since the publication of <xref target="RFC2068" x:fmt="none">RFC 2068</xref> in 1997,
4389    therefore it is unlikely to cause problems in practice. See also
4390    <xref target="BCP97"/>.
4391  </annotation>-->
4394<reference anchor="RFC1952">
4395  <front>
4396    <title>GZIP file format specification version 4.3</title>
4397    <author initials="P." surname="Deutsch" fullname="L. Peter Deutsch">
4398      <organization>Aladdin Enterprises</organization>
4399      <address><email></email></address>
4400    </author>
4401    <author initials="J-L." surname="Gailly" fullname="Jean-Loup Gailly">
4402      <address><email></email></address>
4403    </author>
4404    <author initials="M." surname="Adler" fullname="Mark Adler">
4405      <address><email></email></address>
4406    </author>
4407    <author initials="L.P." surname="Deutsch" fullname="L. Peter Deutsch">
4408      <address><email></email></address>
4409    </author>
4410    <author initials="G." surname="Randers-Pehrson" fullname="Glenn Randers-Pehrson">
4411      <address><email></email></address>
4412    </author>
4413    <date month="May" year="1996"/>
4414  </front>
4415  <seriesInfo name="RFC" value="1952"/>
4416  <!--<annotation>
4417    RFC 1952 is an Informational RFC, thus it might be less stable than
4418    this specification. On the other hand, this downward reference was
4419    present since the publication of <xref target="RFC2068" x:fmt="none">RFC 2068</xref> in 1997,
4420    therefore it is unlikely to cause problems in practice. See also
4421    <xref target="BCP97"/>.
4422  </annotation>-->
4425<reference anchor="Welch">
4426  <front>
4427    <title>A Technique for High Performance Data Compression</title>
4428    <author initials="T.A." surname="Welch" fullname="Terry A. Welch"/>
4429    <date month="June" year="1984"/>
4430  </front>
4431  <seriesInfo name="IEEE Computer" value="17(6)"/>
4436<references title="Informative References">
4438<reference anchor="ISO-8859-1">
4439  <front>
4440    <title>
4441     Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1
4442    </title>
4443    <author>
4444      <organization>International Organization for Standardization</organization>
4445    </author>
4446    <date year="1998"/>
4447  </front>
4448  <seriesInfo name="ISO/IEC" value="8859-1:1998"/>
4451<reference anchor="RFC1919">
4452  <front>
4453    <title>Classical versus Transparent IP Proxies</title>
4454    <author initials="M." surname="Chatel" fullname="Marc Chatel">
4455      <address><email></email></address>
4456    </author>
4457    <date year="1996" month="March"/>
4458  </front>
4459  <seriesInfo name="RFC" value="1919"/>
4462<reference anchor="RFC1945">
4463  <front>
4464    <title abbrev="HTTP/1.0">Hypertext Transfer Protocol -- HTTP/1.0</title>
4465    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
4466      <organization>MIT, Laboratory for Computer Science</organization>
4467      <address><email></email></address>
4468    </author>
4469    <author initials="R.T." surname="Fielding" fullname="Roy T. Fielding">
4470      <organization>University of California, Irvine, Department of Information and Computer Science</organization>
4471      <address><email></email></address>
4472    </author>
4473    <author initials="H.F." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
4474      <organization>W3 Consortium, MIT Laboratory for Computer Science</organization>
4475      <address><email></email></address>
4476    </author>
4477    <date month="May" year="1996"/>
4478  </front>
4479  <seriesInfo name="RFC" value="1945"/>
4482<reference anchor="RFC2045">
4483  <front>
4484    <title abbrev="Internet Message Bodies">Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</title>
4485    <author initials="N." surname="Freed" fullname="Ned Freed">
4486      <organization>Innosoft International, Inc.</organization>
4487      <address><email></email></address>
4488    </author>
4489    <author initials="N.S." surname="Borenstein" fullname="Nathaniel S. Borenstein">
4490      <organization>First Virtual Holdings</organization>
4491      <address><email></email></address>
4492    </author>
4493    <date month="November" year="1996"/>
4494  </front>
4495  <seriesInfo name="RFC" value="2045"/>
4498<reference anchor="RFC2047">
4499  <front>
4500    <title abbrev="Message Header Extensions">MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text</title>
4501    <author initials="K." surname="Moore" fullname="Keith Moore">
4502      <organization>University of Tennessee</organization>
4503      <address><email></email></address>
4504    </author>
4505    <date month="November" year="1996"/>
4506  </front>
4507  <seriesInfo name="RFC" value="2047"/>
4510<reference anchor="RFC2068">
4511  <front>
4512    <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
4513    <author initials="R." surname="Fielding" fullname="Roy T. Fielding">
4514      <organization>University of California, Irvine, Department of Information and Computer Science</organization>
4515      <address><email></email></address>
4516    </author>
4517    <author initials="J." surname="Gettys" fullname="Jim Gettys">
4518      <organization>MIT Laboratory for Computer Science</organization>
4519      <address><email></email></address>
4520    </author>
4521    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
4522      <organization>Digital Equipment Corporation, Western Research Laboratory</organization>
4523      <address><email></email></address>
4524    </author>
4525    <author initials="H." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
4526      <organization>MIT Laboratory for Computer Science</organization>
4527      <address><email></email></address>
4528    </author>
4529    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
4530      <organization>MIT Laboratory for Computer Science</organization>
4531      <address><email></email></address>
4532    </author>
4533    <date month="January" year="1997"/>
4534  </front>
4535  <seriesInfo name="RFC" value="2068"/>
4538<reference anchor="RFC2145">
4539  <front>
4540    <title abbrev="HTTP Version Numbers">Use and Interpretation of HTTP Version Numbers</title>
4541    <author initials="J.C." surname="Mogul" fullname="Jeffrey C. Mogul">
4542      <organization>Western Research Laboratory</organization>
4543      <address><email></email></address>
4544    </author>
4545    <author initials="R.T." surname="Fielding" fullname="Roy T. Fielding">
4546      <organization>Department of Information and Computer Science</organization>
4547      <address><email></email></address>
4548    </author>
4549    <author initials="J." surname="Gettys" fullname="Jim Gettys">
4550      <organization>MIT Laboratory for Computer Science</organization>
4551      <address><email></email></address>
4552    </author>
4553    <author initials="H.F." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
4554      <organization>W3 Consortium</organization>
4555      <address><email></email></address>
4556    </author>
4557    <date month="May" year="1997"/>
4558  </front>
4559  <seriesInfo name="RFC" value="2145"/>
4562<reference anchor="RFC2616">
4563  <front>
4564    <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
4565    <author initials="R." surname="Fielding" fullname="R. Fielding">
4566      <organization>University of California, Irvine</organization>
4567      <address><email></email></address>
4568    </author>
4569    <author initials="J." surname="Gettys" fullname="J. Gettys">
4570      <organization>W3C</organization>
4571      <address><email></email></address>
4572    </author>
4573    <author initials="J." surname="Mogul" fullname="J. Mogul">
4574      <organization>Compaq Computer Corporation</organization>
4575      <address><email></email></address>
4576    </author>
4577    <author initials="H." surname="Frystyk" fullname="H. Frystyk">
4578      <organization>MIT Laboratory for Computer Science</organization>
4579      <address><email></email></address>
4580    </author>
4581    <author initials="L." surname="Masinter" fullname="L. Masinter">
4582      <organization>Xerox Corporation</organization>
4583      <address><email></email></address>
4584    </author>
4585    <author initials="P." surname="Leach" fullname="P. Leach">
4586      <organization>Microsoft Corporation</organization>
4587      <address><email></email></address>
4588    </author>
4589    <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
4590      <organization>W3C</organization>
4591      <address><email></email></address>
4592    </author>
4593    <date month="June" year="1999"/>
4594  </front>
4595  <seriesInfo name="RFC" value="2616"/>
4598<reference anchor="RFC2817">
4599  <front>
4600    <title>Upgrading to TLS Within HTTP/1.1</title>
4601    <author initials="R." surname="Khare" fullname="R. Khare">
4602      <organization>4K Associates / UC Irvine</organization>
4603      <address><email></email></address>
4604    </author>
4605    <author initials="S." surname="Lawrence" fullname="S. Lawrence">
4606      <organization>Agranat Systems, Inc.</organization>
4607      <address><email></email></address>
4608    </author>
4609    <date year="2000" month="May"/>
4610  </front>
4611  <seriesInfo name="RFC" value="2817"/>
4614<reference anchor="RFC2818">
4615  <front>
4616    <title>HTTP Over TLS</title>
4617    <author initials="E." surname="Rescorla" fullname="Eric Rescorla">
4618      <organization>RTFM, Inc.</organization>
4619      <address><email></email></address>
4620    </author>
4621    <date year="2000" month="May"/>
4622  </front>
4623  <seriesInfo name="RFC" value="2818"/>
4626<reference anchor="RFC3040">
4627  <front>
4628    <title>Internet Web Replication and Caching Taxonomy</title>
4629    <author initials="I." surname="Cooper" fullname="I. Cooper">
4630      <organization>Equinix, Inc.</organization>
4631    </author>
4632    <author initials="I." surname="Melve" fullname="I. Melve">
4633      <organization>UNINETT</organization>
4634    </author>
4635    <author initials="G." surname="Tomlinson" fullname="G. Tomlinson">
4636      <organization>CacheFlow Inc.</organization>
4637    </author>
4638    <date year="2001" month="January"/>
4639  </front>
4640  <seriesInfo name="RFC" value="3040"/>
4643<reference anchor="BCP90">
4644  <front>
4645    <title>Registration Procedures for Message Header Fields</title>
4646    <author initials="G." surname="Klyne" fullname="G. Klyne">
4647      <organization>Nine by Nine</organization>
4648      <address><email></email></address>
4649    </author>
4650    <author initials="M." surname="Nottingham" fullname="M. Nottingham">
4651      <organization>BEA Systems</organization>
4652      <address><email></email></address>
4653    </author>
4654    <author initials="J." surname="Mogul" fullname="J. Mogul">
4655      <organization>HP Labs</organization>
4656      <address><email></email></address>
4657    </author>
4658    <date year="2004" month="September"/>
4659  </front>
4660  <seriesInfo name="BCP" value="90"/>
4661  <seriesInfo name="RFC" value="3864"/>
4664<reference anchor="RFC4033">
4665  <front>
4666    <title>DNS Security Introduction and Requirements</title>
4667    <author initials="R." surname="Arends" fullname="R. Arends"/>
4668    <author initials="R." surname="Austein" fullname="R. Austein"/>
4669    <author initials="M." surname="Larson" fullname="M. Larson"/>
4670    <author initials="D." surname="Massey" fullname="D. Massey"/>
4671    <author initials="S." surname="Rose" fullname="S. Rose"/>
4672    <date year="2005" month="March"/>
4673  </front>
4674  <seriesInfo name="RFC" value="4033"/>
4677<reference anchor="BCP13">
4678  <front>
4679    <title>Media Type Specifications and Registration Procedures</title>
4680    <author initials="N." surname="Freed" fullname="Ned Freed">
4681      <organization>Oracle</organization>
4682      <address>
4683        <email></email>
4684      </address>
4685    </author>
4686    <author initials="J." surname="Klensin" fullname="John C. Klensin">
4687      <address>
4688        <email></email>
4689      </address>
4690    </author>
4691    <author initials="T." surname="Hansen" fullname="Tony Hansen">
4692      <organization>AT&amp;T Laboratories</organization>
4693      <address>
4694        <email></email>
4695      </address>
4696    </author>
4697    <date year="2013" month="January"/>
4698  </front>
4699  <seriesInfo name="BCP" value="13"/>
4700  <seriesInfo name="RFC" value="6838"/>
4703<reference anchor="BCP115">
4704  <front>
4705    <title>Guidelines and Registration Procedures for New URI Schemes</title>
4706    <author initials="T." surname="Hansen" fullname="T. Hansen">
4707      <organization>AT&amp;T Laboratories</organization>
4708      <address>
4709        <email></email>
4710      </address>
4711    </author>
4712    <author initials="T." surname="Hardie" fullname="T. Hardie">
4713      <organization>Qualcomm, Inc.</organization>
4714      <address>
4715        <email></email>
4716      </address>
4717    </author>
4718    <author initials="L." surname="Masinter" fullname="L. Masinter">
4719      <organization>Adobe Systems</organization>
4720      <address>
4721        <email></email>
4722      </address>
4723    </author>
4724    <date year="2006" month="February"/>
4725  </front>
4726  <seriesInfo name="BCP" value="115"/>
4727  <seriesInfo name="RFC" value="4395"/>
4730<reference anchor="RFC4559">
4731  <front>
4732    <title>SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows</title>
4733    <author initials="K." surname="Jaganathan" fullname="K. Jaganathan"/>
4734    <author initials="L." surname="Zhu" fullname="L. Zhu"/>
4735    <author initials="J." surname="Brezak" fullname="J. Brezak"/>
4736    <date year="2006" month="June"/>
4737  </front>
4738  <seriesInfo name="RFC" value="4559"/>
4741<reference anchor="RFC5226">
4742  <front>
4743    <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
4744    <author initials="T." surname="Narten" fullname="T. Narten">
4745      <organization>IBM</organization>
4746      <address><email></email></address>
4747    </author>
4748    <author initials="H." surname="Alvestrand" fullname="H. Alvestrand">
4749      <organization>Google</organization>
4750      <address><email></email></address>
4751    </author>
4752    <date year="2008" month="May"/>
4753  </front>
4754  <seriesInfo name="BCP" value="26"/>
4755  <seriesInfo name="RFC" value="5226"/>
4758<reference anchor="RFC5246">
4759   <front>
4760      <title>The Transport Layer Security (TLS) Protocol Version 1.2</title>
4761      <author initials="T." surname="Dierks" fullname="T. Dierks">
4762         <organization/>
4763      </author>
4764      <author initials="E." surname="Rescorla" fullname="E. Rescorla">
4765         <organization>RTFM, Inc.</organization>
4766      </author>
4767      <date year="2008" month="August"/>
4768   </front>
4769   <seriesInfo name="RFC" value="5246"/>
4772<reference anchor="RFC5322">
4773  <front>
4774    <title>Internet Message Format</title>
4775    <author initials="P." surname="Resnick" fullname="P. Resnick">
4776      <organization>Qualcomm Incorporated</organization>
4777    </author>
4778    <date year="2008" month="October"/>
4779  </front>
4780  <seriesInfo name="RFC" value="5322"/>
4783<reference anchor="RFC6265">
4784  <front>
4785    <title>HTTP State Management Mechanism</title>
4786    <author initials="A." surname="Barth" fullname="Adam Barth">
4787      <organization abbrev="U.C. Berkeley">
4788        University of California, Berkeley
4789      </organization>
4790      <address><email></email></address>
4791    </author>
4792    <date year="2011" month="April"/>
4793  </front>
4794  <seriesInfo name="RFC" value="6265"/>
4797<reference anchor="RFC6585">
4798  <front>
4799    <title>Additional HTTP Status Codes</title>
4800    <author initials="M." surname="Nottingham" fullname="M. Nottingham">
4801      <organization>Rackspace</organization>
4802    </author>
4803    <author initials="R." surname="Fielding" fullname="R. Fielding">
4804      <organization>Adobe</organization>
4805    </author>
4806    <date year="2012" month="April"/>
4807   </front>
4808   <seriesInfo name="RFC" value="6585"/>
4811<!--<reference anchor='BCP97'>
4812  <front>
4813    <title>Handling Normative References to Standards-Track Documents</title>
4814    <author initials='J.' surname='Klensin' fullname='J. Klensin'>
4815      <address>
4816        <email></email>
4817      </address>
4818    </author>
4819    <author initials='S.' surname='Hartman' fullname='S. Hartman'>
4820      <organization>MIT</organization>
4821      <address>
4822        <email></email>
4823      </address>
4824    </author>
4825    <date year='2007' month='June' />
4826  </front>
4827  <seriesInfo name='BCP' value='97' />
4828  <seriesInfo name='RFC' value='4897' />
4831<reference anchor="Kri2001" target="">
4832  <front>
4833    <title>HTTP Cookies: Standards, Privacy, and Politics</title>
4834    <author initials="D." surname="Kristol" fullname="David M. Kristol"/>
4835    <date year="2001" month="November"/>
4836  </front>
4837  <seriesInfo name="ACM Transactions on Internet Technology" value="1(2)"/>
4843<section title="HTTP Version History" anchor="compatibility">
4845   HTTP has been in use by the World-Wide Web global information initiative
4846   since 1990. The first version of HTTP, later referred to as HTTP/0.9,
4847   was a simple protocol for hypertext data transfer across the Internet
4848   with only a single request method (GET) and no metadata.
4849   HTTP/1.0, as defined by <xref target="RFC1945"/>, added a range of request
4850   methods and MIME-like messaging that could include metadata about the data
4851   transferred and modifiers on the request/response semantics. However,
4852   HTTP/1.0 did not sufficiently take into consideration the effects of
4853   hierarchical proxies, caching, the need for persistent connections, or
4854   name-based virtual hosts. The proliferation of incompletely-implemented
4855   applications calling themselves "HTTP/1.0" further necessitated a
4856   protocol version change in order for two communicating applications
4857   to determine each other's true capabilities.
4860   HTTP/1.1 remains compatible with HTTP/1.0 by including more stringent
4861   requirements that enable reliable implementations, adding only
4862   those new features that will either be safely ignored by an HTTP/1.0
4863   recipient or only sent when communicating with a party advertising
4864   conformance with HTTP/1.1.
4867   It is beyond the scope of a protocol specification to mandate
4868   conformance with previous versions. HTTP/1.1 was deliberately
4869   designed, however, to make supporting previous versions easy.
4870   We would expect a general-purpose HTTP/1.1 server to understand
4871   any valid request in the format of HTTP/1.0 and respond appropriately
4872   with an HTTP/1.1 message that only uses features understood (or
4873   safely ignored) by HTTP/1.0 clients.  Likewise, we would expect
4874   an HTTP/1.1 client to understand any valid HTTP/1.0 response.
4877   Since HTTP/0.9 did not support header fields in a request,
4878   there is no mechanism for it to support name-based virtual
4879   hosts (selection of resource by inspection of the <xref target="" format="none">Host</xref> header
4880   field).  Any server that implements name-based virtual hosts
4881   ought to disable support for HTTP/0.9.  Most requests that
4882   appear to be HTTP/0.9 are, in fact, badly constructed HTTP/1.x
4883   requests wherein a buggy client failed to properly encode
4884   linear whitespace found in a URI reference and placed in
4885   the request-target.
4888<section title="Changes from HTTP/1.0" anchor="changes.from.1.0">
4890   This section summarizes major differences between versions HTTP/1.0
4891   and HTTP/1.1.
4894<section title="Multi-homed Web Servers" anchor="">
4896   The requirements that clients and servers support the <xref target="" format="none">Host</xref>
4897   header field (<xref target=""/>), report an error if it is
4898   missing from an HTTP/1.1 request, and accept absolute URIs (<xref target="request-target"/>)
4899   are among the most important changes defined by HTTP/1.1.
4902   Older HTTP/1.0 clients assumed a one-to-one relationship of IP
4903   addresses and servers; there was no other established mechanism for
4904   distinguishing the intended server of a request than the IP address
4905   to which that request was directed. The <xref target="" format="none">Host</xref> header field was
4906   introduced during the development of HTTP/1.1 and, though it was
4907   quickly implemented by most HTTP/1.0 browsers, additional requirements
4908   were placed on all HTTP/1.1 requests in order to ensure complete
4909   adoption.  At the time of this writing, most HTTP-based services
4910   are dependent upon the Host header field for targeting requests.
4914<section title="Keep-Alive Connections" anchor="compatibility.with.http.1.0.persistent.connections">
4916   In HTTP/1.0, each connection is established by the client prior to the
4917   request and closed by the server after sending the response. However, some
4918   implementations implement the explicitly negotiated ("Keep-Alive") version
4919   of persistent connections described in Section 19.7.1 of <xref target="RFC2068"/>.
4922   Some clients and servers might wish to be compatible with these previous
4923   approaches to persistent connections, by explicitly negotiating for them
4924   with a "Connection: keep-alive" request header field. However, some
4925   experimental implementations of HTTP/1.0 persistent connections are faulty;
4926   for example, if an HTTP/1.0 proxy server doesn't understand
4927   <xref target="header.connection" format="none">Connection</xref>, it will erroneously forward that header field
4928   to the next inbound server, which would result in a hung connection.
4931   One attempted solution was the introduction of a Proxy-Connection header
4932   field, targeted specifically at proxies. In practice, this was also
4933   unworkable, because proxies are often deployed in multiple layers, bringing
4934   about the same problem discussed above.
4937   As a result, clients are encouraged not to send the Proxy-Connection header
4938   field in any requests.
4941   Clients are also encouraged to consider the use of Connection: keep-alive
4942   in requests carefully; while they can enable persistent connections with
4943   HTTP/1.0 servers, clients using them will need to monitor the
4944   connection for "hung" requests (which indicate that the client ought stop
4945   sending the header field), and this mechanism ought not be used by clients
4946   at all when a proxy is being used.
4950<section title="Introduction of Transfer-Encoding" anchor="introduction.of.transfer-encoding">
4952   HTTP/1.1 introduces the <xref target="header.transfer-encoding" format="none">Transfer-Encoding</xref> header field
4953   (<xref target="header.transfer-encoding"/>).
4954   Transfer codings need to be decoded prior to forwarding an HTTP message
4955   over a MIME-compliant protocol.
4961<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
4963  HTTP's approach to error handling has been explained.
4964  (<xref target="conformance"/>)
4967  The HTTP-version ABNF production has been clarified to be case-sensitive.
4968  Additionally, version numbers has been restricted to single digits, due
4969  to the fact that implementations are known to handle multi-digit version
4970  numbers incorrectly.
4971  (<xref target="http.version"/>)
4974  Userinfo (i.e., username and password) are now disallowed in HTTP and
4975  HTTPS URIs, because of security issues related to their transmission on the
4976  wire.
4977  (<xref target="http.uri"/>)
4980  The HTTPS URI scheme is now defined by this specification; previously,
4981  it was done in  Section 2.4 of <xref target="RFC2818"/>.
4982  Furthermore, it implies end-to-end security.
4983  (<xref target="https.uri"/>)
4986  HTTP messages can be (and often are) buffered by implementations; despite
4987  it sometimes being available as a stream, HTTP is fundamentally a
4988  message-oriented protocol.
4989  Minimum supported sizes for various protocol elements have been
4990  suggested, to improve interoperability.
4991  (<xref target="http.message"/>)
4994  Invalid whitespace around field-names is now required to be rejected,
4995  because accepting it represents a security vulnerability.
4996  The ABNF productions defining header fields now only list the field value.
4997  (<xref target="header.fields"/>)
5000  Rules about implicit linear whitespace between certain grammar productions
5001  have been removed; now whitespace is only allowed where specifically
5002  defined in the ABNF.
5003  (<xref target="whitespace"/>)
5006  Header fields that span multiple lines ("line folding") are deprecated.
5007  (<xref target="field.parsing"/>)
5010  The NUL octet is no longer allowed in comment and quoted-string text, and
5011  handling of backslash-escaping in them has been clarified.
5012  The quoted-pair rule no longer allows escaping control characters other than
5013  HTAB.
5014  Non-ASCII content in header fields and the reason phrase has been obsoleted
5015  and made opaque (the TEXT rule was removed).
5016  (<xref target="field.components"/>)
5019  Bogus "<xref target="header.content-length" format="none">Content-Length</xref>" header fields are now required to be
5020  handled as errors by recipients.
5021  (<xref target="header.content-length"/>)
5024  The algorithm for determining the message body length has been clarified
5025  to indicate all of the special cases (e.g., driven by methods or status
5026  codes) that affect it, and that new protocol elements cannot define such
5027  special cases.
5028  CONNECT is a new, special case in determining message body length.
5029  "multipart/byteranges" is no longer a way of determining message body length
5030  detection.
5031  (<xref target="message.body.length"/>)
5034  The "identity" transfer coding token has been removed.
5035  (Sections <xref format="counter" target="message.body"/> and
5036  <xref format="counter" target="transfer.codings"/>)
5039  Chunk length does not include the count of the octets in the
5040  chunk header and trailer.
5041  Line folding in chunk extensions is  disallowed.
5042  (<xref target="chunked.encoding"/>)
5045  The meaning of the "deflate" content coding has been clarified.
5046  (<xref target="deflate.coding"/>)
5049  The segment + query components of RFC 3986 have been used to define the
5050  request-target, instead of abs_path from RFC 1808.
5051  The asterisk-form of the request-target is only allowed with the OPTIONS
5052  method.
5053  (<xref target="request-target"/>)
5056  The term "Effective Request URI" has been introduced.
5057  (<xref target="effective.request.uri"/>)
5060  Gateways do not need to generate <xref target="header.via" format="none">Via</xref> header fields anymore.
5061  (<xref target="header.via"/>)
5064  Exactly when "close" connection options have to be sent has been clarified.
5065  Also, "hop-by-hop" header fields are required to appear in the Connection header
5066  field; just because they're defined as hop-by-hop in this specification
5067  doesn't exempt them.
5068  (<xref target="header.connection"/>)
5071  The limit of two connections per server has been removed.
5072  An idempotent sequence of requests is no longer required to be retried.
5073  The requirement to retry requests under certain circumstances when the
5074  server prematurely closes the connection has been removed.
5075  Also, some extraneous requirements about when servers are allowed to close
5076  connections prematurely have been removed.
5077  (<xref target="persistent.connections"/>)
5080  The semantics of the <xref target="header.upgrade" format="none">Upgrade</xref> header field is now defined in
5081  responses other than 101 (this was incorporated from <xref target="RFC2817"/>). Furthermore, the ordering in the field value is now
5082  significant.
5083  (<xref target="header.upgrade"/>)
5086  Empty list elements in list productions (e.g., a list header field containing
5087  ", ,") have been deprecated.
5088  (<xref target="abnf.extension"/>)
5091  Registration of Transfer Codings now requires IETF Review
5092  (<xref target="transfer.coding.registry"/>)
5095  This specification now defines the Upgrade Token Registry, previously
5096  defined in Section 7.2 of <xref target="RFC2817"/>.
5097  (<xref target="upgrade.token.registry"/>)
5100  The expectation to support HTTP/0.9 requests has been removed.
5101  (<xref target="compatibility"/>)
5104  Issues with the Keep-Alive and Proxy-Connection header fields in requests
5105  are pointed out, with use of the latter being discouraged altogether.
5106  (<xref target="compatibility.with.http.1.0.persistent.connections"/>)
5112<section title="Collected ABNF" anchor="collected.abnf">
5114<artwork type="abnf" name="p1-messaging.parsed-abnf"><![CDATA[
5115BWS = OWS
5117Connection = *( "," OWS ) connection-option *( OWS "," [ OWS
5118 connection-option ] )
5119Content-Length = 1*DIGIT
5121HTTP-message = start-line *( header-field CRLF ) CRLF [ message-body
5122 ]
5123HTTP-name = %x48.54.54.50 ; HTTP
5124HTTP-version = HTTP-name "/" DIGIT "." DIGIT
5125Host = uri-host [ ":" port ]
5127OWS = *( SP / HTAB )
5129RWS = 1*( SP / HTAB )
5131TE = [ ( "," / t-codings ) *( OWS "," [ OWS t-codings ] ) ]
5132Trailer = *( "," OWS ) field-name *( OWS "," [ OWS field-name ] )
5133Transfer-Encoding = *( "," OWS ) transfer-coding *( OWS "," [ OWS
5134 transfer-coding ] )
5136URI-reference = <URI-reference, defined in [RFC3986], Section 4.1>
5137Upgrade = *( "," OWS ) protocol *( OWS "," [ OWS protocol ] )
5139Via = *( "," OWS ) ( received-protocol RWS received-by [ RWS comment
5140 ] ) *( OWS "," [ OWS ( received-protocol RWS received-by [ RWS
5141 comment ] ) ] )
5143absolute-URI = <absolute-URI, defined in [RFC3986], Section 4.3>
5144absolute-form = absolute-URI
5145absolute-path = 1*( "/" segment )
5146asterisk-form = "*"
5147attribute = token
5148authority = <authority, defined in [RFC3986], Section 3.2>
5149authority-form = authority
5151chunk = chunk-size [ chunk-ext ] CRLF chunk-data CRLF
5152chunk-data = 1*OCTET
5153chunk-ext = *( ";" chunk-ext-name [ "=" chunk-ext-val ] )
5154chunk-ext-name = token
5155chunk-ext-val = token / quoted-str-nf
5156chunk-size = 1*HEXDIG
5157chunked-body = *chunk last-chunk trailer-part CRLF
5158comment = "(" *( ctext / quoted-cpair / comment ) ")"
5159connection-option = token
5160ctext = HTAB / SP / %x21-27 ; '!'-'''
5161 / %x2A-5B ; '*'-'['
5162 / %x5D-7E ; ']'-'~'
5163 / obs-text
5165field-content = *( HTAB / SP / VCHAR / obs-text )
5166field-name = token
5167field-value = *( field-content / obs-fold )
5168fragment = <fragment, defined in [RFC3986], Section 3.5>
5170header-field = field-name ":" OWS field-value OWS
5171http-URI = "http://" authority path-abempty [ "?" query ] [ "#"
5172 fragment ]
5173https-URI = "https://" authority path-abempty [ "?" query ] [ "#"
5174 fragment ]
5176last-chunk = 1*"0" [ chunk-ext ] CRLF
5178message-body = *OCTET
5179method = token
5181obs-fold = CRLF ( SP / HTAB )
5182obs-text = %x80-FF
5183origin-form = absolute-path [ "?" query ]
5185partial-URI = relative-part [ "?" query ]
5186path-abempty = <path-abempty, defined in [RFC3986], Section 3.3>
5187port = <port, defined in [RFC3986], Section 3.2.3>
5188protocol = protocol-name [ "/" protocol-version ]
5189protocol-name = token
5190protocol-version = token
5191pseudonym = token
5193qdtext = HTAB / SP / "!" / %x23-5B ; '#'-'['
5194 / %x5D-7E ; ']'-'~'
5195 / obs-text
5196qdtext-nf = HTAB / SP / "!" / %x23-5B ; '#'-'['
5197 / %x5D-7E ; ']'-'~'
5198 / obs-text
5199query = <query, defined in [RFC3986], Section 3.4>
5200quoted-cpair = "\" ( HTAB / SP / VCHAR / obs-text )
5201quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
5202quoted-str-nf = DQUOTE *( qdtext-nf / quoted-pair ) DQUOTE
5203quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
5205rank = ( "0" [ "." *3DIGIT ] ) / ( "1" [ "." *3"0" ] )
5206reason-phrase = *( HTAB / SP / VCHAR / obs-text )
5207received-by = ( uri-host [ ":" port ] ) / pseudonym
5208received-protocol = [ protocol-name "/" ] protocol-version
5209relative-part = <relative-part, defined in [RFC3986], Section 4.2>
5210request-line = method SP request-target SP HTTP-version CRLF
5211request-target = origin-form / absolute-form / authority-form /
5212 asterisk-form
5214segment = <segment, defined in [RFC3986], Section 3.3>
5215special = "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\" /
5216 DQUOTE / "/" / "[" / "]" / "?" / "=" / "{" / "}"
5217start-line = request-line / status-line
5218status-code = 3DIGIT
5219status-line = HTTP-version SP status-code SP reason-phrase CRLF
5221t-codings = "trailers" / ( transfer-coding [ t-ranking ] )
5222t-ranking = OWS ";" OWS "q=" rank
5223tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." /
5224 "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA
5225token = 1*tchar
5226trailer-part = *( header-field CRLF )
5227transfer-coding = "chunked" / "compress" / "deflate" / "gzip" /
5228 transfer-extension
5229transfer-extension = token *( OWS ";" OWS transfer-parameter )
5230transfer-parameter = attribute BWS "=" BWS value
5232uri-host = <host, defined in [RFC3986], Section 3.2.2>
5234value = word
5236word = token / quoted-string
5242<section title="Change Log (to be removed by RFC Editor before publication)" anchor="change.log">
5244<section title="Since RFC 2616">
5246  Changes up to the first Working Group Last Call draft are summarized
5247  in <eref target=""/>.
5251<section title="Since draft-ietf-httpbis-p1-messaging-21" anchor="changes.since.21">
5253  Closed issues:
5254  <list style="symbols">
5255    <t>
5256      <eref target=""/>:
5257      "Cite HTTPS URI scheme definition" (the spec now includes the HTTPs
5258      scheme definition and thus updates RFC 2818)
5259    </t>
5260    <t>
5261      <eref target=""/>:
5262      "mention of 'proxies' in section about caches"
5263    </t>
5264    <t>
5265      <eref target=""/>:
5266      "use of ABNF terms from RFC 3986"
5267    </t>
5268    <t>
5269      <eref target=""/>:
5270      "transferring URIs with userinfo in payload"
5271    </t>
5272    <t>
5273      <eref target=""/>:
5274      "editorial improvements to message length definition"
5275    </t>
5276    <t>
5277      <eref target=""/>:
5278      "Connection header field MUST vs SHOULD"
5279    </t>
5280    <t>
5281      <eref target=""/>:
5282      "editorial improvements to persistent connections section"
5283    </t>
5284    <t>
5285      <eref target=""/>:
5286      "URI normalization vs empty path"
5287    </t>
5288    <t>
5289      <eref target=""/>:
5290      "p1 feedback"
5291    </t>
5292    <t>
5293      <eref target=""/>:
5294      "is parsing OBS-FOLD mandatory?"
5295    </t>
5296    <t>
5297      <eref target=""/>:
5298      "HTTPS and Shared Caching"
5299    </t>
5300    <t>
5301      <eref target=""/>:
5302      "Requirements for recipients of ws between start-line and first header field"
5303    </t>
5304    <t>
5305      <eref target=""/>:
5306      "SP and HT when being tolerant"
5307    </t>
5308    <t>
5309      <eref target=""/>:
5310      "Message Parsing Strictness"
5311    </t>
5312    <t>
5313      <eref target=""/>:
5314      "'Render'"
5315    </t>
5316    <t>
5317      <eref target=""/>:
5318      "No-Transform"
5319    </t>
5320    <t>
5321      <eref target=""/>:
5322      "p2 editorial feedback"
5323    </t>
5324    <t>
5325      <eref target=""/>:
5326      "Content-Length SHOULD be sent"
5327    </t>
5328    <t>
5329      <eref target=""/>:
5330      "origin-form does not allow path starting with "//""
5331    </t>
5332    <t>
5333      <eref target=""/>:
5334      "ambiguity in part 1 example"
5335    </t>
5336  </list>
5340<section title="Since draft-ietf-httpbis-p1-messaging-22" anchor="changes.since.22">
5342  Closed issues:
5343  <list style="symbols">
5344    <t>
5345      <eref target=""/>:
5346      "Part1 should have a reference to TCP (RFC 793)"
5347    </t>
5348    <t>
5349      <eref target=""/>:
5350      "media type registration template issues"
5351    </t>
5352    <t>
5353      <eref target=""/>:
5354      P1 editorial nits
5355    </t>
5356    <t>
5357      <eref target=""/>:
5358      "BWS" (vs conformance)
5359    </t>
5360    <t>
5361      <eref target=""/>:
5362      "obs-fold language"
5363    </t>
5364    <t>
5365      <eref target=""/>:
5366      "Ordering in Upgrade"
5367    </t>
5368    <t>
5369      <eref target=""/>:
5370      "p1 editorial feedback"
5371    </t>
5372    <t>
5373      <eref target=""/>:
5374      "HTTP and TCP name delegation"
5375    </t>
5376    <t>
5377      <eref target=""/>:
5378      "Receiving a higher minor HTTP version number"
5379    </t>
5380    <t>
5381      <eref target=""/>:
5382      "HTTP(S) URIs and fragids"
5383    </t>
5384    <t>
5385      <eref target=""/>:
5386      "Registering x-gzip and x-deflate"
5387    </t>
5388    <t>
5389      <eref target=""/>:
5390      "Via and gateways"
5391    </t>
5392    <t>
5393      <eref target=""/>:
5394      "Mention 203 Non-Authoritative Information in p1"
5395    </t>
5396    <t>
5397      <eref target=""/>:
5398      "SHOULD and conformance"
5399    </t>
5400    <t>
5401      <eref target=""/>:
5402      "Pipelining language"
5403    </t>
5404    <t>
5405      <eref target=""/>:
5406      "proxy handling of a really bad Content-Length"
5407    </t>
5408  </list>
5412<section title="Since draft-ietf-httpbis-p1-messaging-23" anchor="changes.since.23">
5414  Closed issues:
5415  <list style="symbols">
5416    <t>
5417      <eref target=""/>:
5418      "chunk-extensions" (un-deprecated and explained)
5419    </t>
5420    <t>
5421      <eref target=""/>:
5422      "MUST fix Content-Length?"
5423    </t>
5424    <t>
5425      <eref target=""/>:
5426      "list notation defined in appendix"
5427    </t>
5428    <t>
5429      <eref target=""/>:
5430      "Fine-Tuning when Upgrade takes effect"
5431    </t>
5432  </list>
Note: See TracBrowser for help on using the repository browser.