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

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

Clarify what should happen when a response is incomplete.
Disentangle the requirements surrounding conditional range
requests, strong validators, and recombining partial content
to remove redundant redundancy. Separate handling of 304
responses into a separate section on cache freshening.

Add definitions for "cache entry" and "cache key".
Improve introductions for caching and cache operation.

These changes should all be editorial, hopefully.
Tangentially related to #101 and #304.

  • Property svn:eol-style set to native
File size: 251.9 KB
1<?xml version="1.0" encoding="utf-8"?>
2<?xml-stylesheet type='text/xsl' href='../myxml2rfc.xslt'?>
3<!DOCTYPE rfc [
4  <!ENTITY MAY "<bcp14 xmlns=''>MAY</bcp14>">
5  <!ENTITY MUST "<bcp14 xmlns=''>MUST</bcp14>">
6  <!ENTITY MUST-NOT "<bcp14 xmlns=''>MUST NOT</bcp14>">
7  <!ENTITY OPTIONAL "<bcp14 xmlns=''>OPTIONAL</bcp14>">
8  <!ENTITY RECOMMENDED "<bcp14 xmlns=''>RECOMMENDED</bcp14>">
9  <!ENTITY REQUIRED "<bcp14 xmlns=''>REQUIRED</bcp14>">
10  <!ENTITY SHALL "<bcp14 xmlns=''>SHALL</bcp14>">
11  <!ENTITY SHALL-NOT "<bcp14 xmlns=''>SHALL NOT</bcp14>">
12  <!ENTITY SHOULD "<bcp14 xmlns=''>SHOULD</bcp14>">
13  <!ENTITY SHOULD-NOT "<bcp14 xmlns=''>SHOULD NOT</bcp14>">
14  <!ENTITY ID-VERSION "latest">
15  <!ENTITY ID-MONTH "August">
16  <!ENTITY ID-YEAR "2011">
17  <!ENTITY mdash "&#8212;">
18  <!ENTITY caching-overview       "<xref target='Part6' x:rel='#caching.overview' xmlns:x=''/>">
19  <!ENTITY cache-incomplete       "<xref target='Part6' x:rel='#response.cacheability' xmlns:x=''/>">
20  <!ENTITY payload                "<xref target='Part3' xmlns:x=''/>">
21  <!ENTITY media-types            "<xref target='Part3' x:rel='#media.types' xmlns:x=''/>">
22  <!ENTITY content-codings        "<xref target='Part3' x:rel='#content.codings' xmlns:x=''/>">
23  <!ENTITY CONNECT                "<xref target='Part2' x:rel='#CONNECT' xmlns:x=''/>">
24  <!ENTITY content.negotiation    "<xref target='Part3' x:rel='#content.negotiation' xmlns:x=''/>">
25  <!ENTITY diff-mime              "<xref target='Part3' x:rel='#differences.between.http.and.mime' xmlns:x=''/>">
26  <!ENTITY representation         "<xref target='Part3' x:rel='#representation' xmlns:x=''/>">
27  <!ENTITY header-cache-control   "<xref target='Part6' x:rel='#header.cache-control' xmlns:x=''/>">
28  <!ENTITY header-expect          "<xref target='Part2' x:rel='#header.expect' xmlns:x=''/>">
29  <!ENTITY header-mime-version    "<xref target='Part3' x:rel='#mime-version' xmlns:x=''/>">
30  <!ENTITY header-pragma          "<xref target='Part6' x:rel='#header.pragma' xmlns:x=''/>">
31  <!ENTITY header-warning         "<xref target='Part6' x:rel='#header.warning' xmlns:x=''/>">
32  <!ENTITY idempotent-methods     "<xref target='Part2' x:rel='#idempotent.methods' xmlns:x=''/>">
33  <!ENTITY status-codes           "<xref target='Part2' x:rel='' xmlns:x=''/>">
34  <!ENTITY status-100             "<xref target='Part2' x:rel='#status.100' xmlns:x=''/>">
35  <!ENTITY status-1xx             "<xref target='Part2' x:rel='#status.1xx' xmlns:x=''/>">
36  <!ENTITY status-203             "<xref target='Part2' x:rel='#status.203' xmlns:x=''/>">
37  <!ENTITY status-3xx             "<xref target='Part2' x:rel='#status.3xx' xmlns:x=''/>">
38  <!ENTITY status-4xx             "<xref target='Part2' x:rel='#status.4xx' xmlns:x=''/>">
39  <!ENTITY status-414             "<xref target='Part2' x:rel='#status.414' xmlns:x=''/>">
41<?rfc toc="yes" ?>
42<?rfc symrefs="yes" ?>
43<?rfc sortrefs="yes" ?>
44<?rfc compact="yes"?>
45<?rfc subcompact="no" ?>
46<?rfc linkmailto="no" ?>
47<?rfc editing="no" ?>
48<?rfc comments="yes"?>
49<?rfc inline="yes"?>
50<?rfc rfcedstyle="yes"?>
51<?rfc-ext allow-markup-in-artwork="yes" ?>
52<?rfc-ext include-references-in-index="yes" ?>
53<rfc obsoletes="2145,2616" updates="2817" category="std" x:maturity-level="draft"
54     ipr="pre5378Trust200902" docName="draft-ietf-httpbis-p1-messaging-&ID-VERSION;"
55     xmlns:x=''>
58  <title abbrev="HTTP/1.1, Part 1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title>
60  <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
61    <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
62    <address>
63      <postal>
64        <street>345 Park Ave</street>
65        <city>San Jose</city>
66        <region>CA</region>
67        <code>95110</code>
68        <country>USA</country>
69      </postal>
70      <email></email>
71      <uri></uri>
72    </address>
73  </author>
75  <author initials="J." surname="Gettys" fullname="Jim Gettys">
76    <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
77    <address>
78      <postal>
79        <street>21 Oak Knoll Road</street>
80        <city>Carlisle</city>
81        <region>MA</region>
82        <code>01741</code>
83        <country>USA</country>
84      </postal>
85      <email></email>
86      <uri></uri>
87    </address>
88  </author>
90  <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
91    <organization abbrev="HP">Hewlett-Packard Company</organization>
92    <address>
93      <postal>
94        <street>HP Labs, Large Scale Systems Group</street>
95        <street>1501 Page Mill Road, MS 1177</street>
96        <city>Palo Alto</city>
97        <region>CA</region>
98        <code>94304</code>
99        <country>USA</country>
100      </postal>
101      <email></email>
102    </address>
103  </author>
105  <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
106    <organization abbrev="Microsoft">Microsoft Corporation</organization>
107    <address>
108      <postal>
109        <street>1 Microsoft Way</street>
110        <city>Redmond</city>
111        <region>WA</region>
112        <code>98052</code>
113        <country>USA</country>
114      </postal>
115      <email></email>
116    </address>
117  </author>
119  <author initials="L." surname="Masinter" fullname="Larry Masinter">
120    <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
121    <address>
122      <postal>
123        <street>345 Park Ave</street>
124        <city>San Jose</city>
125        <region>CA</region>
126        <code>95110</code>
127        <country>USA</country>
128      </postal>
129      <email></email>
130      <uri></uri>
131    </address>
132  </author>
134  <author initials="P." surname="Leach" fullname="Paul J. Leach">
135    <organization abbrev="Microsoft">Microsoft Corporation</organization>
136    <address>
137      <postal>
138        <street>1 Microsoft Way</street>
139        <city>Redmond</city>
140        <region>WA</region>
141        <code>98052</code>
142      </postal>
143      <email></email>
144    </address>
145  </author>
147  <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
148    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
149    <address>
150      <postal>
151        <street>MIT Computer Science and Artificial Intelligence Laboratory</street>
152        <street>The Stata Center, Building 32</street>
153        <street>32 Vassar Street</street>
154        <city>Cambridge</city>
155        <region>MA</region>
156        <code>02139</code>
157        <country>USA</country>
158      </postal>
159      <email></email>
160      <uri></uri>
161    </address>
162  </author>
164  <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
165    <organization abbrev="W3C">World Wide Web Consortium</organization>
166    <address>
167      <postal>
168        <street>W3C / ERCIM</street>
169        <street>2004, rte des Lucioles</street>
170        <city>Sophia-Antipolis</city>
171        <region>AM</region>
172        <code>06902</code>
173        <country>France</country>
174      </postal>
175      <email></email>
176      <uri></uri>
177    </address>
178  </author>
180  <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
181    <organization abbrev="greenbytes">greenbytes GmbH</organization>
182    <address>
183      <postal>
184        <street>Hafenweg 16</street>
185        <city>Muenster</city><region>NW</region><code>48155</code>
186        <country>Germany</country>
187      </postal>
188      <phone>+49 251 2807760</phone>
189      <facsimile>+49 251 2807761</facsimile>
190      <email></email>
191      <uri></uri>
192    </address>
193  </author>
195  <date month="&ID-MONTH;" year="&ID-YEAR;"/>
196  <workgroup>HTTPbis Working Group</workgroup>
200   The Hypertext Transfer Protocol (HTTP) is an application-level protocol for
201   distributed, collaborative, hypertext information systems. HTTP has been in
202   use by the World Wide Web global information initiative since 1990. This
203   document is Part 1 of the seven-part specification that defines the protocol
204   referred to as "HTTP/1.1" and, taken together, obsoletes RFC 2616.
207   Part 1 provides an overview of HTTP and its associated terminology, defines
208   the "http" and "https" Uniform Resource Identifier (URI) schemes, defines
209   the generic message syntax and parsing requirements for HTTP message frames,
210   and describes general security concerns for implementations.
214<note title="Editorial Note (To be removed by RFC Editor)">
215  <t>
216    Discussion of this draft should take place on the HTTPBIS working group
217    mailing list (, which is archived at
218    <eref target=""/>.
219  </t>
220  <t>
221    The current issues list is at
222    <eref target=""/> and related
223    documents (including fancy diffs) can be found at
224    <eref target=""/>.
225  </t>
226  <t>
227    The changes in this draft are summarized in <xref target="changes.since.15"/>.
228  </t>
232<section title="Introduction" anchor="introduction">
234   The Hypertext Transfer Protocol (HTTP) is an application-level
235   request/response protocol that uses extensible semantics and MIME-like
236   message payloads for flexible interaction with network-based hypertext
237   information systems. HTTP relies upon the Uniform Resource Identifier (URI)
238   standard <xref target="RFC3986"/> to indicate the target resource and
239   relationships between resources.
240   Messages are passed in a format similar to that used by Internet mail
241   <xref target="RFC5322"/> and the Multipurpose Internet Mail Extensions
242   (MIME) <xref target="RFC2045"/> (see &diff-mime; for the differences
243   between HTTP and MIME messages).
246   HTTP is a generic interface protocol for information systems. It is
247   designed to hide the details of how a service is implemented by presenting
248   a uniform interface to clients that is independent of the types of
249   resources provided. Likewise, servers do not need to be aware of each
250   client's purpose: an HTTP request can be considered in isolation rather
251   than being associated with a specific type of client or a predetermined
252   sequence of application steps. The result is a protocol that can be used
253   effectively in many different contexts and for which implementations can
254   evolve independently over time.
257   HTTP is also designed for use as an intermediation protocol for translating
258   communication to and from non-HTTP information systems.
259   HTTP proxies and gateways can provide access to alternative information
260   services by translating their diverse protocols into a hypertext
261   format that can be viewed and manipulated by clients in the same way
262   as HTTP services.
265   One consequence of HTTP flexibility is that the protocol cannot be
266   defined in terms of what occurs behind the interface. Instead, we
267   are limited to defining the syntax of communication, the intent
268   of received communication, and the expected behavior of recipients.
269   If the communication is considered in isolation, then successful
270   actions ought to be reflected in corresponding changes to the
271   observable interface provided by servers. However, since multiple
272   clients might act in parallel and perhaps at cross-purposes, we
273   cannot require that such changes be observable beyond the scope
274   of a single response.
277   This document is Part 1 of the seven-part specification of HTTP,
278   defining the protocol referred to as "HTTP/1.1", obsoleting
279   <xref target="RFC2616"/> and <xref target="RFC2145"/>.
280   Part 1 describes the architectural elements that are used or
281   referred to in HTTP, defines the "http" and "https" URI schemes,
282   describes overall network operation and connection management,
283   and defines HTTP message framing and forwarding requirements.
284   Our goal is to define all of the mechanisms necessary for HTTP message
285   handling that are independent of message semantics, thereby defining the
286   complete set of requirements for message parsers and
287   message-forwarding intermediaries.
290<section title="Requirements" anchor="intro.requirements">
292   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
293   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
294   document are to be interpreted as described in <xref target="RFC2119"/>.
297   An implementation is not compliant if it fails to satisfy one or more
298   of the "MUST" or "REQUIRED" level requirements for the protocols it
299   implements. An implementation that satisfies all the "MUST" or "REQUIRED"
300   level and all the "SHOULD" level requirements for its protocols is said
301   to be "unconditionally compliant"; one that satisfies all the "MUST"
302   level requirements but not all the "SHOULD" level requirements for its
303   protocols is said to be "conditionally compliant".
307<section title="Syntax Notation" anchor="notation">
308<iref primary="true" item="Grammar" subitem="ALPHA"/>
309<iref primary="true" item="Grammar" subitem="CR"/>
310<iref primary="true" item="Grammar" subitem="CRLF"/>
311<iref primary="true" item="Grammar" subitem="CTL"/>
312<iref primary="true" item="Grammar" subitem="DIGIT"/>
313<iref primary="true" item="Grammar" subitem="DQUOTE"/>
314<iref primary="true" item="Grammar" subitem="HEXDIG"/>
315<iref primary="true" item="Grammar" subitem="LF"/>
316<iref primary="true" item="Grammar" subitem="OCTET"/>
317<iref primary="true" item="Grammar" subitem="SP"/>
318<iref primary="true" item="Grammar" subitem="VCHAR"/>
319<iref primary="true" item="Grammar" subitem="WSP"/>
321   This specification uses the Augmented Backus-Naur Form (ABNF) notation
322   of <xref target="RFC5234"/>.
324<t anchor="core.rules">
325  <x:anchor-alias value="ALPHA"/>
326  <x:anchor-alias value="CTL"/>
327  <x:anchor-alias value="CR"/>
328  <x:anchor-alias value="CRLF"/>
329  <x:anchor-alias value="DIGIT"/>
330  <x:anchor-alias value="DQUOTE"/>
331  <x:anchor-alias value="HEXDIG"/>
332  <x:anchor-alias value="LF"/>
333  <x:anchor-alias value="OCTET"/>
334  <x:anchor-alias value="SP"/>
335  <x:anchor-alias value="VCHAR"/>
336  <x:anchor-alias value="WSP"/>
337   The following core rules are included by
338   reference, as defined in <xref target="RFC5234" x:fmt="," x:sec="B.1"/>:
339   ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls),
340   DIGIT (decimal 0-9), DQUOTE (double quote),
341   HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed),
342   OCTET (any 8-bit sequence of data), SP (space),
343   VCHAR (any visible <xref target="USASCII"/> character),
344   and WSP (whitespace).
347   As a syntactic convention, ABNF rule names prefixed with "obs-" denote
348   "obsolete" grammar rules that appear for historical reasons.
351<section title="ABNF Extension: #rule" anchor="notation.abnf">
353  The #rule extension to the ABNF rules of <xref target="RFC5234"/> is used to
354  improve readability.
357  A construct "#" is defined, similar to "*", for defining comma-delimited
358  lists of elements. The full form is "&lt;n&gt;#&lt;m&gt;element" indicating
359  at least &lt;n&gt; and at most &lt;m&gt; elements, each separated by a single
360  comma (",") and optional whitespace (OWS,
361  <xref target="basic.rules"/>).   
364  Thus,
365</preamble><artwork type="example">
366  1#element =&gt; element *( OWS "," OWS element )
369  and:
370</preamble><artwork type="example">
371  #element =&gt; [ 1#element ]
374  and for n &gt;= 1 and m &gt; 1:
375</preamble><artwork type="example">
376  &lt;n&gt;#&lt;m&gt;element =&gt; element &lt;n-1&gt;*&lt;m-1&gt;( OWS "," OWS element )
379  For compatibility with legacy list rules, recipients &SHOULD; accept empty
380  list elements. In other words, consumers would follow the list productions:
382<figure><artwork type="example">
383  #element =&gt; [ ( "," / element ) *( OWS "," [ OWS element ] ) ]
385  1#element =&gt; *( "," OWS ) element *( OWS "," [ OWS element ] )
388  Note that empty elements do not contribute to the count of elements present,
389  though.
392  For example, given these ABNF productions:
394<figure><artwork type="example">
395  example-list      = 1#example-list-elmt
396  example-list-elmt = token ; see <xref target="basic.rules"/>
399  Then these are valid values for example-list (not including the double
400  quotes, which are present for delimitation only):
402<figure><artwork type="example">
403  "foo,bar"
404  " foo ,bar,"
405  "  foo , ,bar,charlie   "
406  "foo ,bar,   charlie "
409  But these values would be invalid, as at least one non-empty element is
410  required:
412<figure><artwork type="example">
413  ""
414  ","
415  ",   ,"
418  <xref target="collected.abnf"/> shows the collected ABNF, with the list rules
419  expanded as explained above.
423<section title="Basic Rules" anchor="basic.rules">
424<t anchor="rule.CRLF">
425  <x:anchor-alias value="CRLF"/>
426   HTTP/1.1 defines the sequence CR LF as the end-of-line marker for all
427   protocol elements other than the message-body
428   (see <xref target="tolerant.applications"/> for tolerant applications).
430<t anchor="rule.LWS">
431   This specification uses three rules to denote the use of linear
432   whitespace: OWS (optional whitespace), RWS (required whitespace), and
433   BWS ("bad" whitespace).
436   The OWS rule is used where zero or more linear whitespace octets might
437   appear. OWS &SHOULD; either not be produced or be produced as a single
438   SP. Multiple OWS octets that occur within field-content &SHOULD;
439   be replaced with a single SP before interpreting the field value or
440   forwarding the message downstream.
443   RWS is used when at least one linear whitespace octet is required to
444   separate field tokens. RWS &SHOULD; be produced as a single SP.
445   Multiple RWS octets that occur within field-content &SHOULD; be
446   replaced with a single SP before interpreting the field value or
447   forwarding the message downstream.
450   BWS is used where the grammar allows optional whitespace for historical
451   reasons but senders &SHOULD-NOT; produce it in messages. HTTP/1.1
452   recipients &MUST; accept such bad optional whitespace and remove it before
453   interpreting the field value or forwarding the message downstream.
455<t anchor="rule.whitespace">
456  <x:anchor-alias value="BWS"/>
457  <x:anchor-alias value="OWS"/>
458  <x:anchor-alias value="RWS"/>
459  <x:anchor-alias value="obs-fold"/>
461<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="OWS"/><iref primary="true" item="Grammar" subitem="RWS"/><iref primary="true" item="Grammar" subitem="BWS"/>
462  <x:ref>OWS</x:ref>            = *( [ obs-fold ] <x:ref>WSP</x:ref> )
463                 ; "optional" whitespace
464  <x:ref>RWS</x:ref>            = 1*( [ obs-fold ] <x:ref>WSP</x:ref> )
465                 ; "required" whitespace
466  <x:ref>BWS</x:ref>            = <x:ref>OWS</x:ref>
467                 ; "bad" whitespace
468  <x:ref>obs-fold</x:ref>       = <x:ref>CRLF</x:ref>
469                 ; see <xref target="header.fields"/>
471<t anchor="rule.token.separators">
472  <x:anchor-alias value="tchar"/>
473  <x:anchor-alias value="token"/>
474  <x:anchor-alias value="special"/>
475  <x:anchor-alias value="word"/>
476   Many HTTP/1.1 header field values consist of words (token or quoted-string)
477   separated by whitespace or special characters. These special characters
478   &MUST; be in a quoted string to be used within a parameter value (as defined
479   in <xref target="transfer.codings"/>).
481<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="word"/><iref primary="true" item="Grammar" subitem="token"/><iref primary="true" item="Grammar" subitem="tchar"/><iref primary="true" item="Grammar" subitem="special"/>
482  <x:ref>word</x:ref>           = <x:ref>token</x:ref> / <x:ref>quoted-string</x:ref>
484  <x:ref>token</x:ref>          = 1*<x:ref>tchar</x:ref>
486  IMPORTANT: when editing "tchar" make sure that "special" is updated accordingly!!!
487 -->
488  <x:ref>tchar</x:ref>          = "!" / "#" / "$" / "%" / "&amp;" / "'" / "*"
489                 / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
490                 / <x:ref>DIGIT</x:ref> / <x:ref>ALPHA</x:ref>
491                 ; any <x:ref>VCHAR</x:ref>, except <x:ref>special</x:ref>
493  <x:ref>special</x:ref>        = "(" / ")" / "&lt;" / ">" / "@" / ","
494                 / ";" / ":" / "\" / DQUOTE / "/" / "["
495                 / "]" / "?" / "=" / "{" / "}"
497<t anchor="rule.quoted-string">
498  <x:anchor-alias value="quoted-string"/>
499  <x:anchor-alias value="qdtext"/>
500  <x:anchor-alias value="obs-text"/>
501   A string of text is parsed as a single word if it is quoted using
502   double-quote marks.
504<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="quoted-string"/><iref primary="true" item="Grammar" subitem="qdtext"/><iref primary="true" item="Grammar" subitem="obs-text"/>
505  <x:ref>quoted-string</x:ref>  = <x:ref>DQUOTE</x:ref> *( <x:ref>qdtext</x:ref> / <x:ref>quoted-pair</x:ref> ) <x:ref>DQUOTE</x:ref>
506  <x:ref>qdtext</x:ref>         = <x:ref>OWS</x:ref> / %x21 / %x23-5B / %x5D-7E / <x:ref>obs-text</x:ref>
507                 ; <x:ref>OWS</x:ref> / &lt;<x:ref>VCHAR</x:ref> except <x:ref>DQUOTE</x:ref> and "\"&gt; / <x:ref>obs-text</x:ref>
508  <x:ref>obs-text</x:ref>       = %x80-FF
510<t anchor="rule.quoted-pair">
511  <x:anchor-alias value="quoted-pair"/>
512   The backslash octet ("\") can be used as a single-octet
513   quoting mechanism within quoted-string constructs:
515<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="quoted-pair"/>
516  <x:ref>quoted-pair</x:ref>    = "\" ( <x:ref>WSP</x:ref> / <x:ref>VCHAR</x:ref> / <x:ref>obs-text</x:ref> )
519   Recipients that process the value of the quoted-string &MUST; handle a
520   quoted-pair as if it were replaced by the octet following the backslash.
523   Senders &SHOULD-NOT; escape octets that do not require escaping
524   (i.e., other than DQUOTE and the backslash octet).
531<section title="HTTP-related architecture" anchor="architecture">
533   HTTP was created for the World Wide Web architecture
534   and has evolved over time to support the scalability needs of a worldwide
535   hypertext system. Much of that architecture is reflected in the terminology
536   and syntax productions used to define HTTP.
539<section title="Client/Server Messaging" anchor="operation">
540<iref primary="true" item="client"/>
541<iref primary="true" item="server"/>
542<iref primary="true" item="connection"/>
544   HTTP is a stateless request/response protocol that operates by exchanging
545   messages across a reliable transport or session-layer
546   "<x:dfn>connection</x:dfn>". An HTTP "<x:dfn>client</x:dfn>" is a
547   program that establishes a connection to a server for the purpose of
548   sending one or more HTTP requests.  An HTTP "<x:dfn>server</x:dfn>" is a
549   program that accepts connections in order to service HTTP requests by
550   sending HTTP responses.
552<iref primary="true" item="user agent"/>
553<iref primary="true" item="origin server"/>
554<iref primary="true" item="browser"/>
555<iref primary="true" item="spider"/>
556<iref primary="true" item="sender"/>
557<iref primary="true" item="recipient"/>
559   Note that the terms client and server refer only to the roles that
560   these programs perform for a particular connection.  The same program
561   might act as a client on some connections and a server on others.  We use
562   the term "<x:dfn>user agent</x:dfn>" to refer to the program that initiates a request,
563   such as a WWW browser, editor, or spider (web-traversing robot), and
564   the term "<x:dfn>origin server</x:dfn>" to refer to the program that can originate
565   authoritative responses to a request.  For general requirements, we use
566   the term "<x:dfn>sender</x:dfn>" to refer to whichever component sent a given message
567   and the term "<x:dfn>recipient</x:dfn>" to refer to any component that receives the
568   message.
571   Most HTTP communication consists of a retrieval request (GET) for
572   a representation of some resource identified by a URI.  In the
573   simplest case, this might be accomplished via a single bidirectional
574   connection (===) between the user agent (UA) and the origin server (O).
576<figure><artwork type="drawing">
577         request   &gt;
578    UA ======================================= O
579                                &lt;   response
581<iref primary="true" item="message"/>
582<iref primary="true" item="request"/>
583<iref primary="true" item="response"/>
585   A client sends an HTTP request to the server in the form of a <x:dfn>request</x:dfn>
586   <x:dfn>message</x:dfn> (<xref target="request"/>), beginning with a method, URI, and
587   protocol version, followed by MIME-like header fields containing
588   request modifiers, client information, and payload metadata, an empty
589   line to indicate the end of the header section, and finally the payload
590   body (if any).
593   A server responds to the client's request by sending an HTTP <x:dfn>response</x:dfn>
594   <x:dfn>message</x:dfn> (<xref target="response"/>), beginning with a status line that
595   includes the protocol version, a success or error code, and textual
596   reason phrase, followed by MIME-like header fields containing server
597   information, resource metadata, and payload metadata, an empty line to
598   indicate the end of the header section, and finally the payload body (if any).
601   The following example illustrates a typical message exchange for a
602   GET request on the URI "":
605client request:
606</preamble><artwork type="message/http; msgtype=&#34;request&#34;" x:indent-with="  ">
607GET /hello.txt HTTP/1.1
608User-Agent: curl/7.16.3 libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3
610Accept: */*
614server response:
615</preamble><artwork type="message/http; msgtype=&#34;response&#34;" x:indent-with="  ">
616HTTP/1.1 200 OK
617Date: Mon, 27 Jul 2009 12:28:53 GMT
618Server: Apache
619Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT
620ETag: "34aa387-d-1568eb00"
621Accept-Ranges: bytes
622Content-Length: <x:length-of target="exbody"/>
623Vary: Accept-Encoding
624Content-Type: text/plain
626<x:span anchor="exbody">Hello World!
630<section title="Message Orientation and Buffering" anchor="message-orientation-and-buffering">
632   Fundamentally, HTTP is a message-based protocol. Although message bodies can
633   be chunked (<xref target="chunked.encoding"/>) and implementations often
634   make parts of a message available progressively, this is not required, and
635   some widely-used implementations only make a message available when it is
636   complete. Furthermore, while most proxies will progressively stream messages,
637   some amount of buffering will take place, and some proxies might buffer
638   messages to perform transformations, check content or provide other services.
641   Therefore, extensions to and uses of HTTP cannot rely on the availability of
642   a partial message, or assume that messages will not be buffered. There are
643   strategies that can be used to test for buffering in a given connection, but
644   it should be understood that behaviors can differ across connections, and
645   between requests and responses.
648   Recipients &MUST; consider every message in a connection in isolation;
649   because HTTP is a stateless protocol, it cannot be assumed that two requests
650   on the same connection are from the same client or share any other common
651   attributes. In particular, intermediaries might mix requests from different
652   clients into a single server connection. Note that some existing HTTP
653   extensions (e.g., <xref target="RFC4559"/>) violate this requirement, thereby
654   potentially causing interoperability and security problems.
658<section title="Connections and Transport Independence" anchor="transport-independence">
660   HTTP messaging is independent of the underlying transport or
661   session-layer connection protocol(s).  HTTP only presumes a reliable
662   transport with in-order delivery of requests and the corresponding
663   in-order delivery of responses.  The mapping of HTTP request and
664   response structures onto the data units of the underlying transport
665   protocol is outside the scope of this specification.
668   The specific connection protocols to be used for an interaction
669   are determined by client configuration and the target resource's URI.
670   For example, the "http" URI scheme
671   (<xref target="http.uri"/>) indicates a default connection of TCP
672   over IP, with a default TCP port of 80, but the client might be
673   configured to use a proxy via some other connection port or protocol
674   instead of using the defaults.
677   A connection might be used for multiple HTTP request/response exchanges,
678   as defined in <xref target="persistent.connections"/>.
682<section title="Intermediaries" anchor="intermediaries">
683<iref primary="true" item="intermediary"/>
685   HTTP enables the use of intermediaries to satisfy requests through
686   a chain of connections.  There are three common forms of HTTP
687   <x:dfn>intermediary</x:dfn>: proxy, gateway, and tunnel.  In some cases,
688   a single intermediary might act as an origin server, proxy, gateway,
689   or tunnel, switching behavior based on the nature of each request.
691<figure><artwork type="drawing">
692         &gt;             &gt;             &gt;             &gt;
693    <x:highlight>UA</x:highlight> =========== <x:highlight>A</x:highlight> =========== <x:highlight>B</x:highlight> =========== <x:highlight>C</x:highlight> =========== <x:highlight>O</x:highlight>
694               &lt;             &lt;             &lt;             &lt;
697   The figure above shows three intermediaries (A, B, and C) between the
698   user agent and origin server. A request or response message that
699   travels the whole chain will pass through four separate connections.
700   Some HTTP communication options
701   might apply only to the connection with the nearest, non-tunnel
702   neighbor, only to the end-points of the chain, or to all connections
703   along the chain. Although the diagram is linear, each participant might
704   be engaged in multiple, simultaneous communications. For example, B
705   might be receiving requests from many clients other than A, and/or
706   forwarding requests to servers other than C, at the same time that it
707   is handling A's request.
710<iref primary="true" item="upstream"/><iref primary="true" item="downstream"/>
711<iref primary="true" item="inbound"/><iref primary="true" item="outbound"/>
712   We use the terms "<x:dfn>upstream</x:dfn>" and "<x:dfn>downstream</x:dfn>"
713   to describe various requirements in relation to the directional flow of a
714   message: all messages flow from upstream to downstream.
715   Likewise, we use the terms inbound and outbound to refer to
716   directions in relation to the request path:
717   "<x:dfn>inbound</x:dfn>" means toward the origin server and
718   "<x:dfn>outbound</x:dfn>" means toward the user agent.
720<t><iref primary="true" item="proxy"/>
721   A "<x:dfn>proxy</x:dfn>" is a message forwarding agent that is selected by the
722   client, usually via local configuration rules, to receive requests
723   for some type(s) of absolute URI and attempt to satisfy those
724   requests via translation through the HTTP interface.  Some translations
725   are minimal, such as for proxy requests for "http" URIs, whereas
726   other requests might require translation to and from entirely different
727   application-layer protocols. Proxies are often used to group an
728   organization's HTTP requests through a common intermediary for the
729   sake of security, annotation services, or shared caching.
732<iref primary="true" item="transforming proxy"/>
733<iref primary="true" item="non-transforming proxy"/>
734   An HTTP-to-HTTP proxy is called a "<x:dfn>transforming proxy</x:dfn>" if it is designed
735   or configured to modify request or response messages in a semantically
736   meaningful way (i.e., modifications, beyond those required by normal
737   HTTP processing, that change the message in a way that would be
738   significant to the original sender or potentially significant to
739   downstream recipients).  For example, a transforming proxy might be
740   acting as a shared annotation server (modifying responses to include
741   references to a local annotation database), a malware filter, a
742   format transcoder, or an intranet-to-Internet privacy filter.  Such
743   transformations are presumed to be desired by the client (or client
744   organization) that selected the proxy and are beyond the scope of
745   this specification.  However, when a proxy is not intended to transform
746   a given message, we use the term "<x:dfn>non-transforming proxy</x:dfn>" to target
747   requirements that preserve HTTP message semantics. See &status-203; and
748   &header-warning; for status and warning codes related to transformations.
750<t><iref primary="true" item="gateway"/><iref primary="true" item="reverse proxy"/>
751<iref primary="true" item="accelerator"/>
752   A "<x:dfn>gateway</x:dfn>" (a.k.a., "<x:dfn>reverse proxy</x:dfn>")
753   is a receiving agent that acts
754   as a layer above some other server(s) and translates the received
755   requests to the underlying server's protocol.  Gateways are often
756   used to encapsulate legacy or untrusted information services, to
757   improve server performance through "<x:dfn>accelerator</x:dfn>" caching, and to
758   enable partitioning or load-balancing of HTTP services across
759   multiple machines.
762   A gateway behaves as an origin server on its outbound connection and
763   as a user agent on its inbound connection.
764   All HTTP requirements applicable to an origin server
765   also apply to the outbound communication of a gateway.
766   A gateway communicates with inbound servers using any protocol that
767   it desires, including private extensions to HTTP that are outside
768   the scope of this specification.  However, an HTTP-to-HTTP gateway
769   that wishes to interoperate with third-party HTTP servers &MUST;
770   comply with HTTP user agent requirements on the gateway's inbound
771   connection and &MUST; implement the Connection
772   (<xref target="header.connection"/>) and Via (<xref target="header.via"/>)
773   header fields for both connections.
775<t><iref primary="true" item="tunnel"/>
776   A "<x:dfn>tunnel</x:dfn>" acts as a blind relay between two connections
777   without changing the messages. Once active, a tunnel is not
778   considered a party to the HTTP communication, though the tunnel might
779   have been initiated by an HTTP request. A tunnel ceases to exist when
780   both ends of the relayed connection are closed. Tunnels are used to
781   extend a virtual connection through an intermediary, such as when
782   transport-layer security is used to establish private communication
783   through a shared firewall proxy.
785<t><iref primary="true" item="interception proxy"/><iref primary="true" item="transparent proxy"/>
786<iref primary="true" item="captive portal"/>
787   In addition, there may exist network intermediaries that are not
788   considered part of the HTTP communication but nevertheless act as
789   filters or redirecting agents (usually violating HTTP semantics,
790   causing security problems, and otherwise making a mess of things).
791   Such a network intermediary, often referred to as an "<x:dfn>interception proxy</x:dfn>"
792   <xref target="RFC3040"/>, "<x:dfn>transparent proxy</x:dfn>" <xref target="RFC1919"/>,
793   or "<x:dfn>captive portal</x:dfn>",
794   differs from an HTTP proxy because it has not been selected by the client.
795   Instead, the network intermediary redirects outgoing TCP port 80 packets
796   (and occasionally other common port traffic) to an internal HTTP server.
797   Interception proxies are commonly found on public network access points,
798   as a means of enforcing account subscription prior to allowing use of
799   non-local Internet services, and within corporate firewalls to enforce
800   network usage policies.
801   They are indistinguishable from a man-in-the-middle attack.
805<section title="Caches" anchor="caches">
806<iref primary="true" item="cache"/>
808   A "<x:dfn>cache</x:dfn>" is a local store of previous response messages and the
809   subsystem that controls its message storage, retrieval, and deletion.
810   A cache stores cacheable responses in order to reduce the response
811   time and network bandwidth consumption on future, equivalent
812   requests. Any client or server &MAY; employ a cache, though a cache
813   cannot be used by a server while it is acting as a tunnel.
816   The effect of a cache is that the request/response chain is shortened
817   if one of the participants along the chain has a cached response
818   applicable to that request. The following illustrates the resulting
819   chain if B has a cached copy of an earlier response from O (via C)
820   for a request which has not been cached by UA or A.
822<figure><artwork type="drawing">
823            &gt;             &gt;
824       UA =========== A =========== B - - - - - - C - - - - - - O
825                  &lt;             &lt;
827<t><iref primary="true" item="cacheable"/>
828   A response is "<x:dfn>cacheable</x:dfn>" if a cache is allowed to store a copy of
829   the response message for use in answering subsequent requests.
830   Even when a response is cacheable, there might be additional
831   constraints placed by the client or by the origin server on when
832   that cached response can be used for a particular request. HTTP
833   requirements for cache behavior and cacheable responses are
834   defined in &caching-overview;. 
837   There are a wide variety of architectures and configurations
838   of caches and proxies deployed across the World Wide Web and
839   inside large organizations. These systems include national hierarchies
840   of proxy caches to save transoceanic bandwidth, systems that
841   broadcast or multicast cache entries, organizations that distribute
842   subsets of cached data via optical media, and so on.
846<section title="Protocol Versioning" anchor="http.version">
847  <x:anchor-alias value="HTTP-Version"/>
848  <x:anchor-alias value="HTTP-Prot-Name"/>
850   HTTP uses a "&lt;major&gt;.&lt;minor&gt;" numbering scheme to indicate
851   versions of the protocol. This specification defines version "1.1".
852   The protocol version as a whole indicates the sender's compliance
853   with the set of requirements laid out in that version's corresponding
854   specification of HTTP.
857   The version of an HTTP message is indicated by an HTTP-Version field
858   in the first line of the message. HTTP-Version is case-sensitive.
860<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="HTTP-Version"/><iref primary="true" item="Grammar" subitem="HTTP-Prot-Name"/>
861  <x:ref>HTTP-Version</x:ref>   = <x:ref>HTTP-Prot-Name</x:ref> "/" <x:ref>DIGIT</x:ref> "." <x:ref>DIGIT</x:ref>
862  <x:ref>HTTP-Prot-Name</x:ref> = <x:abnf-char-sequence>"HTTP"</x:abnf-char-sequence> ; "HTTP", case-sensitive
865   The HTTP version number consists of two decimal digits separated by a "."
866   (period or decimal point).  The first digit ("major version") indicates the
867   HTTP messaging syntax, whereas the second digit ("minor version") indicates
868   the highest minor version to which the sender is at least conditionally
869   compliant and able to understand for future communication.  The minor
870   version advertises the sender's communication capabilities even when the
871   sender is only using a backwards-compatible subset of the protocol,
872   thereby letting the recipient know that more advanced features can
873   be used in response (by servers) or in future requests (by clients).
876   When an HTTP/1.1 message is sent to an HTTP/1.0 recipient
877   <xref target="RFC1945"/> or a recipient whose version is unknown,
878   the HTTP/1.1 message is constructed such that it can be interpreted
879   as a valid HTTP/1.0 message if all of the newer features are ignored.
880   This specification places recipient-version requirements on some
881   new features so that a compliant sender will only use compatible
882   features until it has determined, through configuration or the
883   receipt of a message, that the recipient supports HTTP/1.1.
886   The interpretation of an HTTP header field does not change
887   between minor versions of the same major version, though the default
888   behavior of a recipient in the absence of such a field can change.
889   Unless specified otherwise, header fields defined in HTTP/1.1 are
890   defined for all versions of HTTP/1.x.  In particular, the Host and
891   Connection header fields ought to be implemented by all HTTP/1.x
892   implementations whether or not they advertise compliance with HTTP/1.1.
895   New header fields can be defined such that, when they are
896   understood by a recipient, they might override or enhance the
897   interpretation of previously defined header fields.  When an
898   implementation receives an unrecognized header field, the recipient
899   &MUST; ignore that header field for local processing regardless of
900   the message's HTTP version.  An unrecognized header field received
901   by a proxy &MUST; be forwarded downstream unless the header field's
902   field-name is listed in the message's Connection header-field
903   (see <xref target="header.connection"/>).
904   These requirements allow HTTP's functionality to be enhanced without
905   requiring prior update of all compliant intermediaries.
908   Intermediaries that process HTTP messages (i.e., all intermediaries
909   other than those acting as a tunnel) &MUST; send their own HTTP-Version
910   in forwarded messages.  In other words, they &MUST-NOT; blindly
911   forward the first line of an HTTP message without ensuring that the
912   protocol version matches what the intermediary understands, and
913   is at least conditionally compliant to, for both the receiving and
914   sending of messages.  Forwarding an HTTP message without rewriting
915   the HTTP-Version might result in communication errors when downstream
916   recipients use the message sender's version to determine what features
917   are safe to use for later communication with that sender.
920   An HTTP client &SHOULD; send a request version equal to the highest
921   version for which the client is at least conditionally compliant and
922   whose major version is no higher than the highest version supported
923   by the server, if this is known.  An HTTP client &MUST-NOT; send a
924   version for which it is not at least conditionally compliant.
927   An HTTP client &MAY; send a lower request version if it is known that
928   the server incorrectly implements the HTTP specification, but only
929   after the client has attempted at least one normal request and determined
930   from the response status or header fields (e.g., Server) that the
931   server improperly handles higher request versions.
934   An HTTP server &SHOULD; send a response version equal to the highest
935   version for which the server is at least conditionally compliant and
936   whose major version is less than or equal to the one received in the
937   request.  An HTTP server &MUST-NOT; send a version for which it is not
938   at least conditionally compliant.  A server &MAY; send a 505 (HTTP
939   Version Not Supported) response if it cannot send a response using the
940   major version used in the client's request.
943   An HTTP server &MAY; send an HTTP/1.0 response to an HTTP/1.0 request
944   if it is known or suspected that the client incorrectly implements the
945   HTTP specification and is incapable of correctly processing later
946   version responses, such as when a client fails to parse the version
947   number correctly or when an intermediary is known to blindly forward
948   the HTTP-Version even when it doesn't comply with the given minor
949   version of the protocol. Such protocol downgrades &SHOULD-NOT; be
950   performed unless triggered by specific client attributes, such as when
951   one or more of the request header fields (e.g., User-Agent) uniquely
952   match the values sent by a client known to be in error.
955   The intention of HTTP's versioning design is that the major number
956   will only be incremented if an incompatible message syntax is
957   introduced, and that the minor number will only be incremented when
958   changes made to the protocol have the effect of adding to the message
959   semantics or implying additional capabilities of the sender.  However,
960   the minor version was not incremented for the changes introduced between
961   <xref target="RFC2068"/> and <xref target="RFC2616"/>, and this revision
962   is specifically avoiding any such changes to the protocol.
966<section title="Uniform Resource Identifiers" anchor="uri">
967<iref primary="true" item="resource"/>
969   Uniform Resource Identifiers (URIs) <xref target="RFC3986"/> are used
970   throughout HTTP as the means for identifying resources. URI references
971   are used to target requests, indicate redirects, and define relationships.
972   HTTP does not limit what a resource might be; it merely defines an interface
973   that can be used to interact with a resource via HTTP. More information on
974   the scope of URIs and resources can be found in <xref target="RFC3986"/>.
976  <x:anchor-alias value="URI-reference"/>
977  <x:anchor-alias value="absolute-URI"/>
978  <x:anchor-alias value="relative-part"/>
979  <x:anchor-alias value="authority"/>
980  <x:anchor-alias value="path-abempty"/>
981  <x:anchor-alias value="path-absolute"/>
982  <x:anchor-alias value="port"/>
983  <x:anchor-alias value="query"/>
984  <x:anchor-alias value="uri-host"/>
985  <x:anchor-alias value="partial-URI"/>
987   This specification adopts the definitions of "URI-reference",
988   "absolute-URI", "relative-part", "port", "host",
989   "path-abempty", "path-absolute", "query", and "authority" from the
990   URI generic syntax <xref target="RFC3986"/>.
991   In addition, we define a partial-URI rule for protocol elements
992   that allow a relative URI but not a fragment.
994<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="URI-reference"/><iref primary="true" item="Grammar" subitem="absolute-URI"/><iref primary="true" item="Grammar" subitem="authority"/><iref primary="true" item="Grammar" subitem="path-absolute"/><iref primary="true" item="Grammar" subitem="port"/><iref primary="true" item="Grammar" subitem="query"/><iref primary="true" item="Grammar" subitem="uri-host"/>
995  <x:ref>URI-reference</x:ref> = &lt;URI-reference, defined in <xref target="RFC3986" x:fmt="," x:sec="4.1"/>&gt;
996  <x:ref>absolute-URI</x:ref>  = &lt;absolute-URI, defined in <xref target="RFC3986" x:fmt="," x:sec="4.3"/>&gt;
997  <x:ref>relative-part</x:ref> = &lt;relative-part, defined in <xref target="RFC3986" x:fmt="," x:sec="4.2"/>&gt;
998  <x:ref>authority</x:ref>     = &lt;authority, defined in <xref target="RFC3986" x:fmt="," x:sec="3.2"/>&gt;
999  <x:ref>path-abempty</x:ref>  = &lt;path-abempty, defined in <xref target="RFC3986" x:fmt="," x:sec="3.3"/>&gt;
1000  <x:ref>path-absolute</x:ref> = &lt;path-absolute, defined in <xref target="RFC3986" x:fmt="," x:sec="3.3"/>&gt;
1001  <x:ref>port</x:ref>          = &lt;port, defined in <xref target="RFC3986" x:fmt="," x:sec="3.2.3"/>&gt;
1002  <x:ref>query</x:ref>         = &lt;query, defined in <xref target="RFC3986" x:fmt="," x:sec="3.4"/>&gt;
1003  <x:ref>uri-host</x:ref>      = &lt;host, defined in <xref target="RFC3986" x:fmt="," x:sec="3.2.2"/>&gt;
1005  <x:ref>partial-URI</x:ref>   = relative-part [ "?" query ]
1008   Each protocol element in HTTP that allows a URI reference will indicate
1009   in its ABNF production whether the element allows any form of reference
1010   (URI-reference), only a URI in absolute form (absolute-URI), only the
1011   path and optional query components, or some combination of the above.
1012   Unless otherwise indicated, URI references are parsed relative to the
1013   effective request URI, which defines the default base URI for references
1014   in both the request and its corresponding response.
1017<section title="http URI scheme" anchor="http.uri">
1018  <x:anchor-alias value="http-URI"/>
1019  <iref item="http URI scheme" primary="true"/>
1020  <iref item="URI scheme" subitem="http" primary="true"/>
1022   The "http" URI scheme is hereby defined for the purpose of minting
1023   identifiers according to their association with the hierarchical
1024   namespace governed by a potential HTTP origin server listening for
1025   TCP connections on a given port.
1027<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="http-URI"/>
1028  <x:ref>http-URI</x:ref> = "http:" "//" <x:ref>authority</x:ref> <x:ref>path-abempty</x:ref> [ "?" <x:ref>query</x:ref> ]
1031   The HTTP origin server is identified by the generic syntax's
1032   <x:ref>authority</x:ref> component, which includes a host identifier
1033   and optional TCP port (<xref target="RFC3986" x:fmt="," x:sec="3.2.2"/>).
1034   The remainder of the URI, consisting of both the hierarchical path
1035   component and optional query component, serves as an identifier for
1036   a potential resource within that origin server's name space.
1039   If the host identifier is provided as an IP literal or IPv4 address,
1040   then the origin server is any listener on the indicated TCP port at
1041   that IP address. If host is a registered name, then that name is
1042   considered an indirect identifier and the recipient might use a name
1043   resolution service, such as DNS, to find the address of a listener
1044   for that host.
1045   The host &MUST-NOT; be empty; if an "http" URI is received with an
1046   empty host, then it &MUST; be rejected as invalid.
1047   If the port subcomponent is empty or not given, then TCP port 80 is
1048   assumed (the default reserved port for WWW services).
1051   Regardless of the form of host identifier, access to that host is not
1052   implied by the mere presence of its name or address. The host might or might
1053   not exist and, even when it does exist, might or might not be running an
1054   HTTP server or listening to the indicated port. The "http" URI scheme
1055   makes use of the delegated nature of Internet names and addresses to
1056   establish a naming authority (whatever entity has the ability to place
1057   an HTTP server at that Internet name or address) and allows that
1058   authority to determine which names are valid and how they might be used.
1061   When an "http" URI is used within a context that calls for access to the
1062   indicated resource, a client &MAY; attempt access by resolving
1063   the host to an IP address, establishing a TCP connection to that address
1064   on the indicated port, and sending an HTTP request message to the server
1065   containing the URI's identifying data as described in <xref target="request"/>.
1066   If the server responds to that request with a non-interim HTTP response
1067   message, as described in <xref target="response"/>, then that response
1068   is considered an authoritative answer to the client's request.
1071   Although HTTP is independent of the transport protocol, the "http"
1072   scheme is specific to TCP-based services because the name delegation
1073   process depends on TCP for establishing authority.
1074   An HTTP service based on some other underlying connection protocol
1075   would presumably be identified using a different URI scheme, just as
1076   the "https" scheme (below) is used for servers that require an SSL/TLS
1077   transport layer on a connection. Other protocols might also be used to
1078   provide access to "http" identified resources &mdash; it is only the
1079   authoritative interface used for mapping the namespace that is
1080   specific to TCP.
1083   The URI generic syntax for authority also includes a deprecated
1084   userinfo subcomponent (<xref target="RFC3986" x:fmt="," x:sec="3.2.1"/>)
1085   for including user authentication information in the URI.  Some
1086   implementations make use of the userinfo component for internal
1087   configuration of authentication information, such as within command
1088   invocation options, configuration files, or bookmark lists, even
1089   though such usage might expose a user identifier or password.
1090   Senders &MUST-NOT; include a userinfo subcomponent (and its "@"
1091   delimiter) when transmitting an "http" URI in a message.  Recipients
1092   of HTTP messages that contain a URI reference &SHOULD; parse for the
1093   existence of userinfo and treat its presence as an error, likely
1094   indicating that the deprecated subcomponent is being used to obscure
1095   the authority for the sake of phishing attacks.
1099<section title="https URI scheme" anchor="https.uri">
1100   <x:anchor-alias value="https-URI"/>
1101   <iref item="https URI scheme"/>
1102   <iref item="URI scheme" subitem="https"/>
1104   The "https" URI scheme is hereby defined for the purpose of minting
1105   identifiers according to their association with the hierarchical
1106   namespace governed by a potential HTTP origin server listening for
1107   SSL/TLS-secured connections on a given TCP port.
1110   All of the requirements listed above for the "http" scheme are also
1111   requirements for the "https" scheme, except that a default TCP port
1112   of 443 is assumed if the port subcomponent is empty or not given,
1113   and the TCP connection &MUST; be secured for privacy through the
1114   use of strong encryption prior to sending the first HTTP request.
1116<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="https-URI"/>
1117  <x:ref>https-URI</x:ref> = "https:" "//" <x:ref>authority</x:ref> <x:ref>path-abempty</x:ref> [ "?" <x:ref>query</x:ref> ]
1120   Unlike the "http" scheme, responses to "https" identified requests
1121   are never "public" and thus &MUST-NOT; be reused for shared caching.
1122   They can, however, be reused in a private cache if the message is
1123   cacheable by default in HTTP or specifically indicated as such by
1124   the Cache-Control header field (&header-cache-control;).
1127   Resources made available via the "https" scheme have no shared
1128   identity with the "http" scheme even if their resource identifiers
1129   indicate the same authority (the same host listening to the same
1130   TCP port).  They are distinct name spaces and are considered to be
1131   distinct origin servers.  However, an extension to HTTP that is
1132   defined to apply to entire host domains, such as the Cookie protocol
1133   <xref target="RFC6265"/>, can allow information
1134   set by one service to impact communication with other services
1135   within a matching group of host domains.
1138   The process for authoritative access to an "https" identified
1139   resource is defined in <xref target="RFC2818"/>.
1143<section title="http and https URI Normalization and Comparison" anchor="uri.comparison">
1145   Since the "http" and "https" schemes conform to the URI generic syntax,
1146   such URIs are normalized and compared according to the algorithm defined
1147   in <xref target="RFC3986" x:fmt="," x:sec="6"/>, using the defaults
1148   described above for each scheme.
1151   If the port is equal to the default port for a scheme, the normal
1152   form is to elide the port subcomponent. Likewise, an empty path
1153   component is equivalent to an absolute path of "/", so the normal
1154   form is to provide a path of "/" instead. The scheme and host
1155   are case-insensitive and normally provided in lowercase; all
1156   other components are compared in a case-sensitive manner.
1157   Characters other than those in the "reserved" set are equivalent
1158   to their percent-encoded octets (see <xref target="RFC3986"
1159   x:fmt="," x:sec="2.1"/>): the normal form is to not encode them.
1162   For example, the following three URIs are equivalent:
1164<figure><artwork type="example">
1173<section title="Message Format" anchor="http.message">
1174<x:anchor-alias value="generic-message"/>
1175<x:anchor-alias value="message.types"/>
1176<x:anchor-alias value="HTTP-message"/>
1177<x:anchor-alias value="start-line"/>
1178<iref item="header section"/>
1179<iref item="headers"/>
1180<iref item="header field"/>
1182   All HTTP/1.1 messages consist of a start-line followed by a sequence of
1183   octets in a format similar to the Internet Message Format
1184   <xref target="RFC5322"/>: zero or more header fields (collectively
1185   referred to as the "headers" or the "header section"), an empty line
1186   indicating the end of the header section, and an optional message-body.
1189   An HTTP message can either be a request from client to server or a
1190   response from server to client.  Syntactically, the two types of message
1191   differ only in the start-line, which is either a Request-Line (for requests)
1192   or a Status-Line (for responses), and in the algorithm for determining
1193   the length of the message-body (<xref target="message.body"/>).
1194   In theory, a client could receive requests and a server could receive
1195   responses, distinguishing them by their different start-line formats,
1196   but in practice servers are implemented to only expect a request
1197   (a response is interpreted as an unknown or invalid request method)
1198   and clients are implemented to only expect a response.
1200<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="HTTP-message"/>
1201  <x:ref>HTTP-message</x:ref>    = <x:ref>start-line</x:ref>
1202                    *( <x:ref>header-field</x:ref> <x:ref>CRLF</x:ref> )
1203                    <x:ref>CRLF</x:ref>
1204                    [ <x:ref>message-body</x:ref> ]
1205  <x:ref>start-line</x:ref>      = <x:ref>Request-Line</x:ref> / <x:ref>Status-Line</x:ref>
1208   Implementations &MUST-NOT; send whitespace between the start-line and
1209   the first header field. The presence of such whitespace in a request
1210   might be an attempt to trick a server into ignoring that field or
1211   processing the line after it as a new request, either of which might
1212   result in a security vulnerability if other implementations within
1213   the request chain interpret the same message differently.
1214   Likewise, the presence of such whitespace in a response might be
1215   ignored by some clients or cause others to cease parsing.
1218<section title="Message Parsing Robustness" anchor="message.robustness">
1220   In the interest of robustness, servers &SHOULD; ignore at least one
1221   empty line received where a Request-Line is expected. In other words, if
1222   the server is reading the protocol stream at the beginning of a
1223   message and receives a CRLF first, it &SHOULD; ignore the CRLF.
1226   Some old HTTP/1.0 client implementations send an extra CRLF
1227   after a POST request as a lame workaround for some early server
1228   applications that failed to read message-body content that was
1229   not terminated by a line-ending. An HTTP/1.1 client &MUST-NOT;
1230   preface or follow a request with an extra CRLF.  If terminating
1231   the request message-body with a line-ending is desired, then the
1232   client &MUST; include the terminating CRLF octets as part of the
1233   message-body length.
1236   When a server listening only for HTTP request messages, or processing
1237   what appears from the start-line to be an HTTP request message,
1238   receives a sequence of octets that does not match the HTTP-message
1239   grammar aside from the robustness exceptions listed above, the
1240   server &MUST; respond with an HTTP/1.1 400 (Bad Request) response. 
1243   The normal procedure for parsing an HTTP message is to read the
1244   start-line into a structure, read each header field into a hash
1245   table by field name until the empty line, and then use the parsed
1246   data to determine if a message-body is expected.  If a message-body
1247   has been indicated, then it is read as a stream until an amount
1248   of octets equal to the message-body length is read or the connection
1249   is closed.  Care must be taken to parse an HTTP message as a sequence
1250   of octets in an encoding that is a superset of US-ASCII.  Attempting
1251   to parse HTTP as a stream of Unicode characters in a character encoding
1252   like UTF-16 might introduce security flaws due to the differing ways
1253   that such parsers interpret invalid characters.
1256   HTTP allows the set of defined header fields to be extended without
1257   changing the protocol version (see <xref target="header.field.registration"/>).
1258   Unrecognized header fields &MUST; be forwarded by a proxy unless the
1259   proxy is specifically configured to block or otherwise transform such
1260   fields.  Unrecognized header fields &SHOULD; be ignored by other recipients.
1264<section title="Header Fields" anchor="header.fields">
1265  <x:anchor-alias value="header-field"/>
1266  <x:anchor-alias value="field-content"/>
1267  <x:anchor-alias value="field-name"/>
1268  <x:anchor-alias value="field-value"/>
1269  <x:anchor-alias value="OWS"/>
1271   Each HTTP header field consists of a case-insensitive field name
1272   followed by a colon (":"), optional whitespace, and the field value.
1274<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="header-field"/><iref primary="true" item="Grammar" subitem="field-name"/><iref primary="true" item="Grammar" subitem="field-value"/><iref primary="true" item="Grammar" subitem="field-content"/>
1275  <x:ref>header-field</x:ref>   = <x:ref>field-name</x:ref> ":" <x:ref>OWS</x:ref> [ <x:ref>field-value</x:ref> ] <x:ref>OWS</x:ref>
1276  <x:ref>field-name</x:ref>     = <x:ref>token</x:ref>
1277  <x:ref>field-value</x:ref>    = *( <x:ref>field-content</x:ref> / <x:ref>OWS</x:ref> )
1278  <x:ref>field-content</x:ref>  = *( <x:ref>WSP</x:ref> / <x:ref>VCHAR</x:ref> / <x:ref>obs-text</x:ref> )
1281   No whitespace is allowed between the header field name and colon. For
1282   security reasons, any request message received containing such whitespace
1283   &MUST; be rejected with a response code of 400 (Bad Request). A proxy
1284   &MUST; remove any such whitespace from a response message before
1285   forwarding the message downstream.
1288   A field value &MAY; be preceded by optional whitespace (OWS); a single SP is
1289   preferred. The field value does not include any leading or trailing white
1290   space: OWS occurring before the first non-whitespace octet of the
1291   field value or after the last non-whitespace octet of the field value
1292   is ignored and &SHOULD; be removed before further processing (as this does
1293   not change the meaning of the header field).
1296   The order in which header fields with differing field names are
1297   received is not significant. However, it is "good practice" to send
1298   header fields that contain control data first, such as Host on
1299   requests and Date on responses, so that implementations can decide
1300   when not to handle a message as early as possible.  A server &MUST;
1301   wait until the entire header section is received before interpreting
1302   a request message, since later header fields might include conditionals,
1303   authentication credentials, or deliberately misleading duplicate
1304   header fields that would impact request processing.
1307   Multiple header fields with the same field name &MUST-NOT; be
1308   sent in a message unless the entire field value for that
1309   header field is defined as a comma-separated list [i.e., #(values)].
1310   Multiple header fields with the same field name can be combined into
1311   one "field-name: field-value" pair, without changing the semantics of the
1312   message, by appending each subsequent field value to the combined
1313   field value in order, separated by a comma. The order in which
1314   header fields with the same field name are received is therefore
1315   significant to the interpretation of the combined field value;
1316   a proxy &MUST-NOT; change the order of these field values when
1317   forwarding a message.
1320  <t>
1321   <x:h>Note:</x:h> The "Set-Cookie" header field as implemented in
1322   practice can occur multiple times, but does not use the list syntax, and
1323   thus cannot be combined into a single line (<xref target="RFC6265"/>). (See Appendix A.2.3 of <xref target="Kri2001"/>
1324   for details.) Also note that the Set-Cookie2 header field specified in
1325   <xref target="RFC2965"/> does not share this problem.
1326  </t>
1329   Historically, HTTP header field values could be extended over multiple
1330   lines by preceding each extra line with at least one space or horizontal
1331   tab octet (line folding). This specification deprecates such line
1332   folding except within the message/http media type
1333   (<xref target=""/>).
1334   HTTP/1.1 senders &MUST-NOT; produce messages that include line folding
1335   (i.e., that contain any field-content that matches the obs-fold rule) unless
1336   the message is intended for packaging within the message/http media type.
1337   HTTP/1.1 recipients &SHOULD; accept line folding and replace any embedded
1338   obs-fold whitespace with a single SP prior to interpreting the field value
1339   or forwarding the message downstream.
1342   Historically, HTTP has allowed field content with text in the ISO-8859-1
1343   <xref target="ISO-8859-1"/> character encoding and supported other
1344   character sets only through use of <xref target="RFC2047"/> encoding.
1345   In practice, most HTTP header field values use only a subset of the
1346   US-ASCII character encoding <xref target="USASCII"/>. Newly defined
1347   header fields &SHOULD; limit their field values to US-ASCII octets.
1348   Recipients &SHOULD; treat other (obs-text) octets in field content as
1349   opaque data.
1351<t anchor="rule.comment">
1352  <x:anchor-alias value="comment"/>
1353  <x:anchor-alias value="ctext"/>
1354   Comments can be included in some HTTP header fields by surrounding
1355   the comment text with parentheses. Comments are only allowed in
1356   fields containing "comment" as part of their field value definition.
1358<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="comment"/><iref primary="true" item="Grammar" subitem="ctext"/>
1359  <x:ref>comment</x:ref>        = "(" *( <x:ref>ctext</x:ref> / <x:ref>quoted-cpair</x:ref> / <x:ref>comment</x:ref> ) ")"
1360  <x:ref>ctext</x:ref>          = <x:ref>OWS</x:ref> / %x21-27 / %x2A-5B / %x5D-7E / <x:ref>obs-text</x:ref>
1361                 ; <x:ref>OWS</x:ref> / &lt;<x:ref>VCHAR</x:ref> except "(", ")", and "\"&gt; / <x:ref>obs-text</x:ref>
1363<t anchor="rule.quoted-cpair">
1364  <x:anchor-alias value="quoted-cpair"/>
1365   The backslash octet ("\") can be used as a single-octet
1366   quoting mechanism within comment constructs:
1368<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="quoted-cpair"/>
1369  <x:ref>quoted-cpair</x:ref>    = "\" ( <x:ref>WSP</x:ref> / <x:ref>VCHAR</x:ref> / <x:ref>obs-text</x:ref> )
1372   Senders &SHOULD-NOT; escape octets that do not require escaping
1373   (i.e., other than the backslash octet "\" and the parentheses "(" and
1374   ")").
1377   HTTP does not place a pre-defined limit on the length of header fields,
1378   either in isolation or as a set. A server &MUST; be prepared to receive
1379   request header fields of unbounded length and respond with a 4xx status
1380   code if the received header field(s) would be longer than the server wishes
1381   to handle.
1384   A client that receives response headers that are longer than it wishes to
1385   handle can only treat it as a server error.
1388   Various ad-hoc limitations on header length are found in practice. It is
1389   &RECOMMENDED; that all HTTP senders and recipients support messages whose
1390   combined header fields have 4000 or more octets.
1394<section title="Message Body" anchor="message.body">
1395  <x:anchor-alias value="message-body"/>
1397   The message-body (if any) of an HTTP message is used to carry the
1398   payload body associated with the request or response.
1400<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="message-body"/>
1401  <x:ref>message-body</x:ref> = *OCTET
1404   The message-body differs from the payload body only when a transfer-coding
1405   has been applied, as indicated by the Transfer-Encoding header field
1406   (<xref target="header.transfer-encoding"/>).  If more than one
1407   Transfer-Encoding header field is present in a message, the multiple
1408   field-values &MUST; be combined into one field-value, according to the
1409   algorithm defined in <xref target="header.fields"/>, before determining
1410   the message-body length.
1413   When one or more transfer-codings are applied to a payload in order to
1414   form the message-body, the Transfer-Encoding header field &MUST; contain
1415   the list of transfer-codings applied. Transfer-Encoding is a property of
1416   the message, not of the payload, and thus &MAY; be added or removed by
1417   any implementation along the request/response chain under the constraints
1418   found in <xref target="transfer.codings"/>.
1421   If a message is received that has multiple Content-Length header fields
1422   (<xref target="header.content-length"/>) with field-values consisting
1423   of the same decimal value, or a single Content-Length header field with
1424   a field value containing a list of identical decimal values (e.g.,
1425   "Content-Length: 42, 42"), indicating that duplicate Content-Length
1426   header fields have been generated or combined by an upstream message
1427   processor, then the recipient &MUST; either reject the message as invalid
1428   or replace the duplicated field-values with a single valid Content-Length
1429   field containing that decimal value prior to determining the message-body
1430   length.
1433   The rules for when a message-body is allowed in a message differ for
1434   requests and responses.
1437   The presence of a message-body in a request is signaled by the
1438   inclusion of a Content-Length or Transfer-Encoding header field in
1439   the request's header fields, even if the request method does not
1440   define any use for a message-body.  This allows the request
1441   message framing algorithm to be independent of method semantics.
1444   For response messages, whether or not a message-body is included with
1445   a message is dependent on both the request method and the response
1446   status code (<xref target="status.code.and.reason.phrase"/>).
1447   Responses to the HEAD request method never include a message-body
1448   because the associated response header fields (e.g., Transfer-Encoding,
1449   Content-Length, etc.) only indicate what their values would have been
1450   if the request method had been GET.  All 1xx (Informational), 204 (No Content),
1451   and 304 (Not Modified) responses &MUST-NOT; include a message-body.
1452   All other responses do include a message-body, although the body
1453   &MAY; be of zero length.
1456   The length of the message-body is determined by one of the following
1457   (in order of precedence):
1460  <list style="numbers">
1461    <x:lt><t>
1462     Any response to a HEAD request and any response with a status
1463     code of 100-199, 204, or 304 is always terminated by the first
1464     empty line after the header fields, regardless of the header
1465     fields present in the message, and thus cannot contain a message-body.
1466    </t></x:lt>
1467    <x:lt><t>
1468     If a Transfer-Encoding header field is present
1469     and the "chunked" transfer-coding (<xref target="transfer.codings"/>)
1470     is the final encoding, the message-body length is determined by reading
1471     and decoding the chunked data until the transfer-coding indicates the
1472     data is complete.
1473    </t>
1474    <t>
1475     If a Transfer-Encoding header field is present in a response and the
1476     "chunked" transfer-coding is not the final encoding, the message-body
1477     length is determined by reading the connection until it is closed by
1478     the server.
1479     If a Transfer-Encoding header field is present in a request and the
1480     "chunked" transfer-coding is not the final encoding, the message-body
1481     length cannot be determined reliably; the server &MUST; respond with
1482     the 400 (Bad Request) status code and then close the connection.
1483    </t>
1484    <t>
1485     If a message is received with both a Transfer-Encoding header field
1486     and a Content-Length header field, the Transfer-Encoding overrides
1487     the Content-Length.
1488     Such a message might indicate an attempt to perform request or response
1489     smuggling (bypass of security-related checks on message routing or content)
1490     and thus ought to be handled as an error.  The provided Content-Length &MUST;
1491     be removed, prior to forwarding the message downstream, or replaced with
1492     the real message-body length after the transfer-coding is decoded.
1493    </t></x:lt>
1494    <x:lt><t>
1495     If a message is received without Transfer-Encoding and with either
1496     multiple Content-Length header fields having differing field-values or
1497     a single Content-Length header field having an invalid value, then the
1498     message framing is invalid and &MUST; be treated as an error to
1499     prevent request or response smuggling.
1500     If this is a request message, the server &MUST; respond with
1501     a 400 (Bad Request) status code and then close the connection.
1502     If this is a response message received by a proxy, the proxy
1503     &MUST; discard the received response, send a 502 (Bad Gateway)
1504     status code as its downstream response, and then close the connection.
1505     If this is a response message received by a user-agent, it &MUST; be
1506     treated as an error by discarding the message and closing the connection.
1507    </t></x:lt>
1508    <x:lt><t>
1509     If a valid Content-Length header field
1510     is present without Transfer-Encoding, its decimal value defines the
1511     message-body length in octets.  If the actual number of octets sent in
1512     the message is less than the indicated Content-Length, the recipient
1513     &MUST; consider the message to be incomplete and treat the connection
1514     as no longer usable.
1515     If the actual number of octets sent in the message is more than the indicated
1516     Content-Length, the recipient &MUST; only process the message-body up to the
1517     field value's number of octets; the remainder of the message &MUST; either
1518     be discarded or treated as the next message in a pipeline.  For the sake of
1519     robustness, a user-agent &MAY; attempt to detect and correct such an error
1520     in message framing if it is parsing the response to the last request on
1521     a connection and the connection has been closed by the server.
1522    </t></x:lt>
1523    <x:lt><t>
1524     If this is a request message and none of the above are true, then the
1525     message-body length is zero (no message-body is present).
1526    </t></x:lt>
1527    <x:lt><t>
1528     Otherwise, this is a response message without a declared message-body
1529     length, so the message-body length is determined by the number of octets
1530     received prior to the server closing the connection.
1531    </t></x:lt>
1532  </list>
1535   Since there is no way to distinguish a successfully completed,
1536   close-delimited message from a partially-received message interrupted
1537   by network failure, implementations &SHOULD; use encoding or
1538   length-delimited messages whenever possible.  The close-delimiting
1539   feature exists primarily for backwards compatibility with HTTP/1.0.
1542   A server &MAY; reject a request that contains a message-body but
1543   not a Content-Length by responding with 411 (Length Required).
1546   Unless a transfer-coding other than "chunked" has been applied,
1547   a client that sends a request containing a message-body &SHOULD;
1548   use a valid Content-Length header field if the message-body length
1549   is known in advance, rather than the "chunked" encoding, since some
1550   existing services respond to "chunked" with a 411 (Length Required)
1551   status code even though they understand the chunked encoding.  This
1552   is typically because such services are implemented via a gateway that
1553   requires a content-length in advance of being called and the server
1554   is unable or unwilling to buffer the entire request before processing.
1557   A client that sends a request containing a message-body &MUST; include a
1558   valid Content-Length header field if it does not know the server will
1559   handle HTTP/1.1 (or later) requests; such knowledge can be in the form
1560   of specific user configuration or by remembering the version of a prior
1561   received response.
1565<section anchor="incomplete.messages" title="Incomplete Messages">
1567   Request messages that are prematurely terminated, possibly due to a
1568   cancelled connection or a server-imposed time-out exception, &MUST;
1569   result in closure of the connection; sending an HTTP/1.1 error response
1570   prior to closing the connection is &OPTIONAL;.
1573   Response messages that are prematurely terminated, usually by closure
1574   of the connection prior to receiving the expected number of octets or by
1575   failure to decode a transfer-encoded message-body, &MUST; be recorded
1576   as incomplete.  A response that terminates in the middle of the header
1577   block (before the empty line is received) cannot be assumed to convey the
1578   full semantics of the response and &MUST-NOT; be stored by a cache.
1581   A message-body that uses the chunked transfer encoding is
1582   incomplete if the zero-sized chunk that terminates the encoding has not
1583   been received.  A message that uses a valid Content-Length is incomplete
1584   if the size of the message-body received (in octets) is less than the
1585   value given by Content-Length.  A response that has neither chunked
1586   transfer encoding nor Content-Length is terminated by closure of the
1587   connection, and thus is considered complete regardless of the number of
1588   message-body octets received, provided that the header block was received
1589   intact.
1592   A user agent &MUST-NOT; render an incomplete response message-body as if
1593   it were complete (i.e., some indication must be given to the user that an
1594   error occurred).  Cache requirements for incomplete responses are defined
1595   in &cache-incomplete;.
1598   A server &MUST; read the entire request message-body or close
1599   the connection after sending its response, since otherwise the
1600   remaining data on a persistent connection would be misinterpreted
1601   as the next request.  Likewise,
1602   a client &MUST; read the entire response message-body if it intends
1603   to reuse the same connection for a subsequent request.  Pipelining
1604   multiple requests on a connection is described in <xref target="pipelining"/>.
1608<section title="General Header Fields" anchor="general.header.fields">
1609  <x:anchor-alias value="general-header"/>
1611   There are a few header fields which have general applicability for
1612   both request and response messages, but which do not apply to the
1613   payload being transferred. These header fields apply only to the
1614   message being transmitted.
1616<texttable align="left">
1617  <ttcol>Header Field Name</ttcol>
1618  <ttcol>Defined in...</ttcol>
1620  <c>Connection</c> <c><xref target="header.connection"/></c>
1621  <c>Date</c> <c><xref target=""/></c>
1622  <c>Trailer</c> <c><xref target="header.trailer"/></c>
1623  <c>Transfer-Encoding</c> <c><xref target="header.transfer-encoding"/></c>
1624  <c>Upgrade</c> <c><xref target="header.upgrade"/></c>
1625  <c>Via</c> <c><xref target="header.via"/></c>
1630<section title="Request" anchor="request">
1631  <x:anchor-alias value="Request"/>
1633   A request message from a client to a server begins with a
1634   Request-Line, followed by zero or more header fields, an empty
1635   line signifying the end of the header block, and an optional
1636   message body.
1638<!--                 Host                      ; should be moved here eventually -->
1639<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Request"/>
1640  <x:ref>Request</x:ref>       = <x:ref>Request-Line</x:ref>              ; <xref target="request-line"/>
1641                  *( <x:ref>header-field</x:ref> <x:ref>CRLF</x:ref> )    ; <xref target="header.fields"/>
1642                  <x:ref>CRLF</x:ref>
1643                  [ <x:ref>message-body</x:ref> ]          ; <xref target="message.body"/>
1646<section title="Request-Line" anchor="request-line">
1647  <x:anchor-alias value="Request-Line"/>
1649   The Request-Line begins with a method token, followed by a single
1650   space (SP), the request-target, another single space (SP), the
1651   protocol version, and ending with CRLF.
1653<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Request-Line"/>
1654  <x:ref>Request-Line</x:ref>   = <x:ref>Method</x:ref> <x:ref>SP</x:ref> <x:ref>request-target</x:ref> <x:ref>SP</x:ref> <x:ref>HTTP-Version</x:ref> <x:ref>CRLF</x:ref>
1657<section title="Method" anchor="method">
1658  <x:anchor-alias value="Method"/>
1660   The Method token indicates the request method to be performed on the
1661   target resource. The request method is case-sensitive.
1663<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Method"/>
1664  <x:ref>Method</x:ref>         = <x:ref>token</x:ref>
1668<section title="request-target" anchor="request-target">
1669  <x:anchor-alias value="request-target"/>
1671   The request-target identifies the target resource upon which to apply
1672   the request.  In most cases, the user agent is provided a URI reference
1673   from which it determines an absolute URI for identifying the target
1674   resource.  When a request to the resource is initiated, all or part
1675   of that URI is used to construct the HTTP request-target.
1677<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="request-target"/>
1678  <x:ref>request-target</x:ref> = "*"
1679                 / <x:ref>absolute-URI</x:ref>
1680                 / ( <x:ref>path-absolute</x:ref> [ "?" <x:ref>query</x:ref> ] )
1681                 / <x:ref>authority</x:ref>
1684   The four options for request-target are dependent on the nature of the
1685   request.
1687<t><iref item="asterisk form (of request-target)"/>
1688   The asterisk "*" form of request-target, which &MUST-NOT; be used
1689   with any request method other than OPTIONS, means that the request
1690   applies to the server as a whole (the listening process) rather than
1691   to a specific named resource at that server.  For example,
1693<figure><artwork type="message/http; msgtype=&#34;request&#34;" x:indent-with="  ">
1694OPTIONS * HTTP/1.1
1696<t><iref item="absolute-URI form (of request-target)"/>
1697   The "absolute-URI" form is &REQUIRED; when the request is being made to a
1698   proxy. The proxy is requested to either forward the request or service it
1699   from a valid cache, and then return the response. Note that the proxy &MAY;
1700   forward the request on to another proxy or directly to the server
1701   specified by the absolute-URI. In order to avoid request loops, a
1702   proxy that forwards requests to other proxies &MUST; be able to
1703   recognize and exclude all of its own server names, including
1704   any aliases, local variations, and the numeric IP address. An example
1705   Request-Line would be:
1707<figure><artwork type="message/http; msgtype=&#34;request&#34;" x:indent-with="  ">
1708GET HTTP/1.1
1711   To allow for transition to absolute-URIs in all requests in future
1712   versions of HTTP, all HTTP/1.1 servers &MUST; accept the absolute-URI
1713   form in requests, even though HTTP/1.1 clients will only generate
1714   them in requests to proxies.
1717   If a proxy receives a host name that is not a fully qualified domain
1718   name, it &MAY; add its domain to the host name it received. If a proxy
1719   receives a fully qualified domain name, the proxy &MUST-NOT; change
1720   the host name.
1722<t><iref item="authority form (of request-target)"/>
1723   The "authority form" is only used by the CONNECT request method (&CONNECT;).
1725<t><iref item="origin form (of request-target)"/>
1726   The most common form of request-target is that used when making
1727   a request to an origin server ("origin form").
1728   In this case, the absolute path and query components of the URI
1729   &MUST; be transmitted as the request-target, and the authority component
1730   &MUST; be transmitted in a Host header field. For example, a client wishing
1731   to retrieve a representation of the resource, as identified above,
1732   directly from the origin server would open (or reuse) a TCP connection
1733   to port 80 of the host "" and send the lines:
1735<figure><artwork type="message/http; msgtype=&#34;request&#34;" x:indent-with="  ">
1736GET /pub/WWW/TheProject.html HTTP/1.1
1740   followed by the remainder of the Request. Note that the origin form
1741   of request-target always starts with an absolute path; if the target
1742   resource's URI path is empty, then an absolute path of "/" &MUST; be
1743   provided in the request-target.
1746   If a proxy receives an OPTIONS request with an absolute-URI form of
1747   request-target in which the URI has an empty path and no query component,
1748   then the last proxy on the request chain &MUST; use a request-target
1749   of "*" when it forwards the request to the indicated origin server.
1752   For example, the request
1753</preamble><artwork type="message/http; msgtype=&#34;request&#34;" x:indent-with="  ">
1757  would be forwarded by the final proxy as
1758</preamble><artwork type="message/http; msgtype=&#34;request&#34;" x:indent-with="  ">
1759OPTIONS * HTTP/1.1
1763   after connecting to port 8001 of host "".
1767   The request-target is transmitted in the format specified in
1768   <xref target="http.uri"/>. If the request-target is percent-encoded
1769   (<xref target="RFC3986" x:fmt="," x:sec="2.1"/>), the origin server
1770   &MUST; decode the request-target in order to
1771   properly interpret the request. Servers &SHOULD; respond to invalid
1772   request-targets with an appropriate status code.
1775   A non-transforming proxy &MUST-NOT; rewrite the "path-absolute" part of the
1776   received request-target when forwarding it to the next inbound server,
1777   except as noted above to replace a null path-absolute with "/" or "*".
1780  <t>
1781    <x:h>Note:</x:h> The "no rewrite" rule prevents the proxy from changing the
1782    meaning of the request when the origin server is improperly using
1783    a non-reserved URI character for a reserved purpose.  Implementors
1784    need to be aware that some pre-HTTP/1.1 proxies have been known to
1785    rewrite the request-target.
1786  </t>
1789   HTTP does not place a pre-defined limit on the length of a request-target.
1790   A server &MUST; be prepared to receive URIs of unbounded length and
1791   respond with the 414 (URI Too Long) status code if the received
1792   request-target would be longer than the server wishes to handle
1793   (see &status-414;).
1796   Various ad-hoc limitations on request-target length are found in practice.
1797   It is &RECOMMENDED; that all HTTP senders and recipients support
1798   request-target lengths of 8000 or more octets.
1801  <t>
1802    <x:h>Note:</x:h> Fragments (<xref target="RFC3986" x:fmt="," x:sec="3.5"/>)
1803    are not part of the request-target and thus will not be transmitted
1804    in an HTTP request.
1805  </t>
1810<section title="The Resource Identified by a Request" anchor="">
1812   The exact resource identified by an Internet request is determined by
1813   examining both the request-target and the Host header field.
1816   An origin server that does not allow resources to differ by the
1817   requested host &MAY; ignore the Host header field value when
1818   determining the resource identified by an HTTP/1.1 request. (But see
1819   <xref target=""/>
1820   for other requirements on Host support in HTTP/1.1.)
1823   An origin server that does differentiate resources based on the host
1824   requested (sometimes referred to as virtual hosts or vanity host
1825   names) &MUST; use the following rules for determining the requested
1826   resource on an HTTP/1.1 request:
1827  <list style="numbers">
1828    <t>If request-target is an absolute-URI, the host is part of the
1829     request-target. Any Host header field value in the request &MUST; be
1830     ignored.</t>
1831    <t>If the request-target is not an absolute-URI, and the request includes
1832     a Host header field, the host is determined by the Host header
1833     field value.</t>
1834    <t>If the host as determined by rule 1 or 2 is not a valid host on
1835     the server, the response &MUST; be a 400 (Bad Request) error message.</t>
1836  </list>
1839   Recipients of an HTTP/1.0 request that lacks a Host header field &MAY;
1840   attempt to use heuristics (e.g., examination of the URI path for
1841   something unique to a particular host) in order to determine what
1842   exact resource is being requested.
1846<section title="Effective Request URI" anchor="effective.request.uri">
1847  <iref primary="true" item="effective request URI"/>
1848  <iref primary="true" item="target resource"/>
1850   HTTP requests often do not carry the absolute URI (<xref target="RFC3986" x:fmt="," x:sec="4.3"/>)
1851   for the target resource; instead, the URI needs to be inferred from the
1852   request-target, Host header field, and connection context. The result of
1853   this process is called the "effective request URI".  The "target resource"
1854   is the resource identified by the effective request URI.
1857   If the request-target is an absolute-URI, then the effective request URI is
1858   the request-target.
1861   If the request-target uses the path-absolute form or the asterisk form,
1862   and the Host header field is present, then the effective request URI is
1863   constructed by concatenating
1866  <list style="symbols">
1867    <t>
1868      the scheme name: "http" if the request was received over an insecure
1869      TCP connection, or "https" when received over a SSL/TLS-secured TCP
1870      connection,
1871    </t>
1872    <t>
1873      the octet sequence "://",
1874    </t>
1875    <t>
1876      the authority component, as specified in the Host header field
1877      (<xref target=""/>), and
1878    </t>
1879    <t>
1880      the request-target obtained from the Request-Line, unless the
1881      request-target is just the asterisk "*".
1882    </t>
1883  </list>
1886   If the request-target uses the path-absolute form or the asterisk form,
1887   and the Host header field is not present, then the effective request URI is
1888   undefined.
1891   Otherwise, when request-target uses the authority form, the effective
1892   request URI is undefined.
1896   Example 1: the effective request URI for the message
1898<artwork type="example" x:indent-with="  ">
1899GET /pub/WWW/TheProject.html HTTP/1.1
1903  (received over an insecure TCP connection) is "http", plus "://", plus the
1904  authority component "", plus the request-target
1905  "/pub/WWW/TheProject.html", thus
1906  "".
1911   Example 2: the effective request URI for the message
1913<artwork type="example" x:indent-with="  ">
1914OPTIONS * HTTP/1.1
1918  (received over an SSL/TLS secured TCP connection) is "https", plus "://", plus the
1919  authority component "", thus "".
1923   Effective request URIs are compared using the rules described in
1924   <xref target="uri.comparison"/>, except that empty path components &MUST-NOT;
1925   be treated as equivalent to an absolute path of "/".
1932<section title="Response" anchor="response">
1933  <x:anchor-alias value="Response"/>
1935   After receiving and interpreting a request message, a server responds
1936   with an HTTP response message.
1938<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Response"/>
1939  <x:ref>Response</x:ref>      = <x:ref>Status-Line</x:ref>               ; <xref target="status-line"/>
1940                  *( <x:ref>header-field</x:ref> <x:ref>CRLF</x:ref> )    ; <xref target="header.fields"/>
1941                  <x:ref>CRLF</x:ref>
1942                  [ <x:ref>message-body</x:ref> ]          ; <xref target="message.body"/>
1945<section title="Status-Line" anchor="status-line">
1946  <x:anchor-alias value="Status-Line"/>
1948   The first line of a Response message is the Status-Line, consisting
1949   of the protocol version, a space (SP), the status code, another space,
1950   a possibly-empty textual phrase describing the status code, and
1951   ending with CRLF.
1953<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Status-Line"/>
1954  <x:ref>Status-Line</x:ref> = <x:ref>HTTP-Version</x:ref> <x:ref>SP</x:ref> <x:ref>Status-Code</x:ref> <x:ref>SP</x:ref> <x:ref>Reason-Phrase</x:ref> <x:ref>CRLF</x:ref>
1957<section title="Status Code and Reason Phrase" anchor="status.code.and.reason.phrase">
1958  <x:anchor-alias value="Reason-Phrase"/>
1959  <x:anchor-alias value="Status-Code"/>
1961   The Status-Code element is a 3-digit integer result code of the
1962   attempt to understand and satisfy the request. These codes are fully
1963   defined in &status-codes;.  The Reason Phrase exists for the sole
1964   purpose of providing a textual description associated with the numeric
1965   status code, out of deference to earlier Internet application protocols
1966   that were more frequently used with interactive text clients.
1967   A client &SHOULD; ignore the content of the Reason Phrase.
1970   The first digit of the Status-Code defines the class of response. The
1971   last two digits do not have any categorization role. There are 5
1972   values for the first digit:
1973  <list style="symbols">
1974    <t>
1975      1xx: Informational - Request received, continuing process
1976    </t>
1977    <t>
1978      2xx: Success - The action was successfully received,
1979        understood, and accepted
1980    </t>
1981    <t>
1982      3xx: Redirection - Further action must be taken in order to
1983        complete the request
1984    </t>
1985    <t>
1986      4xx: Client Error - The request contains bad syntax or cannot
1987        be fulfilled
1988    </t>
1989    <t>
1990      5xx: Server Error - The server failed to fulfill an apparently
1991        valid request
1992    </t>
1993  </list>
1995<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Status-Code"/><iref primary="true" item="Grammar" subitem="Reason-Phrase"/>
1996  <x:ref>Status-Code</x:ref>    = 3<x:ref>DIGIT</x:ref>
1997  <x:ref>Reason-Phrase</x:ref>  = *( <x:ref>WSP</x:ref> / <x:ref>VCHAR</x:ref> / <x:ref>obs-text</x:ref> )
2005<section title="Protocol Parameters" anchor="protocol.parameters">
2007<section title="Date/Time Formats: Full Date" anchor="">
2008  <x:anchor-alias value="HTTP-date"/>
2010   HTTP applications have historically allowed three different formats
2011   for date/time stamps. However, the preferred format is a fixed-length subset
2012   of that defined by <xref target="RFC1123"/>:
2014<figure><artwork type="example" x:indent-with="  ">
2015Sun, 06 Nov 1994 08:49:37 GMT  ; RFC 1123
2018   The other formats are described here only for compatibility with obsolete
2019   implementations.
2021<figure><artwork type="example" x:indent-with="  ">
2022Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format
2023Sun Nov  6 08:49:37 1994       ; ANSI C's asctime() format
2026   HTTP/1.1 clients and servers that parse a date value &MUST; accept
2027   all three formats (for compatibility with HTTP/1.0), though they &MUST;
2028   only generate the RFC 1123 format for representing HTTP-date values
2029   in header fields. See <xref target="tolerant.applications"/> for further information.
2032   All HTTP date/time stamps &MUST; be represented in Greenwich Mean Time
2033   (GMT), without exception. For the purposes of HTTP, GMT is exactly
2034   equal to UTC (Coordinated Universal Time). This is indicated in the
2035   first two formats by the inclusion of "GMT" as the three-letter
2036   abbreviation for time zone, and &MUST; be assumed when reading the
2037   asctime format. HTTP-date is case sensitive and &MUST-NOT; include
2038   additional whitespace beyond that specifically included as SP in the
2039   grammar.
2041<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="HTTP-date"/>
2042  <x:ref>HTTP-date</x:ref>    = <x:ref>rfc1123-date</x:ref> / <x:ref>obs-date</x:ref>
2044<t anchor="">
2045  <x:anchor-alias value="rfc1123-date"/>
2046  <x:anchor-alias value="time-of-day"/>
2047  <x:anchor-alias value="hour"/>
2048  <x:anchor-alias value="minute"/>
2049  <x:anchor-alias value="second"/>
2050  <x:anchor-alias value="day-name"/>
2051  <x:anchor-alias value="day"/>
2052  <x:anchor-alias value="month"/>
2053  <x:anchor-alias value="year"/>
2054  <x:anchor-alias value="GMT"/>
2055  Preferred format:
2057<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="rfc1123-date"/><iref primary="true" item="Grammar" subitem="date1"/><iref primary="true" item="Grammar" subitem="time-of-day"/><iref primary="true" item="Grammar" subitem="hour"/><iref primary="true" item="Grammar" subitem="minute"/><iref primary="true" item="Grammar" subitem="second"/><iref primary="true" item="Grammar" subitem="day-name"/><iref primary="true" item="Grammar" subitem="day-name-l"/><iref primary="true" item="Grammar" subitem="day"/><iref primary="true" item="Grammar" subitem="month"/><iref primary="true" item="Grammar" subitem="year"/><iref primary="true" item="Grammar" subitem="GMT"/>
2058  <x:ref>rfc1123-date</x:ref> = <x:ref>day-name</x:ref> "," <x:ref>SP</x:ref> date1 <x:ref>SP</x:ref> <x:ref>time-of-day</x:ref> <x:ref>SP</x:ref> <x:ref>GMT</x:ref>
2059  ; fixed length subset of the format defined in
2060  ; <xref target="RFC1123" x:fmt="of" x:sec="5.2.14"/>
2062  <x:ref>day-name</x:ref>     = <x:abnf-char-sequence>"Mon"</x:abnf-char-sequence> ; "Mon", case-sensitive
2063               / <x:abnf-char-sequence>"Tue"</x:abnf-char-sequence> ; "Tue", case-sensitive
2064               / <x:abnf-char-sequence>"Wed"</x:abnf-char-sequence> ; "Wed", case-sensitive
2065               / <x:abnf-char-sequence>"Thu"</x:abnf-char-sequence> ; "Thu", case-sensitive
2066               / <x:abnf-char-sequence>"Fri"</x:abnf-char-sequence> ; "Fri", case-sensitive
2067               / <x:abnf-char-sequence>"Sat"</x:abnf-char-sequence> ; "Sat", case-sensitive
2068               / <x:abnf-char-sequence>"Sun"</x:abnf-char-sequence> ; "Sun", case-sensitive
2070  <x:ref>date1</x:ref>        = <x:ref>day</x:ref> <x:ref>SP</x:ref> <x:ref>month</x:ref> <x:ref>SP</x:ref> <x:ref>year</x:ref>
2071               ; e.g., 02 Jun 1982
2073  <x:ref>day</x:ref>          = 2<x:ref>DIGIT</x:ref>
2074  <x:ref>month</x:ref>        = <x:abnf-char-sequence>"Jan"</x:abnf-char-sequence> ; "Jan", case-sensitive
2075               / <x:abnf-char-sequence>"Feb"</x:abnf-char-sequence> ; "Feb", case-sensitive
2076               / <x:abnf-char-sequence>"Mar"</x:abnf-char-sequence> ; "Mar", case-sensitive
2077               / <x:abnf-char-sequence>"Apr"</x:abnf-char-sequence> ; "Apr", case-sensitive
2078               / <x:abnf-char-sequence>"May"</x:abnf-char-sequence> ; "May", case-sensitive
2079               / <x:abnf-char-sequence>"Jun"</x:abnf-char-sequence> ; "Jun", case-sensitive
2080               / <x:abnf-char-sequence>"Jul"</x:abnf-char-sequence> ; "Jul", case-sensitive
2081               / <x:abnf-char-sequence>"Aug"</x:abnf-char-sequence> ; "Aug", case-sensitive
2082               / <x:abnf-char-sequence>"Sep"</x:abnf-char-sequence> ; "Sep", case-sensitive
2083               / <x:abnf-char-sequence>"Oct"</x:abnf-char-sequence> ; "Oct", case-sensitive
2084               / <x:abnf-char-sequence>"Nov"</x:abnf-char-sequence> ; "Nov", case-sensitive
2085               / <x:abnf-char-sequence>"Dec"</x:abnf-char-sequence> ; "Dec", case-sensitive
2086  <x:ref>year</x:ref>         = 4<x:ref>DIGIT</x:ref>
2088  <x:ref>GMT</x:ref>   = <x:abnf-char-sequence>"GMT"</x:abnf-char-sequence> ; "GMT", case-sensitive
2090  <x:ref>time-of-day</x:ref>  = <x:ref>hour</x:ref> ":" <x:ref>minute</x:ref> ":" <x:ref>second</x:ref>
2091                 ; 00:00:00 - 23:59:59
2093  <x:ref>hour</x:ref>         = 2<x:ref>DIGIT</x:ref>               
2094  <x:ref>minute</x:ref>       = 2<x:ref>DIGIT</x:ref>               
2095  <x:ref>second</x:ref>       = 2<x:ref>DIGIT</x:ref>               
2098  The semantics of <x:ref>day-name</x:ref>, <x:ref>day</x:ref>,
2099  <x:ref>month</x:ref>, <x:ref>year</x:ref>, and <x:ref>time-of-day</x:ref> are the
2100  same as those defined for the RFC 5322 constructs
2101  with the corresponding name (<xref target="RFC5322" x:fmt="," x:sec="3.3"/>).
2103<t anchor="">
2104  <x:anchor-alias value="obs-date"/>
2105  <x:anchor-alias value="rfc850-date"/>
2106  <x:anchor-alias value="asctime-date"/>
2107  <x:anchor-alias value="date1"/>
2108  <x:anchor-alias value="date2"/>
2109  <x:anchor-alias value="date3"/>
2110  <x:anchor-alias value="rfc1123-date"/>
2111  <x:anchor-alias value="day-name-l"/>
2112  Obsolete formats:
2114<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="obs-date"/>
2115  <x:ref>obs-date</x:ref>     = <x:ref>rfc850-date</x:ref> / <x:ref>asctime-date</x:ref>
2117<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="rfc850-date"/>
2118  <x:ref>rfc850-date</x:ref>  = <x:ref>day-name-l</x:ref> "," <x:ref>SP</x:ref> <x:ref>date2</x:ref> <x:ref>SP</x:ref> <x:ref>time-of-day</x:ref> <x:ref>SP</x:ref> <x:ref>GMT</x:ref>
2119  <x:ref>date2</x:ref>        = <x:ref>day</x:ref> "-" <x:ref>month</x:ref> "-" 2<x:ref>DIGIT</x:ref>
2120                 ; day-month-year (e.g., 02-Jun-82)
2122  <x:ref>day-name-l</x:ref>   = <x:abnf-char-sequence>"Monday"</x:abnf-char-sequence> ; "Monday", case-sensitive
2123         / <x:abnf-char-sequence>"Tuesday"</x:abnf-char-sequence> ; "Tuesday", case-sensitive
2124         / <x:abnf-char-sequence>"Wednesday"</x:abnf-char-sequence> ; "Wednesday", case-sensitive
2125         / <x:abnf-char-sequence>"Thursday"</x:abnf-char-sequence> ; "Thursday", case-sensitive
2126         / <x:abnf-char-sequence>"Friday"</x:abnf-char-sequence> ; "Friday", case-sensitive
2127         / <x:abnf-char-sequence>"Saturday"</x:abnf-char-sequence> ; "Saturday", case-sensitive
2128         / <x:abnf-char-sequence>"Sunday"</x:abnf-char-sequence> ; "Sunday", case-sensitive
2130<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="asctime-date"/>
2131  <x:ref>asctime-date</x:ref> = <x:ref>day-name</x:ref> <x:ref>SP</x:ref> <x:ref>date3</x:ref> <x:ref>SP</x:ref> <x:ref>time-of-day</x:ref> <x:ref>SP</x:ref> <x:ref>year</x:ref>
2132  <x:ref>date3</x:ref>        = <x:ref>month</x:ref> <x:ref>SP</x:ref> ( 2<x:ref>DIGIT</x:ref> / ( <x:ref>SP</x:ref> 1<x:ref>DIGIT</x:ref> ))
2133                 ; month day (e.g., Jun  2)
2136  <t>
2137    <x:h>Note:</x:h> Recipients of date values are encouraged to be robust in
2138    accepting date values that might have been sent by non-HTTP
2139    applications, as is sometimes the case when retrieving or posting
2140    messages via proxies/gateways to SMTP or NNTP.
2141  </t>
2144  <t>
2145    <x:h>Note:</x:h> HTTP requirements for the date/time stamp format apply only
2146    to their usage within the protocol stream. Clients and servers are
2147    not required to use these formats for user presentation, request
2148    logging, etc.
2149  </t>
2153<section title="Transfer Codings" anchor="transfer.codings">
2154  <x:anchor-alias value="transfer-coding"/>
2155  <x:anchor-alias value="transfer-extension"/>
2157   Transfer-coding values are used to indicate an encoding
2158   transformation that has been, can be, or might need to be applied to a
2159   payload body in order to ensure "safe transport" through the network.
2160   This differs from a content coding in that the transfer-coding is a
2161   property of the message rather than a property of the representation
2162   that is being transferred.
2164<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="transfer-coding"/><iref primary="true" item="Grammar" subitem="transfer-extension"/>
2165  <x:ref>transfer-coding</x:ref>         = "chunked" ; <xref target="chunked.encoding"/>
2166                          / "compress" ; <xref target="compress.coding"/>
2167                          / "deflate" ; <xref target="deflate.coding"/>
2168                          / "gzip" ; <xref target="gzip.coding"/>
2169                          / <x:ref>transfer-extension</x:ref>
2170  <x:ref>transfer-extension</x:ref>      = <x:ref>token</x:ref> *( <x:ref>OWS</x:ref> ";" <x:ref>OWS</x:ref> <x:ref>transfer-parameter</x:ref> )
2172<t anchor="rule.parameter">
2173  <x:anchor-alias value="attribute"/>
2174  <x:anchor-alias value="transfer-parameter"/>
2175  <x:anchor-alias value="value"/>
2176   Parameters are in the form of attribute/value pairs.
2178<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="transfer-parameter"/><iref primary="true" item="Grammar" subitem="attribute"/><iref primary="true" item="Grammar" subitem="value"/><iref primary="true" item="Grammar" subitem="date2"/><iref primary="true" item="Grammar" subitem="date3"/>
2179  <x:ref>transfer-parameter</x:ref>      = <x:ref>attribute</x:ref> <x:ref>BWS</x:ref> "=" <x:ref>BWS</x:ref> <x:ref>value</x:ref>
2180  <x:ref>attribute</x:ref>               = <x:ref>token</x:ref>
2181  <x:ref>value</x:ref>                   = <x:ref>word</x:ref>
2184   All transfer-coding values are case-insensitive. HTTP/1.1 uses
2185   transfer-coding values in the TE header field (<xref target="header.te"/>) and in
2186   the Transfer-Encoding header field (<xref target="header.transfer-encoding"/>).
2189   Transfer-codings are analogous to the Content-Transfer-Encoding values of
2190   MIME, which were designed to enable safe transport of binary data over a
2191   7-bit transport service (<xref target="RFC2045" x:fmt="," x:sec="6"/>).
2192   However, safe transport
2193   has a different focus for an 8bit-clean transfer protocol. In HTTP,
2194   the only unsafe characteristic of message-bodies is the difficulty in
2195   determining the exact message body length (<xref target="message.body"/>),
2196   or the desire to encrypt data over a shared transport.
2199   A server that receives a request message with a transfer-coding it does
2200   not understand &SHOULD; respond with 501 (Not Implemented) and then
2201   close the connection. A server &MUST-NOT; send transfer-codings to an HTTP/1.0
2202   client.
2205<section title="Chunked Transfer Coding" anchor="chunked.encoding">
2206  <iref item="chunked (Coding Format)"/>
2207  <iref item="Coding Format" subitem="chunked"/>
2208  <x:anchor-alias value="chunk"/>
2209  <x:anchor-alias value="Chunked-Body"/>
2210  <x:anchor-alias value="chunk-data"/>
2211  <x:anchor-alias value="chunk-ext"/>
2212  <x:anchor-alias value="chunk-ext-name"/>
2213  <x:anchor-alias value="chunk-ext-val"/>
2214  <x:anchor-alias value="chunk-size"/>
2215  <x:anchor-alias value="last-chunk"/>
2216  <x:anchor-alias value="trailer-part"/>
2217  <x:anchor-alias value="quoted-str-nf"/>
2218  <x:anchor-alias value="qdtext-nf"/>
2220   The chunked encoding modifies the body of a message in order to
2221   transfer it as a series of chunks, each with its own size indicator,
2222   followed by an &OPTIONAL; trailer containing header fields. This
2223   allows dynamically produced content to be transferred along with the
2224   information necessary for the recipient to verify that it has
2225   received the full message.
2227<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Chunked-Body"/><iref primary="true" item="Grammar" subitem="chunk"/><iref primary="true" item="Grammar" subitem="chunk-size"/><iref primary="true" item="Grammar" subitem="last-chunk"/><iref primary="true" item="Grammar" subitem="chunk-ext"/><iref primary="true" item="Grammar" subitem="chunk-ext-name"/><iref primary="true" item="Grammar" subitem="chunk-ext-val"/><iref primary="true" item="Grammar" subitem="chunk-data"/><iref primary="true" item="Grammar" subitem="trailer-part"/><iref primary="true" item="Grammar" subitem="quoted-str-nf"/><iref primary="true" item="Grammar" subitem="qdtext-nf"/>
2228  <x:ref>Chunked-Body</x:ref>   = *<x:ref>chunk</x:ref>
2229                   <x:ref>last-chunk</x:ref>
2230                   <x:ref>trailer-part</x:ref>
2231                   <x:ref>CRLF</x:ref>
2233  <x:ref>chunk</x:ref>          = <x:ref>chunk-size</x:ref> *WSP [ <x:ref>chunk-ext</x:ref> ] <x:ref>CRLF</x:ref>
2234                   <x:ref>chunk-data</x:ref> <x:ref>CRLF</x:ref>
2235  <x:ref>chunk-size</x:ref>     = 1*<x:ref>HEXDIG</x:ref>
2236  <x:ref>last-chunk</x:ref>     = 1*("0") *WSP [ <x:ref>chunk-ext</x:ref> ] <x:ref>CRLF</x:ref>
2238  <x:ref>chunk-ext</x:ref>      = *( ";" *WSP <x:ref>chunk-ext-name</x:ref>
2239                      [ "=" <x:ref>chunk-ext-val</x:ref> ] *WSP )
2240  <x:ref>chunk-ext-name</x:ref> = <x:ref>token</x:ref>
2241  <x:ref>chunk-ext-val</x:ref>  = <x:ref>token</x:ref> / <x:ref>quoted-str-nf</x:ref>
2242  <x:ref>chunk-data</x:ref>     = 1*<x:ref>OCTET</x:ref> ; a sequence of chunk-size octets
2243  <x:ref>trailer-part</x:ref>   = *( <x:ref>header-field</x:ref> <x:ref>CRLF</x:ref> )
2245  <x:ref>quoted-str-nf</x:ref>  = <x:ref>DQUOTE</x:ref> *( <x:ref>qdtext-nf</x:ref> / <x:ref>quoted-pair</x:ref> ) <x:ref>DQUOTE</x:ref>
2246                 ; like <x:ref>quoted-string</x:ref>, but disallowing line folding
2247  <x:ref>qdtext-nf</x:ref>      = <x:ref>WSP</x:ref> / %x21 / %x23-5B / %x5D-7E / <x:ref>obs-text</x:ref>
2248                 ; <x:ref>WSP</x:ref> / &lt;<x:ref>VCHAR</x:ref> except <x:ref>DQUOTE</x:ref> and "\"&gt; / <x:ref>obs-text</x:ref>
2251   The chunk-size field is a string of hex digits indicating the size of
2252   the chunk-data in octets. The chunked encoding is ended by any chunk whose size is
2253   zero, followed by the trailer, which is terminated by an empty line.
2256   The trailer allows the sender to include additional HTTP header
2257   fields at the end of the message. The Trailer header field can be
2258   used to indicate which header fields are included in a trailer (see
2259   <xref target="header.trailer"/>).
2262   A server using chunked transfer-coding in a response &MUST-NOT; use the
2263   trailer for any header fields unless at least one of the following is
2264   true:
2265  <list style="numbers">
2266    <t>the request included a TE header field that indicates "trailers" is
2267     acceptable in the transfer-coding of the  response, as described in
2268     <xref target="header.te"/>; or,</t>
2270    <t>the trailer fields consist entirely of optional metadata, and the
2271    recipient could use the message (in a manner acceptable to the server where
2272    the field originated) without receiving it. In other words, the server that
2273    generated the header (often but not always the origin server) is willing to
2274    accept the possibility that the trailer fields might be silently discarded
2275    along the path to the client.</t>
2276  </list>
2279   This requirement prevents an interoperability failure when the
2280   message is being received by an HTTP/1.1 (or later) proxy and
2281   forwarded to an HTTP/1.0 recipient. It avoids a situation where
2282   compliance with the protocol would have necessitated a possibly
2283   infinite buffer on the proxy.
2286   A process for decoding the "chunked" transfer-coding
2287   can be represented in pseudo-code as:
2289<figure><artwork type="code">
2290  length := 0
2291  read chunk-size, chunk-ext (if any) and CRLF
2292  while (chunk-size &gt; 0) {
2293     read chunk-data and CRLF
2294     append chunk-data to decoded-body
2295     length := length + chunk-size
2296     read chunk-size and CRLF
2297  }
2298  read header-field
2299  while (header-field not empty) {
2300     append header-field to existing header fields
2301     read header-field
2302  }
2303  Content-Length := length
2304  Remove "chunked" from Transfer-Encoding
2307   All HTTP/1.1 applications &MUST; be able to receive and decode the
2308   "chunked" transfer-coding and &MUST; ignore chunk-ext extensions
2309   they do not understand.
2312   Since "chunked" is the only transfer-coding required to be understood
2313   by HTTP/1.1 recipients, it plays a crucial role in delimiting messages
2314   on a persistent connection.  Whenever a transfer-coding is applied to
2315   a payload body in a request, the final transfer-coding applied &MUST;
2316   be "chunked".  If a transfer-coding is applied to a response payload
2317   body, then either the final transfer-coding applied &MUST; be "chunked"
2318   or the message &MUST; be terminated by closing the connection. When the
2319   "chunked" transfer-coding is used, it &MUST; be the last transfer-coding
2320   applied to form the message-body. The "chunked" transfer-coding &MUST-NOT;
2321   be applied more than once in a message-body.
2325<section title="Compression Codings" anchor="compression.codings">
2327   The codings defined below can be used to compress the payload of a
2328   message.
2331   <x:h>Note:</x:h> Use of program names for the identification of encoding formats
2332   is not desirable and is discouraged for future encodings. Their
2333   use here is representative of historical practice, not good
2334   design.
2337   <x:h>Note:</x:h> For compatibility with previous implementations of HTTP,
2338   applications &SHOULD; consider "x-gzip" and "x-compress" to be
2339   equivalent to "gzip" and "compress" respectively.
2342<section title="Compress Coding" anchor="compress.coding">
2343<iref item="compress (Coding Format)"/>
2344<iref item="Coding Format" subitem="compress"/>
2346   The "compress" format is produced by the common UNIX file compression
2347   program "compress". This format is an adaptive Lempel-Ziv-Welch
2348   coding (LZW).
2352<section title="Deflate Coding" anchor="deflate.coding">
2353<iref item="deflate (Coding Format)"/>
2354<iref item="Coding Format" subitem="deflate"/>
2356   The "deflate" format is defined as the "deflate" compression mechanism
2357   (described in <xref target="RFC1951"/>) used inside the "zlib"
2358   data format (<xref target="RFC1950"/>).
2361  <t>
2362    <x:h>Note:</x:h> Some incorrect implementations send the "deflate"
2363    compressed data without the zlib wrapper.
2364   </t>
2368<section title="Gzip Coding" anchor="gzip.coding">
2369<iref item="gzip (Coding Format)"/>
2370<iref item="Coding Format" subitem="gzip"/>
2372   The "gzip" format is produced by the file compression program
2373   "gzip" (GNU zip), as described in <xref target="RFC1952"/>. This format is a
2374   Lempel-Ziv coding (LZ77) with a 32 bit CRC.
2380<section title="Transfer Coding Registry" anchor="transfer.coding.registry">
2382   The HTTP Transfer Coding Registry defines the name space for the transfer
2383   coding names.
2386   Registrations &MUST; include the following fields:
2387   <list style="symbols">
2388     <t>Name</t>
2389     <t>Description</t>
2390     <t>Pointer to specification text</t>
2391   </list>
2394   Names of transfer codings &MUST-NOT; overlap with names of content codings
2395   (&content-codings;), unless the encoding transformation is identical (as it
2396   is the case for the compression codings defined in
2397   <xref target="compression.codings"/>).
2400   Values to be added to this name space require a specification
2401   (see "Specification Required" in <xref target="RFC5226" x:fmt="of" x:sec="4.1"/>), and &MUST;
2402   conform to the purpose of transfer coding defined in this section.
2405   The registry itself is maintained at
2406   <eref target=""/>.
2411<section title="Product Tokens" anchor="product.tokens">
2412  <x:anchor-alias value="product"/>
2413  <x:anchor-alias value="product-version"/>
2415   Product tokens are used to allow communicating applications to
2416   identify themselves by software name and version. Most fields using
2417   product tokens also allow sub-products which form a significant part
2418   of the application to be listed, separated by whitespace. By
2419   convention, the products are listed in order of their significance
2420   for identifying the application.
2422<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="product"/><iref primary="true" item="Grammar" subitem="product-version"/>
2423  <x:ref>product</x:ref>         = <x:ref>token</x:ref> ["/" <x:ref>product-version</x:ref>]
2424  <x:ref>product-version</x:ref> = <x:ref>token</x:ref>
2427   Examples:
2429<figure><artwork type="example">
2430  User-Agent: CERN-LineMode/2.15 libwww/2.17b3
2431  Server: Apache/0.8.4
2434   Product tokens &SHOULD; be short and to the point. They &MUST-NOT; be
2435   used for advertising or other non-essential information. Although any
2436   token octet &MAY; appear in a product-version, this token &SHOULD;
2437   only be used for a version identifier (i.e., successive versions of
2438   the same product &SHOULD; only differ in the product-version portion of
2439   the product value).
2443<section title="Quality Values" anchor="quality.values">
2444  <x:anchor-alias value="qvalue"/>
2446   Both transfer codings (TE request header field, <xref target="header.te"/>)
2447   and content negotiation (&content.negotiation;) use short "floating point"
2448   numbers to indicate the relative importance ("weight") of various
2449   negotiable parameters.  A weight is normalized to a real number in
2450   the range 0 through 1, where 0 is the minimum and 1 the maximum
2451   value. If a parameter has a quality value of 0, then content with
2452   this parameter is "not acceptable" for the client. HTTP/1.1
2453   applications &MUST-NOT; generate more than three digits after the
2454   decimal point. User configuration of these values &SHOULD; also be
2455   limited in this fashion.
2457<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="qvalue"/>
2458  <x:ref>qvalue</x:ref>         = ( "0" [ "." 0*3<x:ref>DIGIT</x:ref> ] )
2459                 / ( "1" [ "." 0*3("0") ] )
2462  <t>
2463     <x:h>Note:</x:h> "Quality values" is a misnomer, since these values merely represent
2464     relative degradation in desired quality.
2465  </t>
2471<section title="Connections" anchor="connections">
2473<section title="Persistent Connections" anchor="persistent.connections">
2475<section title="Purpose" anchor="persistent.purpose">
2477   Prior to persistent connections, a separate TCP connection was
2478   established for each request, increasing the load on HTTP servers
2479   and causing congestion on the Internet. The use of inline images and
2480   other associated data often requires a client to make multiple
2481   requests of the same server in a short amount of time. Analysis of
2482   these performance problems and results from a prototype
2483   implementation are available <xref target="Pad1995"/> <xref target="Spe"/>. Implementation experience and
2484   measurements of actual HTTP/1.1 implementations show good
2485   results <xref target="Nie1997"/>. Alternatives have also been explored, for example,
2486   T/TCP <xref target="Tou1998"/>.
2489   Persistent HTTP connections have a number of advantages:
2490  <list style="symbols">
2491      <t>
2492        By opening and closing fewer TCP connections, CPU time is saved
2493        in routers and hosts (clients, servers, proxies, gateways,
2494        tunnels, or caches), and memory used for TCP protocol control
2495        blocks can be saved in hosts.
2496      </t>
2497      <t>
2498        HTTP requests and responses can be pipelined on a connection.
2499        Pipelining allows a client to make multiple requests without
2500        waiting for each response, allowing a single TCP connection to
2501        be used much more efficiently, with much lower elapsed time.
2502      </t>
2503      <t>
2504        Network congestion is reduced by reducing the number of packets
2505        caused by TCP opens, and by allowing TCP sufficient time to
2506        determine the congestion state of the network.
2507      </t>
2508      <t>
2509        Latency on subsequent requests is reduced since there is no time
2510        spent in TCP's connection opening handshake.
2511      </t>
2512      <t>
2513        HTTP can evolve more gracefully, since errors can be reported
2514        without the penalty of closing the TCP connection. Clients using
2515        future versions of HTTP might optimistically try a new feature,
2516        but if communicating with an older server, retry with old
2517        semantics after an error is reported.
2518      </t>
2519    </list>
2522   HTTP implementations &SHOULD; implement persistent connections.
2526<section title="Overall Operation" anchor="persistent.overall">
2528   A significant difference between HTTP/1.1 and earlier versions of
2529   HTTP is that persistent connections are the default behavior of any
2530   HTTP connection. That is, unless otherwise indicated, the client
2531   &SHOULD; assume that the server will maintain a persistent connection,
2532   even after error responses from the server.
2535   Persistent connections provide a mechanism by which a client and a
2536   server can signal the close of a TCP connection. This signaling takes
2537   place using the Connection header field (<xref target="header.connection"/>). Once a close
2538   has been signaled, the client &MUST-NOT; send any more requests on that
2539   connection.
2542<section title="Negotiation" anchor="persistent.negotiation">
2544   An HTTP/1.1 server &MAY; assume that a HTTP/1.1 client intends to
2545   maintain a persistent connection unless a Connection header field including
2546   the connection-token "close" was sent in the request. If the server
2547   chooses to close the connection immediately after sending the
2548   response, it &SHOULD; send a Connection header field including the
2549   connection-token "close".
2552   An HTTP/1.1 client &MAY; expect a connection to remain open, but would
2553   decide to keep it open based on whether the response from a server
2554   contains a Connection header field with the connection-token close. In case
2555   the client does not want to maintain a connection for more than that
2556   request, it &SHOULD; send a Connection header field including the
2557   connection-token close.
2560   If either the client or the server sends the close token in the
2561   Connection header field, that request becomes the last one for the
2562   connection.
2565   Clients and servers &SHOULD-NOT;  assume that a persistent connection is
2566   maintained for HTTP versions less than 1.1 unless it is explicitly
2567   signaled. See <xref target="compatibility.with.http.1.0.persistent.connections"/> for more information on backward
2568   compatibility with HTTP/1.0 clients.
2571   In order to remain persistent, all messages on the connection &MUST;
2572   have a self-defined message length (i.e., one not defined by closure
2573   of the connection), as described in <xref target="message.body"/>.
2577<section title="Pipelining" anchor="pipelining">
2579   A client that supports persistent connections &MAY; "pipeline" its
2580   requests (i.e., send multiple requests without waiting for each
2581   response). A server &MUST; send its responses to those requests in the
2582   same order that the requests were received.
2585   Clients which assume persistent connections and pipeline immediately
2586   after connection establishment &SHOULD; be prepared to retry their
2587   connection if the first pipelined attempt fails. If a client does
2588   such a retry, it &MUST-NOT; pipeline before it knows the connection is
2589   persistent. Clients &MUST; also be prepared to resend their requests if
2590   the server closes the connection before sending all of the
2591   corresponding responses.
2594   Clients &SHOULD-NOT; pipeline requests using non-idempotent request methods or
2595   non-idempotent sequences of request methods (see &idempotent-methods;). Otherwise, a
2596   premature termination of the transport connection could lead to
2597   indeterminate results. A client wishing to send a non-idempotent
2598   request &SHOULD; wait to send that request until it has received the
2599   response status line for the previous request.
2604<section title="Proxy Servers" anchor="persistent.proxy">
2606   It is especially important that proxies correctly implement the
2607   properties of the Connection header field as specified in <xref target="header.connection"/>.
2610   The proxy server &MUST; signal persistent connections separately with
2611   its clients and the origin servers (or other proxy servers) that it
2612   connects to. Each persistent connection applies to only one transport
2613   link.
2616   A proxy server &MUST-NOT; establish a HTTP/1.1 persistent connection
2617   with an HTTP/1.0 client (but see <xref x:sec="19.7.1" x:fmt="of" target="RFC2068"/>
2618   for information and discussion of the problems with the Keep-Alive header field
2619   implemented by many HTTP/1.0 clients).
2622<section title="End-to-end and Hop-by-hop Header Fields" anchor="end-to-end.and.hop-by-hop.header-fields">
2624  <cref anchor="TODO-end-to-end" source="jre">
2625    Restored from <eref target=""/>.
2626    See also <eref target=""/>.
2627  </cref>
2630   For the purpose of defining the behavior of caches and non-caching
2631   proxies, we divide HTTP header fields into two categories:
2632  <list style="symbols">
2633      <t>End-to-end header fields, which are  transmitted to the ultimate
2634        recipient of a request or response. End-to-end header fields in
2635        responses MUST be stored as part of a cache entry and &MUST; be
2636        transmitted in any response formed from a cache entry.</t>
2638      <t>Hop-by-hop header fields, which are meaningful only for a single
2639        transport-level connection, and are not stored by caches or
2640        forwarded by proxies.</t>
2641  </list>
2644   The following HTTP/1.1 header fields are hop-by-hop header fields:
2645  <list style="symbols">
2646      <t>Connection</t>
2647      <t>Keep-Alive</t>
2648      <t>Proxy-Authenticate</t>
2649      <t>Proxy-Authorization</t>
2650      <t>TE</t>
2651      <t>Trailer</t>
2652      <t>Transfer-Encoding</t>
2653      <t>Upgrade</t>
2654  </list>
2657   All other header fields defined by HTTP/1.1 are end-to-end header fields.
2660   Other hop-by-hop header fields &MUST; be listed in a Connection header field
2661   (<xref target="header.connection"/>).
2665<section title="Non-modifiable Header Fields" anchor="non-modifiable.header-fields">
2667  <cref anchor="TODO-non-mod-headers" source="jre">
2668    Restored from <eref target=""/>.
2669    See also <eref target=""/>.
2670  </cref>
2673   Some features of HTTP/1.1, such as Digest Authentication, depend on the
2674   value of certain end-to-end header fields. A non-transforming proxy &SHOULD-NOT;
2675   modify an end-to-end header field unless the definition of that header field requires
2676   or specifically allows that.
2679   A non-transforming proxy &MUST-NOT; modify any of the following fields in a
2680   request or response, and it &MUST-NOT; add any of these fields if not
2681   already present:
2682  <list style="symbols">
2683    <t>Allow</t>
2684    <t>Content-Location</t>
2685    <t>Content-MD5</t>
2686    <t>ETag</t>
2687    <t>Last-Modified</t>
2688    <t>Server</t>
2689  </list>
2692   A non-transforming proxy &MUST-NOT; modify any of the following fields in a
2693   response:
2694  <list style="symbols">
2695    <t>Expires</t>
2696  </list>
2699   but it &MAY; add any of these fields if not already present. If an
2700   Expires header field is added, it &MUST; be given a field-value identical to
2701   that of the Date header field in that response.
2704   A proxy &MUST-NOT; modify or add any of the following fields in a
2705   message that contains the no-transform cache-control directive, or in
2706   any request:
2707  <list style="symbols">
2708    <t>Content-Encoding</t>
2709    <t>Content-Range</t>
2710    <t>Content-Type</t>
2711  </list>
2714   A transforming proxy &MAY; modify or add these fields to a message
2715   that does not include no-transform, but if it does so, it &MUST; add a
2716   Warning 214 (Transformation applied) if one does not already appear
2717   in the message (see &header-warning;).
2720  <t>
2721    <x:h>Warning:</x:h> Unnecessary modification of end-to-end header fields might
2722    cause authentication failures if stronger authentication
2723    mechanisms are introduced in later versions of HTTP. Such
2724    authentication mechanisms &MAY; rely on the values of header fields
2725    not listed here.
2726  </t>
2729   A non-transforming proxy &MUST; preserve the message payload (&payload;),
2730   though it &MAY; change the message-body through application or removal
2731   of a transfer-coding (<xref target="transfer.codings"/>).
2737<section title="Practical Considerations" anchor="persistent.practical">
2739   Servers will usually have some time-out value beyond which they will
2740   no longer maintain an inactive connection. Proxy servers might make
2741   this a higher value since it is likely that the client will be making
2742   more connections through the same server. The use of persistent
2743   connections places no requirements on the length (or existence) of
2744   this time-out for either the client or the server.
2747   When a client or server wishes to time-out it &SHOULD; issue a graceful
2748   close on the transport connection. Clients and servers &SHOULD; both
2749   constantly watch for the other side of the transport close, and
2750   respond to it as appropriate. If a client or server does not detect
2751   the other side's close promptly it could cause unnecessary resource
2752   drain on the network.
2755   A client, server, or proxy &MAY; close the transport connection at any
2756   time. For example, a client might have started to send a new request
2757   at the same time that the server has decided to close the "idle"
2758   connection. From the server's point of view, the connection is being
2759   closed while it was idle, but from the client's point of view, a
2760   request is in progress.
2763   This means that clients, servers, and proxies &MUST; be able to recover
2764   from asynchronous close events. Client software &SHOULD; reopen the
2765   transport connection and retransmit the aborted sequence of requests
2766   without user interaction so long as the request sequence is
2767   idempotent (see &idempotent-methods;). Non-idempotent request methods or sequences
2768   &MUST-NOT; be automatically retried, although user agents &MAY; offer a
2769   human operator the choice of retrying the request(s). Confirmation by
2770   user-agent software with semantic understanding of the application
2771   &MAY; substitute for user confirmation. The automatic retry &SHOULD-NOT;
2772   be repeated if the second sequence of requests fails.
2775   Servers &SHOULD; always respond to at least one request per connection,
2776   if at all possible. Servers &SHOULD-NOT;  close a connection in the
2777   middle of transmitting a response, unless a network or client failure
2778   is suspected.
2781   Clients (including proxies) &SHOULD; limit the number of simultaneous
2782   connections that they maintain to a given server (including proxies).
2785   Previous revisions of HTTP gave a specific number of connections as a
2786   ceiling, but this was found to be impractical for many applications. As a
2787   result, this specification does not mandate a particular maximum number of
2788   connections, but instead encourages clients to be conservative when opening
2789   multiple connections.
2792   In particular, while using multiple connections avoids the "head-of-line
2793   blocking" problem (whereby a request that takes significant server-side
2794   processing and/or has a large payload can block subsequent requests on the
2795   same connection), each connection used consumes server resources (sometimes
2796   significantly), and furthermore using multiple connections can cause
2797   undesirable side effects in congested networks.
2800   Note that servers might reject traffic that they deem abusive, including an
2801   excessive number of connections from a client.
2806<section title="Message Transmission Requirements" anchor="message.transmission.requirements">
2808<section title="Persistent Connections and Flow Control" anchor="persistent.flow">
2810   HTTP/1.1 servers &SHOULD; maintain persistent connections and use TCP's
2811   flow control mechanisms to resolve temporary overloads, rather than
2812   terminating connections with the expectation that clients will retry.
2813   The latter technique can exacerbate network congestion.
2817<section title="Monitoring Connections for Error Status Messages" anchor="persistent.monitor">
2819   An HTTP/1.1 (or later) client sending a message-body &SHOULD; monitor
2820   the network connection for an error status code while it is transmitting
2821   the request. If the client sees an error status code, it &SHOULD;
2822   immediately cease transmitting the body. If the body is being sent
2823   using a "chunked" encoding (<xref target="transfer.codings"/>), a zero length chunk and
2824   empty trailer &MAY; be used to prematurely mark the end of the message.
2825   If the body was preceded by a Content-Length header field, the client &MUST;
2826   close the connection.
2830<section title="Use of the 100 (Continue) Status" anchor="use.of.the.100.status">
2832   The purpose of the 100 (Continue) status code (see &status-100;) is to
2833   allow a client that is sending a request message with a request body
2834   to determine if the origin server is willing to accept the request
2835   (based on the request header fields) before the client sends the request
2836   body. In some cases, it might either be inappropriate or highly
2837   inefficient for the client to send the body if the server will reject
2838   the message without looking at the body.
2841   Requirements for HTTP/1.1 clients:
2842  <list style="symbols">
2843    <t>
2844        If a client will wait for a 100 (Continue) response before
2845        sending the request body, it &MUST; send an Expect header
2846        field (&header-expect;) with the "100-continue" expectation.
2847    </t>
2848    <t>
2849        A client &MUST-NOT; send an Expect header field (&header-expect;)
2850        with the "100-continue" expectation if it does not intend
2851        to send a request body.
2852    </t>
2853  </list>
2856   Because of the presence of older implementations, the protocol allows
2857   ambiguous situations in which a client might send "Expect: 100-continue"
2858   without receiving either a 417 (Expectation Failed)
2859   or a 100 (Continue) status code. Therefore, when a client sends this
2860   header field to an origin server (possibly via a proxy) from which it
2861   has never seen a 100 (Continue) status code, the client &SHOULD-NOT; 
2862   wait for an indefinite period before sending the request body.
2865   Requirements for HTTP/1.1 origin servers:
2866  <list style="symbols">
2867    <t> Upon receiving a request which includes an Expect header
2868        field with the "100-continue" expectation, an origin server &MUST;
2869        either respond with 100 (Continue) status code and continue to read
2870        from the input stream, or respond with a final status code. The
2871        origin server &MUST-NOT; wait for the request body before sending
2872        the 100 (Continue) response. If it responds with a final status
2873        code, it &MAY; close the transport connection or it &MAY; continue
2874        to read and discard the rest of the request.  It &MUST-NOT;
2875        perform the request method if it returns a final status code.
2876    </t>
2877    <t> An origin server &SHOULD-NOT;  send a 100 (Continue) response if
2878        the request message does not include an Expect header
2879        field with the "100-continue" expectation, and &MUST-NOT; send a
2880        100 (Continue) response if such a request comes from an HTTP/1.0
2881        (or earlier) client. There is an exception to this rule: for
2882        compatibility with <xref target="RFC2068"/>, a server &MAY; send a 100 (Continue)
2883        status code in response to an HTTP/1.1 PUT or POST request that does
2884        not include an Expect header field with the "100-continue"
2885        expectation. This exception, the purpose of which is
2886        to minimize any client processing delays associated with an
2887        undeclared wait for 100 (Continue) status code, applies only to
2888        HTTP/1.1 requests, and not to requests with any other HTTP-version
2889        value.
2890    </t>
2891    <t> An origin server &MAY; omit a 100 (Continue) response if it has
2892        already received some or all of the request body for the
2893        corresponding request.
2894    </t>
2895    <t> An origin server that sends a 100 (Continue) response &MUST;
2896    ultimately send a final status code, once the request body is
2897        received and processed, unless it terminates the transport
2898        connection prematurely.
2899    </t>
2900    <t> If an origin server receives a request that does not include an
2901        Expect header field with the "100-continue" expectation,
2902        the request includes a request body, and the server responds
2903        with a final status code before reading the entire request body
2904        from the transport connection, then the server &SHOULD-NOT;  close
2905        the transport connection until it has read the entire request,
2906        or until the client closes the connection. Otherwise, the client
2907        might not reliably receive the response message. However, this
2908        requirement is not be construed as preventing a server from
2909        defending itself against denial-of-service attacks, or from
2910        badly broken client implementations.
2911      </t>
2912    </list>
2915   Requirements for HTTP/1.1 proxies:
2916  <list style="symbols">
2917    <t> If a proxy receives a request that includes an Expect header
2918        field with the "100-continue" expectation, and the proxy
2919        either knows that the next-hop server complies with HTTP/1.1 or
2920        higher, or does not know the HTTP version of the next-hop
2921        server, it &MUST; forward the request, including the Expect header
2922        field.
2923    </t>
2924    <t> If the proxy knows that the version of the next-hop server is
2925        HTTP/1.0 or lower, it &MUST-NOT; forward the request, and it &MUST;
2926        respond with a 417 (Expectation Failed) status code.
2927    </t>
2928    <t> Proxies &SHOULD; maintain a cache recording the HTTP version
2929        numbers received from recently-referenced next-hop servers.
2930    </t>
2931    <t> A proxy &MUST-NOT; forward a 100 (Continue) response if the
2932        request message was received from an HTTP/1.0 (or earlier)
2933        client and did not include an Expect header field with
2934        the "100-continue" expectation. This requirement overrides the
2935        general rule for forwarding of 1xx responses (see &status-1xx;).
2936    </t>
2937  </list>
2941<section title="Client Behavior if Server Prematurely Closes Connection" anchor="connection.premature">
2943   If an HTTP/1.1 client sends a request which includes a request body,
2944   but which does not include an Expect header field with the
2945   "100-continue" expectation, and if the client is not directly
2946   connected to an HTTP/1.1 origin server, and if the client sees the
2947   connection close before receiving a status line from the server, the
2948   client &SHOULD; retry the request.  If the client does retry this
2949   request, it &MAY; use the following "binary exponential backoff"
2950   algorithm to be assured of obtaining a reliable response:
2951  <list style="numbers">
2952    <t>
2953      Initiate a new connection to the server
2954    </t>
2955    <t>
2956      Transmit the request-line, header fields, and the CRLF that
2957      indicates the end of header fields.
2958    </t>
2959    <t>
2960      Initialize a variable R to the estimated round-trip time to the
2961         server (e.g., based on the time it took to establish the
2962         connection), or to a constant value of 5 seconds if the round-trip
2963         time is not available.
2964    </t>
2965    <t>
2966       Compute T = R * (2**N), where N is the number of previous
2967         retries of this request.
2968    </t>
2969    <t>
2970       Wait either for an error response from the server, or for T
2971         seconds (whichever comes first)
2972    </t>
2973    <t>
2974       If no error response is received, after T seconds transmit the
2975         body of the request.
2976    </t>
2977    <t>
2978       If client sees that the connection is closed prematurely,
2979         repeat from step 1 until the request is accepted, an error
2980         response is received, or the user becomes impatient and
2981         terminates the retry process.
2982    </t>
2983  </list>
2986   If at any point an error status code is received, the client
2987  <list style="symbols">
2988      <t>&SHOULD-NOT;  continue and</t>
2990      <t>&SHOULD; close the connection if it has not completed sending the
2991        request message.</t>
2992    </list>
2999<section title="Miscellaneous notes that might disappear" anchor="misc">
3000<section title="Scheme aliases considered harmful" anchor="scheme.aliases">
3002   <cref anchor="TBD-aliases-harmful">describe why aliases like webcal are harmful.</cref>
3006<section title="Use of HTTP for proxy communication" anchor="http.proxy">
3008   <cref anchor="TBD-proxy-other">Configured to use HTTP to proxy HTTP or other protocols.</cref>
3012<section title="Interception of HTTP for access control" anchor="http.intercept">
3014   <cref anchor="TBD-intercept">Interception of HTTP traffic for initiating access control.</cref>
3018<section title="Use of HTTP by other protocols" anchor="http.others">
3020   <cref anchor="TBD-profiles">Profiles of HTTP defined by other protocol.
3021   Extensions of HTTP like WebDAV.</cref>
3025<section title="Use of HTTP by media type specification" anchor="">
3027   <cref anchor="TBD-hypertext">Instructions on composing HTTP requests via hypertext formats.</cref>
3032<section title="Header Field Definitions" anchor="header.field.definitions">
3034   This section defines the syntax and semantics of HTTP header fields
3035   related to message framing and transport protocols.
3038<section title="Connection" anchor="header.connection">
3039  <iref primary="true" item="Connection header field" x:for-anchor=""/>
3040  <iref primary="true" item="Header Fields" subitem="Connection" x:for-anchor=""/>
3041  <x:anchor-alias value="Connection"/>
3042  <x:anchor-alias value="connection-token"/>
3044   The "Connection" header field allows the sender to specify
3045   options that are desired only for that particular connection.
3046   Such connection options &MUST; be removed or replaced before the
3047   message can be forwarded downstream by a proxy or gateway.
3048   This mechanism also allows the sender to indicate which HTTP
3049   header fields used in the message are only intended for the
3050   immediate recipient ("hop-by-hop"), as opposed to all recipients
3051   on the chain ("end-to-end"), enabling the message to be
3052   self-descriptive and allowing future connection-specific extensions
3053   to be deployed in HTTP without fear that they will be blindly
3054   forwarded by previously deployed intermediaries.
3057   The Connection header field's value has the following grammar:
3059<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Connection"/><iref primary="true" item="Grammar" subitem="connection-token"/>
3060  <x:ref>Connection</x:ref>       = 1#<x:ref>connection-token</x:ref>
3061  <x:ref>connection-token</x:ref> = <x:ref>token</x:ref>
3064   A proxy or gateway &MUST; parse a received Connection
3065   header field before a message is forwarded and, for each
3066   connection-token in this field, remove any header field(s) from
3067   the message with the same name as the connection-token, and then
3068   remove the Connection header field itself or replace it with the
3069   sender's own connection options for the forwarded message.
3072   A sender &MUST-NOT; include field-names in the Connection header
3073   field-value for fields that are defined as expressing constraints
3074   for all recipients in the request or response chain, such as the
3075   Cache-Control header field (&header-cache-control;).
3078   The connection options do not have to correspond to a header field
3079   present in the message, since a connection-specific header field
3080   might not be needed if there are no parameters associated with that
3081   connection option.  Recipients that trigger certain connection
3082   behavior based on the presence of connection options &MUST; do so
3083   based on the presence of the connection-token rather than only the
3084   presence of the optional header field.  In other words, if the
3085   connection option is received as a header field but not indicated
3086   within the Connection field-value, then the recipient &MUST; ignore
3087   the connection-specific header field because it has likely been
3088   forwarded by an intermediary that is only partially compliant.
3091   When defining new connection options, specifications ought to
3092   carefully consider existing deployed header fields and ensure
3093   that the new connection-token does not share the same name as
3094   an unrelated header field that might already be deployed.
3095   Defining a new connection-token essentially reserves that potential
3096   field-name for carrying additional information related to the
3097   connection option, since it would be unwise for senders to use
3098   that field-name for anything else.
3101   HTTP/1.1 defines the "close" connection option for the sender to
3102   signal that the connection will be closed after completion of the
3103   response. For example,
3105<figure><artwork type="example">
3106  Connection: close
3109   in either the request or the response header fields indicates that
3110   the connection &SHOULD-NOT;  be considered "persistent" (<xref target="persistent.connections"/>)
3111   after the current request/response is complete.
3114   An HTTP/1.1 client that does not support persistent connections &MUST;
3115   include the "close" connection option in every request message.
3118   An HTTP/1.1 server that does not support persistent connections &MUST;
3119   include the "close" connection option in every response message that
3120   does not have a 1xx (Informational) status code.
3124<section title="Content-Length" anchor="header.content-length">
3125  <iref primary="true" item="Content-Length header field" x:for-anchor=""/>
3126  <iref primary="true" item="Header Fields" subitem="Content-Length" x:for-anchor=""/>
3127  <x:anchor-alias value="Content-Length"/>
3129   The "Content-Length" header field indicates the size of the
3130   message-body, in decimal number of octets, for any message other than
3131   a response to a HEAD request or a response with a status code of 304.
3132   In the case of a response to a HEAD request, Content-Length indicates
3133   the size of the payload body (not including any potential transfer-coding)
3134   that would have been sent had the request been a GET.
3135   In the case of a 304 (Not Modified) response to a GET request,
3136   Content-Length indicates the size of the payload body (not including
3137   any potential transfer-coding) that would have been sent in a 200 (OK)
3138   response.
3140<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Content-Length"/>
3141  <x:ref>Content-Length</x:ref> = 1*<x:ref>DIGIT</x:ref>
3144   An example is
3146<figure><artwork type="example">
3147  Content-Length: 3495
3150   Implementations &SHOULD; use this field to indicate the message-body
3151   length when no transfer-coding is being applied and the
3152   payload's body length can be determined prior to being transferred.
3153   <xref target="message.body"/> describes how recipients determine the length
3154   of a message-body.
3157   Any Content-Length greater than or equal to zero is a valid value.
3160   Note that the use of this field in HTTP is significantly different from
3161   the corresponding definition in MIME, where it is an optional field
3162   used within the "message/external-body" content-type.
3166<section title="Date" anchor="">
3167  <iref primary="true" item="Date header field" x:for-anchor=""/>
3168  <iref primary="true" item="Header Fields" subitem="Date" x:for-anchor=""/>
3169  <x:anchor-alias value="Date"/>
3171   The "Date" header field represents the date and time at which
3172   the message was originated, having the same semantics as the Origination
3173   Date Field (orig-date) defined in <xref target="RFC5322" x:fmt="of" x:sec="3.6.1"/>.
3174   The field value is an HTTP-date, as described in <xref target=""/>;
3175   it &MUST; be sent in rfc1123-date format.
3177<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Date"/>
3178  <x:ref>Date</x:ref> = <x:ref>HTTP-date</x:ref>
3181   An example is
3183<figure><artwork type="example">
3184  Date: Tue, 15 Nov 1994 08:12:31 GMT
3187   Origin servers &MUST; include a Date header field in all responses,
3188   except in these cases:
3189  <list style="numbers">
3190      <t>If the response status code is 100 (Continue) or 101 (Switching
3191         Protocols), the response &MAY; include a Date header field, at
3192         the server's option.</t>
3194      <t>If the response status code conveys a server error, e.g., 500
3195         (Internal Server Error) or 503 (Service Unavailable), and it is
3196         inconvenient or impossible to generate a valid Date.</t>
3198      <t>If the server does not have a clock that can provide a
3199         reasonable approximation of the current time, its responses
3200         &MUST-NOT; include a Date header field. In this case, the rules
3201         in <xref target="clockless.origin.server.operation"/> &MUST; be followed.</t>
3202  </list>
3205   A received message that does not have a Date header field &MUST; be
3206   assigned one by the recipient if the message will be cached by that
3207   recipient.
3210   Clients can use the Date header field as well; in order to keep request
3211   messages small, they are advised not to include it when it doesn't convey
3212   any useful information (as it is usually the case for requests that do not
3213   contain a payload).
3216   The HTTP-date sent in a Date header field &SHOULD-NOT;  represent a date and
3217   time subsequent to the generation of the message. It &SHOULD; represent
3218   the best available approximation of the date and time of message
3219   generation, unless the implementation has no means of generating a
3220   reasonably accurate date and time. In theory, the date ought to
3221   represent the moment just before the payload is generated. In
3222   practice, the date can be generated at any time during the message
3223   origination without affecting its semantic value.
3226<section title="Clockless Origin Server Operation" anchor="clockless.origin.server.operation">
3228   Some origin server implementations might not have a clock available.
3229   An origin server without a clock &MUST-NOT; assign Expires or Last-Modified
3230   values to a response, unless these values were associated
3231   with the resource by a system or user with a reliable clock. It &MAY;
3232   assign an Expires value that is known, at or before server
3233   configuration time, to be in the past (this allows "pre-expiration"
3234   of responses without storing separate Expires values for each
3235   resource).
3240<section title="Host" anchor="">
3241  <iref primary="true" item="Host header field" x:for-anchor=""/>
3242  <iref primary="true" item="Header Fields" subitem="Host" x:for-anchor=""/>
3243  <x:anchor-alias value="Host"/>
3245   The "Host" header field in a request provides the host and port
3246   information from the target resource's URI, enabling the origin
3247   server to distinguish between resources while servicing requests
3248   for multiple host names on a single IP address.  Since the Host
3249   field-value is critical information for handling a request, it
3250   &SHOULD; be sent as the first header field following the Request-Line.
3252<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Host"/>
3253  <x:ref>Host</x:ref> = <x:ref>uri-host</x:ref> [ ":" <x:ref>port</x:ref> ] ; <xref target="http.uri"/>
3256   A client &MUST; send a Host header field in all HTTP/1.1 request
3257   messages.  If the target resource's URI includes an authority
3258   component, then the Host field-value &MUST; be identical to that
3259   authority component after excluding any userinfo (<xref target="http.uri"/>).
3260   If the authority component is missing or undefined for the target
3261   resource's URI, then the Host header field &MUST; be sent with an
3262   empty field-value.
3265   For example, a GET request to the origin server for
3266   &lt;; would begin with:
3268<figure><artwork type="message/http; msgtype=&#34;request&#34;" x:indent-with="  ">
3269GET /pub/WWW/ HTTP/1.1
3273   The Host header field &MUST; be sent in an HTTP/1.1 request even
3274   if the request-target is in the form of an absolute-URI, since this
3275   allows the Host information to be forwarded through ancient HTTP/1.0
3276   proxies that might not have implemented Host.
3279   When an HTTP/1.1 proxy receives a request with a request-target in
3280   the form of an absolute-URI, the proxy &MUST; ignore the received
3281   Host header field (if any) and instead replace it with the host
3282   information of the request-target.  When a proxy forwards a request,
3283   it &MUST; generate the Host header field based on the received
3284   absolute-URI rather than the received Host.
3287   Since the Host header field acts as an application-level routing
3288   mechanism, it is a frequent target for malware seeking to poison
3289   a shared cache or redirect a request to an unintended server.
3290   An interception proxy is particularly vulnerable if it relies on
3291   the Host header field value for redirecting requests to internal
3292   servers, or for use as a cache key in a shared cache, without
3293   first verifying that the intercepted connection is targeting a
3294   valid IP address for that host.
3297   A server &MUST; respond with a 400 (Bad Request) status code to
3298   any HTTP/1.1 request message that lacks a Host header field and
3299   to any request message that contains more than one Host header field
3300   or a Host header field with an invalid field-value.
3303   See Sections <xref target="" format="counter"/>
3304   and <xref target="" format="counter"/>
3305   for other requirements relating to Host.
3309<section title="TE" anchor="header.te">
3310  <iref primary="true" item="TE header field" x:for-anchor=""/>
3311  <iref primary="true" item="Header Fields" subitem="TE" x:for-anchor=""/>
3312  <x:anchor-alias value="TE"/>
3313  <x:anchor-alias value="t-codings"/>
3314  <x:anchor-alias value="te-params"/>
3315  <x:anchor-alias value="te-ext"/>
3317   The "TE" header field indicates what extension transfer-codings
3318   it is willing to accept in the response, and whether or not it is
3319   willing to accept trailer fields in a chunked transfer-coding.
3322   Its value consists of the keyword "trailers" and/or a comma-separated
3323   list of extension transfer-coding names with optional accept
3324   parameters (as described in <xref target="transfer.codings"/>).
3326<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="TE"/><iref primary="true" item="Grammar" subitem="t-codings"/><iref primary="true" item="Grammar" subitem="te-params"/><iref primary="true" item="Grammar" subitem="te-ext"/>
3327  <x:ref>TE</x:ref>        = #<x:ref>t-codings</x:ref>
3328  <x:ref>t-codings</x:ref> = "trailers" / ( <x:ref>transfer-extension</x:ref> [ <x:ref>te-params</x:ref> ] )
3329  <x:ref>te-params</x:ref> = <x:ref>OWS</x:ref> ";" <x:ref>OWS</x:ref> "q=" <x:ref>qvalue</x:ref> *( <x:ref>te-ext</x:ref> )
3330  <x:ref>te-ext</x:ref>    = <x:ref>OWS</x:ref> ";" <x:ref>OWS</x:ref> <x:ref>token</x:ref> [ "=" <x:ref>word</x:ref> ]
3333   The presence of the keyword "trailers" indicates that the client is
3334   willing to accept trailer fields in a chunked transfer-coding, as
3335   defined in <xref target="chunked.encoding"/>. This keyword is reserved for use with
3336   transfer-coding values even though it does not itself represent a
3337   transfer-coding.
3340   Examples of its use are:
3342<figure><artwork type="example">
3343  TE: deflate
3344  TE:
3345  TE: trailers, deflate;q=0.5
3348   The TE header field only applies to the immediate connection.
3349   Therefore, the keyword &MUST; be supplied within a Connection header
3350   field (<xref target="header.connection"/>) whenever TE is present in an HTTP/1.1 message.
3353   A server tests whether a transfer-coding is acceptable, according to
3354   a TE field, using these rules:
3355  <list style="numbers">
3356    <x:lt>
3357      <t>The "chunked" transfer-coding is always acceptable. If the
3358         keyword "trailers" is listed, the client indicates that it is
3359         willing to accept trailer fields in the chunked response on
3360         behalf of itself and any downstream clients. The implication is
3361         that, if given, the client is stating that either all
3362         downstream clients are willing to accept trailer fields in the
3363         forwarded response, or that it will attempt to buffer the
3364         response on behalf of downstream recipients.
3365      </t><t>
3366         <x:h>Note:</x:h> HTTP/1.1 does not define any means to limit the size of a
3367         chunked response such that a client can be assured of buffering
3368         the entire response.</t>
3369    </x:lt>
3370    <x:lt>
3371      <t>If the transfer-coding being tested is one of the transfer-codings
3372         listed in the TE field, then it is acceptable unless it
3373         is accompanied by a qvalue of 0. (As defined in <xref target="quality.values"/>, a
3374         qvalue of 0 means "not acceptable".)</t>
3375    </x:lt>
3376    <x:lt>
3377      <t>If multiple transfer-codings are acceptable, then the
3378         acceptable transfer-coding with the highest non-zero qvalue is
3379         preferred.  The "chunked" transfer-coding always has a qvalue
3380         of 1.</t>
3381    </x:lt>
3382  </list>
3385   If the TE field-value is empty or if no TE field is present, the only
3386   transfer-coding is "chunked". A message with no transfer-coding is
3387   always acceptable.
3391<section title="Trailer" anchor="header.trailer">
3392  <iref primary="true" item="Trailer header field" x:for-anchor=""/>
3393  <iref primary="true" item="Header Fields" subitem="Trailer" x:for-anchor=""/>
3394  <x:anchor-alias value="Trailer"/>
3396   The "Trailer" header field indicates that the given set of
3397   header fields is present in the trailer of a message encoded with
3398   chunked transfer-coding.
3400<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Trailer"/>
3401  <x:ref>Trailer</x:ref> = 1#<x:ref>field-name</x:ref>
3404   An HTTP/1.1 message &SHOULD; include a Trailer header field in a
3405   message using chunked transfer-coding with a non-empty trailer. Doing
3406   so allows the recipient to know which header fields to expect in the
3407   trailer.
3410   If no Trailer header field is present, the trailer &SHOULD-NOT;  include
3411   any header fields. See <xref target="chunked.encoding"/> for restrictions on the use of
3412   trailer fields in a "chunked" transfer-coding.
3415   Message header fields listed in the Trailer header field &MUST-NOT;
3416   include the following header fields:
3417  <list style="symbols">
3418    <t>Transfer-Encoding</t>
3419    <t>Content-Length</t>
3420    <t>Trailer</t>
3421  </list>
3425<section title="Transfer-Encoding" anchor="header.transfer-encoding">
3426  <iref primary="true" item="Transfer-Encoding header field" x:for-anchor=""/>
3427  <iref primary="true" item="Header Fields" subitem="Transfer-Encoding" x:for-anchor=""/>
3428  <x:anchor-alias value="Transfer-Encoding"/>
3430   The "Transfer-Encoding" header field indicates what transfer-codings
3431   (if any) have been applied to the message body. It differs from
3432   Content-Encoding (&content-codings;) in that transfer-codings are a property
3433   of the message (and therefore are removed by intermediaries), whereas
3434   content-codings are not.
3436<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Transfer-Encoding"/>
3437  <x:ref>Transfer-Encoding</x:ref> = 1#<x:ref>transfer-coding</x:ref>
3440   Transfer-codings are defined in <xref target="transfer.codings"/>. An example is:
3442<figure><artwork type="example">
3443  Transfer-Encoding: chunked
3446   If multiple encodings have been applied to a representation, the transfer-codings
3447   &MUST; be listed in the order in which they were applied.
3448   Additional information about the encoding parameters &MAY; be provided
3449   by other header fields not defined by this specification.
3452   Many older HTTP/1.0 applications do not understand the Transfer-Encoding
3453   header field.
3457<section title="Upgrade" anchor="header.upgrade">
3458  <iref primary="true" item="Upgrade header field" x:for-anchor=""/>
3459  <iref primary="true" item="Header Fields" subitem="Upgrade" x:for-anchor=""/>
3460  <x:anchor-alias value="Upgrade"/>
3462   The "Upgrade" header field allows the client to specify what
3463   additional communication protocols it would like to use, if the server
3464   chooses to switch protocols. Servers can use it to indicate what protocols
3465   they are willing to switch to.
3467<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Upgrade"/>
3468  <x:ref>Upgrade</x:ref> = 1#<x:ref>product</x:ref>
3471   For example,
3473<figure><artwork type="example">
3474  Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11
3477   The Upgrade header field is intended to provide a simple mechanism
3478   for transition from HTTP/1.1 to some other, incompatible protocol. It
3479   does so by allowing the client to advertise its desire to use another
3480   protocol, such as a later version of HTTP with a higher major version
3481   number, even though the current request has been made using HTTP/1.1.
3482   This eases the difficult transition between incompatible protocols by
3483   allowing the client to initiate a request in the more commonly
3484   supported protocol while indicating to the server that it would like
3485   to use a "better" protocol if available (where "better" is determined
3486   by the server, possibly according to the nature of the request method
3487   or target resource).
3490   The Upgrade header field only applies to switching application-layer
3491   protocols upon the existing transport-layer connection. Upgrade
3492   cannot be used to insist on a protocol change; its acceptance and use
3493   by the server is optional. The capabilities and nature of the
3494   application-layer communication after the protocol change is entirely
3495   dependent upon the new protocol chosen, although the first action
3496   after changing the protocol &MUST; be a response to the initial HTTP
3497   request containing the Upgrade header field.
3500   The Upgrade header field only applies to the immediate connection.
3501   Therefore, the upgrade keyword &MUST; be supplied within a Connection
3502   header field (<xref target="header.connection"/>) whenever Upgrade is present in an
3503   HTTP/1.1 message.
3506   The Upgrade header field cannot be used to indicate a switch to a
3507   protocol on a different connection. For that purpose, it is more
3508   appropriate to use a 3xx redirection response (&status-3xx;).
3511   Servers &MUST; include the "Upgrade" header field in 101 (Switching
3512   Protocols) responses to indicate which protocol(s) are being switched to,
3513   and &MUST; include it in 426 (Upgrade Required) responses to indicate
3514   acceptable protocols to upgrade to. Servers &MAY; include it in any other
3515   response to indicate that they are willing to upgrade to one of the
3516   specified protocols.
3519   This specification only defines the protocol name "HTTP" for use by
3520   the family of Hypertext Transfer Protocols, as defined by the HTTP
3521   version rules of <xref target="http.version"/> and future updates to this
3522   specification. Additional tokens can be registered with IANA using the
3523   registration procedure defined below. 
3526<section title="Upgrade Token Registry" anchor="upgrade.token.registry">
3528   The HTTP Upgrade Token Registry defines the name space for product
3529   tokens used to identify protocols in the Upgrade header field.
3530   Each registered token is associated with contact information and
3531   an optional set of specifications that details how the connection
3532   will be processed after it has been upgraded.
3535   Registrations are allowed on a First Come First Served basis as
3536   described in <xref target="RFC5226" x:sec="4.1" x:fmt="of"/>. The
3537   specifications need not be IETF documents or be subject to IESG review.
3538   Registrations are subject to the following rules:
3539  <list style="numbers">
3540    <t>A token, once registered, stays registered forever.</t>
3541    <t>The registration &MUST; name a responsible party for the
3542       registration.</t>
3543    <t>The registration &MUST; name a point of contact.</t>
3544    <t>The registration &MAY; name a set of specifications associated with that
3545       token. Such specifications need not be publicly available.</t>
3546    <t>The responsible party &MAY; change the registration at any time.
3547       The IANA will keep a record of all such changes, and make them
3548       available upon request.</t>
3549    <t>The responsible party for the first registration of a "product"
3550       token &MUST; approve later registrations of a "version" token
3551       together with that "product" token before they can be registered.</t>
3552    <t>If absolutely required, the IESG &MAY; reassign the responsibility
3553       for a token. This will normally only be used in the case when a
3554       responsible party cannot be contacted.</t>
3555  </list>
3562<section title="Via" anchor="header.via">
3563  <iref primary="true" item="Via header field" x:for-anchor=""/>
3564  <iref primary="true" item="Header Fields" subitem="Via" x:for-anchor=""/>
3565  <x:anchor-alias value="protocol-name"/>
3566  <x:anchor-alias value="protocol-version"/>
3567  <x:anchor-alias value="pseudonym"/>
3568  <x:anchor-alias value="received-by"/>
3569  <x:anchor-alias value="received-protocol"/>
3570  <x:anchor-alias value="Via"/>
3572   The "Via" header field &MUST; be sent by a proxy or gateway to
3573   indicate the intermediate protocols and recipients between the user
3574   agent and the server on requests, and between the origin server and
3575   the client on responses. It is analogous to the "Received" field
3576   used by email systems (<xref target="RFC5322" x:fmt="of" x:sec="3.6.7"/>)
3577   and is intended to be used for tracking message forwards,
3578   avoiding request loops, and identifying the protocol capabilities of
3579   all senders along the request/response chain.
3581<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Via"/><iref primary="true" item="Grammar" subitem="received-protocol"/><iref primary="true" item="Grammar" subitem="protocol-name"/><iref primary="true" item="Grammar" subitem="protocol-version"/><iref primary="true" item="Grammar" subitem="received-by"/><iref primary="true" item="Grammar" subitem="pseudonym"/>
3582  <x:ref>Via</x:ref>               = 1#( <x:ref>received-protocol</x:ref> <x:ref>RWS</x:ref> <x:ref>received-by</x:ref>
3583                          [ <x:ref>RWS</x:ref> <x:ref>comment</x:ref> ] )
3584  <x:ref>received-protocol</x:ref> = [ <x:ref>protocol-name</x:ref> "/" ] <x:ref>protocol-version</x:ref>
3585  <x:ref>protocol-name</x:ref>     = <x:ref>token</x:ref>
3586  <x:ref>protocol-version</x:ref>  = <x:ref>token</x:ref>
3587  <x:ref>received-by</x:ref>       = ( <x:ref>uri-host</x:ref> [ ":" <x:ref>port</x:ref> ] ) / <x:ref>pseudonym</x:ref>
3588  <x:ref>pseudonym</x:ref>         = <x:ref>token</x:ref>
3591   The received-protocol indicates the protocol version of the message
3592   received by the server or client along each segment of the
3593   request/response chain. The received-protocol version is appended to
3594   the Via field value when the message is forwarded so that information
3595   about the protocol capabilities of upstream applications remains
3596   visible to all recipients.
3599   The protocol-name is excluded if and only if it would be "HTTP". The
3600   received-by field is normally the host and optional port number of a
3601   recipient server or client that subsequently forwarded the message.
3602   However, if the real host is considered to be sensitive information,
3603   it &MAY; be replaced by a pseudonym. If the port is not given, it &MAY;
3604   be assumed to be the default port of the received-protocol.
3607   Multiple Via field values represent each proxy or gateway that has
3608   forwarded the message. Each recipient &MUST; append its information
3609   such that the end result is ordered according to the sequence of
3610   forwarding applications.
3613   Comments &MAY; be used in the Via header field to identify the software
3614   of each recipient, analogous to the User-Agent and Server header fields.
3615   However, all comments in the Via field are optional and &MAY; be removed
3616   by any recipient prior to forwarding the message.
3619   For example, a request message could be sent from an HTTP/1.0 user
3620   agent to an internal proxy code-named "fred", which uses HTTP/1.1 to
3621   forward the request to a public proxy at, which completes
3622   the request by forwarding it to the origin server at
3623   The request received by would then have the following
3624   Via header field:
3626<figure><artwork type="example">
3627  Via: 1.0 fred, 1.1 (Apache/1.1)
3630   A proxy or gateway used as a portal through a network firewall
3631   &SHOULD-NOT; forward the names and ports of hosts within the firewall
3632   region unless it is explicitly enabled to do so. If not enabled, the
3633   received-by host of any host behind the firewall &SHOULD; be replaced
3634   by an appropriate pseudonym for that host.
3637   For organizations that have strong privacy requirements for hiding
3638   internal structures, a proxy or gateway &MAY; combine an ordered
3639   subsequence of Via header field entries with identical received-protocol
3640   values into a single such entry. For example,
3642<figure><artwork type="example">
3643  Via: 1.0 ricky, 1.1 ethel, 1.1 fred, 1.0 lucy
3646  could be collapsed to
3648<figure><artwork type="example">
3649  Via: 1.0 ricky, 1.1 mertz, 1.0 lucy
3652   Senders &SHOULD-NOT; combine multiple entries unless they are all
3653   under the same organizational control and the hosts have already been
3654   replaced by pseudonyms. Senders &MUST-NOT; combine entries which
3655   have different received-protocol values.
3661<section title="IANA Considerations" anchor="IANA.considerations">
3663<section title="Header Field Registration" anchor="header.field.registration">
3665   The Message Header Field Registry located at <eref target=""/> shall be updated
3666   with the permanent registrations below (see <xref target="RFC3864"/>):
3668<?BEGININC p1-messaging.iana-headers ?>
3669<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
3670<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
3671   <ttcol>Header Field Name</ttcol>
3672   <ttcol>Protocol</ttcol>
3673   <ttcol>Status</ttcol>
3674   <ttcol>Reference</ttcol>
3676   <c>Connection</c>
3677   <c>http</c>
3678   <c>standard</c>
3679   <c>
3680      <xref target="header.connection"/>
3681   </c>
3682   <c>Content-Length</c>
3683   <c>http</c>
3684   <c>standard</c>
3685   <c>
3686      <xref target="header.content-length"/>
3687   </c>
3688   <c>Date</c>
3689   <c>http</c>
3690   <c>standard</c>
3691   <c>
3692      <xref target=""/>
3693   </c>
3694   <c>Host</c>
3695   <c>http</c>
3696   <c>standard</c>
3697   <c>
3698      <xref target=""/>
3699   </c>
3700   <c>TE</c>
3701   <c>http</c>
3702   <c>standard</c>
3703   <c>
3704      <xref target="header.te"/>
3705   </c>
3706   <c>Trailer</c>
3707   <c>http</c>
3708   <c>standard</c>
3709   <c>
3710      <xref target="header.trailer"/>
3711   </c>
3712   <c>Transfer-Encoding</c>
3713   <c>http</c>
3714   <c>standard</c>
3715   <c>
3716      <xref target="header.transfer-encoding"/>
3717   </c>
3718   <c>Upgrade</c>
3719   <c>http</c>
3720   <c>standard</c>
3721   <c>
3722      <xref target="header.upgrade"/>
3723   </c>
3724   <c>Via</c>
3725   <c>http</c>
3726   <c>standard</c>
3727   <c>
3728      <xref target="header.via"/>
3729   </c>
3732<?ENDINC p1-messaging.iana-headers ?>
3734   Furthermore, the header field name "Close" shall be registered as "reserved", as its use as
3735   HTTP header field would be in conflict with the use of the "close" connection
3736   option for the "Connection" header field (<xref target="header.connection"/>).
3738<texttable align="left" suppress-title="true">
3739   <ttcol>Header Field Name</ttcol>
3740   <ttcol>Protocol</ttcol>
3741   <ttcol>Status</ttcol>
3742   <ttcol>Reference</ttcol>
3744   <c>Close</c>
3745   <c>http</c>
3746   <c>reserved</c>
3747   <c>
3748      <xref target="header.field.registration"/>
3749   </c>
3752   The change controller is: "IETF ( - Internet Engineering Task Force".
3756<section title="URI Scheme Registration" anchor="uri.scheme.registration">
3758   The entries for the "http" and "https" URI Schemes in the registry located at
3759   <eref target=""/>
3760   shall be updated to point to Sections <xref target="http.uri" format="counter"/>
3761   and <xref target="https.uri" format="counter"/> of this document
3762   (see <xref target="RFC4395"/>).
3766<section title="Internet Media Type Registrations" anchor="">
3768   This document serves as the specification for the Internet media types
3769   "message/http" and "application/http". The following is to be registered with
3770   IANA (see <xref target="RFC4288"/>).
3772<section title="Internet Media Type message/http" anchor="">
3773<iref item="Media Type" subitem="message/http" primary="true"/>
3774<iref item="message/http Media Type" primary="true"/>
3776   The message/http type can be used to enclose a single HTTP request or
3777   response message, provided that it obeys the MIME restrictions for all
3778   "message" types regarding line length and encodings.
3781  <list style="hanging" x:indent="12em">
3782    <t hangText="Type name:">
3783      message
3784    </t>
3785    <t hangText="Subtype name:">
3786      http
3787    </t>
3788    <t hangText="Required parameters:">
3789      none
3790    </t>
3791    <t hangText="Optional parameters:">
3792      version, msgtype
3793      <list style="hanging">
3794        <t hangText="version:">
3795          The HTTP-Version number of the enclosed message
3796          (e.g., "1.1"). If not present, the version can be
3797          determined from the first line of the body.
3798        </t>
3799        <t hangText="msgtype:">
3800          The message type &mdash; "request" or "response". If not
3801          present, the type can be determined from the first
3802          line of the body.
3803        </t>
3804      </list>
3805    </t>
3806    <t hangText="Encoding considerations:">
3807      only "7bit", "8bit", or "binary" are permitted
3808    </t>
3809    <t hangText="Security considerations:">
3810      none
3811    </t>
3812    <t hangText="Interoperability considerations:">
3813      none
3814    </t>
3815    <t hangText="Published specification:">
3816      This specification (see <xref target=""/>).
3817    </t>
3818    <t hangText="Applications that use this media type:">
3819    </t>
3820    <t hangText="Additional information:">
3821      <list style="hanging">
3822        <t hangText="Magic number(s):">none</t>
3823        <t hangText="File extension(s):">none</t>
3824        <t hangText="Macintosh file type code(s):">none</t>
3825      </list>
3826    </t>
3827    <t hangText="Person and email address to contact for further information:">
3828      See Authors Section.
3829    </t>
3830    <t hangText="Intended usage:">
3831      COMMON
3832    </t>
3833    <t hangText="Restrictions on usage:">
3834      none
3835    </t>
3836    <t hangText="Author/Change controller:">
3837      IESG
3838    </t>
3839  </list>
3842<section title="Internet Media Type application/http" anchor="">
3843<iref item="Media Type" subitem="application/http" primary="true"/>
3844<iref item="application/http Media Type" primary="true"/>
3846   The application/http type can be used to enclose a pipeline of one or more
3847   HTTP request or response messages (not intermixed).
3850  <list style="hanging" x:indent="12em">
3851    <t hangText="Type name:">
3852      application
3853    </t>
3854    <t hangText="Subtype name:">
3855      http
3856    </t>
3857    <t hangText="Required parameters:">
3858      none
3859    </t>
3860    <t hangText="Optional parameters:">
3861      version, msgtype
3862      <list style="hanging">
3863        <t hangText="version:">
3864          The HTTP-Version number of the enclosed messages
3865          (e.g., "1.1"). If not present, the version can be
3866          determined from the first line of the body.
3867        </t>
3868        <t hangText="msgtype:">
3869          The message type &mdash; "request" or "response". If not
3870          present, the type can be determined from the first
3871          line of the body.
3872        </t>
3873      </list>
3874    </t>
3875    <t hangText="Encoding considerations:">
3876      HTTP messages enclosed by this type
3877      are in "binary" format; use of an appropriate
3878      Content-Transfer-Encoding is required when
3879      transmitted via E-mail.
3880    </t>
3881    <t hangText="Security considerations:">
3882      none
3883    </t>
3884    <t hangText="Interoperability considerations:">
3885      none
3886    </t>
3887    <t hangText="Published specification:">
3888      This specification (see <xref target=""/>).
3889    </t>
3890    <t hangText="Applications that use this media type:">
3891    </t>
3892    <t hangText="Additional information:">
3893      <list style="hanging">
3894        <t hangText="Magic number(s):">none</t>
3895        <t hangText="File extension(s):">none</t>
3896        <t hangText="Macintosh file type code(s):">none</t>
3897      </list>
3898    </t>
3899    <t hangText="Person and email address to contact for further information:">
3900      See Authors Section.
3901    </t>
3902    <t hangText="Intended usage:">
3903      COMMON
3904    </t>
3905    <t hangText="Restrictions on usage:">
3906      none
3907    </t>
3908    <t hangText="Author/Change controller:">
3909      IESG
3910    </t>
3911  </list>
3916<section title="Transfer Coding Registry" anchor="transfer.coding.registration">
3918   The registration procedure for HTTP Transfer Codings is now defined by
3919   <xref target="transfer.coding.registry"/> of this document.
3922   The HTTP Transfer Codings Registry located at <eref target=""/>
3923   shall be updated with the registrations below:
3925<texttable align="left" suppress-title="true" anchor="iana.transfer.coding.registration.table">
3926   <ttcol>Name</ttcol>
3927   <ttcol>Description</ttcol>
3928   <ttcol>Reference</ttcol>
3929   <c>chunked</c>
3930   <c>Transfer in a series of chunks</c>
3931   <c>
3932      <xref target="chunked.encoding"/>
3933   </c>
3934   <c>compress</c>
3935   <c>UNIX "compress" program method</c>
3936   <c>
3937      <xref target="compress.coding"/>
3938   </c>
3939   <c>deflate</c>
3940   <c>"deflate" compression mechanism (<xref target="RFC1951"/>) used inside
3941   the "zlib" data format (<xref target="RFC1950"/>)
3942   </c>
3943   <c>
3944      <xref target="deflate.coding"/>
3945   </c>
3946   <c>gzip</c>
3947   <c>Same as GNU zip <xref target="RFC1952"/></c>
3948   <c>
3949      <xref target="gzip.coding"/>
3950   </c>
3954<section title="Upgrade Token Registration" anchor="upgrade.token.registration">
3956   The registration procedure for HTTP Upgrade Tokens &mdash; previously defined
3957   in <xref target="RFC2817" x:fmt="of" x:sec="7.2"/> &mdash; is now defined
3958   by <xref target="upgrade.token.registry"/> of this document.
3961   The HTTP Status Code Registry located at <eref target=""/>
3962   shall be updated with the registration below:
3964<texttable align="left" suppress-title="true">
3965   <ttcol>Value</ttcol>
3966   <ttcol>Description</ttcol>
3967   <ttcol>Reference</ttcol>
3969   <c>HTTP</c>
3970   <c>Hypertext Transfer Protocol</c>
3971   <c><xref target="http.version"/> of this specification</c>
3978<section title="Security Considerations" anchor="security.considerations">
3980   This section is meant to inform application developers, information
3981   providers, and users of the security limitations in HTTP/1.1 as
3982   described by this document. The discussion does not include
3983   definitive solutions to the problems revealed, though it does make
3984   some suggestions for reducing security risks.
3987<section title="Personal Information" anchor="personal.information">
3989   HTTP clients are often privy to large amounts of personal information
3990   (e.g., the user's name, location, mail address, passwords, encryption
3991   keys, etc.), and &SHOULD; be very careful to prevent unintentional
3992   leakage of this information.
3993   We very strongly recommend that a convenient interface be provided
3994   for the user to control dissemination of such information, and that
3995   designers and implementors be particularly careful in this area.
3996   History shows that errors in this area often create serious security
3997   and/or privacy problems and generate highly adverse publicity for the
3998   implementor's company.
4002<section title="Abuse of Server Log Information" anchor="abuse.of.server.log.information">
4004   A server is in the position to save personal data about a user's
4005   requests which might identify their reading patterns or subjects of
4006   interest. This information is clearly confidential in nature and its
4007   handling can be constrained by law in certain countries. People using
4008   HTTP to provide data are responsible for ensuring that
4009   such material is not distributed without the permission of any
4010   individuals that are identifiable by the published results.
4014<section title="Attacks Based On File and Path Names" anchor="attack.pathname">
4016   Implementations of HTTP origin servers &SHOULD; be careful to restrict
4017   the documents returned by HTTP requests to be only those that were
4018   intended by the server administrators. If an HTTP server translates
4019   HTTP URIs directly into file system calls, the server &MUST; take
4020   special care not to serve files that were not intended to be
4021   delivered to HTTP clients. For example, UNIX, Microsoft Windows, and
4022   other operating systems use ".." as a path component to indicate a
4023   directory level above the current one. On such a system, an HTTP
4024   server &MUST; disallow any such construct in the request-target if it
4025   would otherwise allow access to a resource outside those intended to
4026   be accessible via the HTTP server. Similarly, files intended for
4027   reference only internally to the server (such as access control
4028   files, configuration files, and script code) &MUST; be protected from
4029   inappropriate retrieval, since they might contain sensitive
4030   information. Experience has shown that minor bugs in such HTTP server
4031   implementations have turned into security risks.
4035<section title="DNS-related Attacks" anchor="dns.related.attacks">
4037   HTTP clients rely heavily on the Domain Name Service (DNS), and are thus
4038   generally prone to security attacks based on the deliberate misassociation
4039   of IP addresses and DNS names not protected by DNSSec. Clients need to be
4040   cautious in assuming the validity of an IP number/DNS name association unless
4041   the response is protected by DNSSec (<xref target="RFC4033"/>).
4045<section title="Proxies and Caching" anchor="attack.proxies">
4047   By their very nature, HTTP proxies are men-in-the-middle, and
4048   represent an opportunity for man-in-the-middle attacks. Compromise of
4049   the systems on which the proxies run can result in serious security
4050   and privacy problems. Proxies have access to security-related
4051   information, personal information about individual users and
4052   organizations, and proprietary information belonging to users and
4053   content providers. A compromised proxy, or a proxy implemented or
4054   configured without regard to security and privacy considerations,
4055   might be used in the commission of a wide range of potential attacks.
4058   Proxy operators need to protect the systems on which proxies run as
4059   they would protect any system that contains or transports sensitive
4060   information. In particular, log information gathered at proxies often
4061   contains highly sensitive personal information, and/or information
4062   about organizations. Log information needs to be carefully guarded, and
4063   appropriate guidelines for use need to be developed and followed.
4064   (<xref target="abuse.of.server.log.information"/>).
4067   Proxy implementors need to consider the privacy and security
4068   implications of their design and coding decisions, and of the
4069   configuration options they provide to proxy operators (especially the
4070   default configuration).
4073   Users of a proxy need to be aware that proxies are no trustworthier than
4074   the people who run them; HTTP itself cannot solve this problem.
4077   The judicious use of cryptography, when appropriate, might suffice to
4078   protect against a broad range of security and privacy attacks. Such
4079   cryptography is beyond the scope of the HTTP/1.1 specification.
4083<section title="Protocol Element Size Overflows" anchor="attack.protocol.element.size.overflows">
4085   Because HTTP uses mostly textual, character-delimited fields, attackers can
4086   overflow buffers in implementations, and/or perform a Denial of Service
4087   against implementations that accept fields with unlimited lengths.
4090   To promote interoperability, this specification makes specific
4091   recommendations for size limits on request-targets (<xref target="request-target"/>)
4092   and blocks of header fields (<xref target="header.fields"/>). These are
4093   minimum recommendations, chosen to be supportable even by implementations
4094   with limited resources; it is expected that most implementations will choose
4095   substantially higher limits.
4098   This specification also provides a way for servers to reject messages that
4099   have request-targets that are too long (&status-414;) or request entities
4100   that are too large (&status-4xx;).
4103   Other fields (including but not limited to request methods, response status
4104   phrases, header field-names, and body chunks) &SHOULD; be limited by
4105   implementations carefully, so as to not impede interoperability.
4109<section title="Denial of Service Attacks on Proxies" anchor="attack.DoS">
4111   They exist. They are hard to defend against. Research continues.
4112   Beware.
4117<section title="Acknowledgments" anchor="acks">
4119   This document revision builds on the work that went into
4120   <xref target="RFC2616" format="none">RFC 2616</xref> and its predecessors.
4121   See <xref target="RFC2616" x:fmt="of" x:sec="16"/> for detailed
4122   acknowledgements.
4125  <cref anchor="todoacks">Insert HTTPbis-specific acknowledgements here.</cref>
4129Acknowledgements TODO list
4131- Jeff Hodges ("effective request URI")
4139<references title="Normative References">
4141<reference anchor="ISO-8859-1">
4142  <front>
4143    <title>
4144     Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1
4145    </title>
4146    <author>
4147      <organization>International Organization for Standardization</organization>
4148    </author>
4149    <date year="1998"/>
4150  </front>
4151  <seriesInfo name="ISO/IEC" value="8859-1:1998"/>
4154<reference anchor="Part2">
4155  <front>
4156    <title abbrev="HTTP/1.1">HTTP/1.1, part 2: Message Semantics</title>
4157    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
4158      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
4159      <address><email></email></address>
4160    </author>
4161    <author initials="J." surname="Gettys" fullname="Jim Gettys">
4162      <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
4163      <address><email></email></address>
4164    </author>
4165    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
4166      <organization abbrev="HP">Hewlett-Packard Company</organization>
4167      <address><email></email></address>
4168    </author>
4169    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
4170      <organization abbrev="Microsoft">Microsoft Corporation</organization>
4171      <address><email></email></address>
4172    </author>
4173    <author initials="L." surname="Masinter" fullname="Larry Masinter">
4174      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
4175      <address><email></email></address>
4176    </author>
4177    <author initials="P." surname="Leach" fullname="Paul J. Leach">
4178      <organization abbrev="Microsoft">Microsoft Corporation</organization>
4179      <address><email></email></address>
4180    </author>
4181    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
4182      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
4183      <address><email></email></address>
4184    </author>
4185    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
4186      <organization abbrev="W3C">World Wide Web Consortium</organization>
4187      <address><email></email></address>
4188    </author>
4189    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
4190      <organization abbrev="greenbytes">greenbytes GmbH</organization>
4191      <address><email></email></address>
4192    </author>
4193    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
4194  </front>
4195  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-&ID-VERSION;"/>
4196  <x:source href="p2-semantics.xml" basename="p2-semantics"/>
4199<reference anchor="Part3">
4200  <front>
4201    <title abbrev="HTTP/1.1">HTTP/1.1, part 3: Message Payload and Content Negotiation</title>
4202    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
4203      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
4204      <address><email></email></address>
4205    </author>
4206    <author initials="J." surname="Gettys" fullname="Jim Gettys">
4207      <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
4208      <address><email></email></address>
4209    </author>
4210    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
4211      <organization abbrev="HP">Hewlett-Packard Company</organization>
4212      <address><email></email></address>
4213    </author>
4214    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
4215      <organization abbrev="Microsoft">Microsoft Corporation</organization>
4216      <address><email></email></address>
4217    </author>
4218    <author initials="L." surname="Masinter" fullname="Larry Masinter">
4219      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
4220      <address><email></email></address>
4221    </author>
4222    <author initials="P." surname="Leach" fullname="Paul J. Leach">
4223      <organization abbrev="Microsoft">Microsoft Corporation</organization>
4224      <address><email></email></address>
4225    </author>
4226    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
4227      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
4228      <address><email></email></address>
4229    </author>
4230    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
4231      <organization abbrev="W3C">World Wide Web Consortium</organization>
4232      <address><email></email></address>
4233    </author>
4234    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
4235      <organization abbrev="greenbytes">greenbytes GmbH</organization>
4236      <address><email></email></address>
4237    </author>
4238    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
4239  </front>
4240  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p3-payload-&ID-VERSION;"/>
4241  <x:source href="p3-payload.xml" basename="p3-payload"/>
4244<reference anchor="Part6">
4245  <front>
4246    <title abbrev="HTTP/1.1">HTTP/1.1, part 6: Caching</title>
4247    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
4248      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
4249      <address><email></email></address>
4250    </author>
4251    <author initials="J." surname="Gettys" fullname="Jim Gettys">
4252      <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
4253      <address><email></email></address>
4254    </author>
4255    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
4256      <organization abbrev="HP">Hewlett-Packard Company</organization>
4257      <address><email></email></address>
4258    </author>
4259    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
4260      <organization abbrev="Microsoft">Microsoft Corporation</organization>
4261      <address><email></email></address>
4262    </author>
4263    <author initials="L." surname="Masinter" fullname="Larry Masinter">
4264      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
4265      <address><email></email></address>
4266    </author>
4267    <author initials="P." surname="Leach" fullname="Paul J. Leach">
4268      <organization abbrev="Microsoft">Microsoft Corporation</organization>
4269      <address><email></email></address>
4270    </author>
4271    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
4272      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
4273      <address><email></email></address>
4274    </author>
4275    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
4276      <organization abbrev="W3C">World Wide Web Consortium</organization>
4277      <address><email></email></address>
4278    </author>
4279    <author initials="M." surname="Nottingham" fullname="Mark Nottingham" role="editor">
4280      <address><email></email></address>
4281    </author>
4282    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
4283      <organization abbrev="greenbytes">greenbytes GmbH</organization>
4284      <address><email></email></address>
4285    </author>
4286    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
4287  </front>
4288  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-&ID-VERSION;"/>
4289  <x:source href="p6-cache.xml" basename="p6-cache"/>
4292<reference anchor="RFC5234">
4293  <front>
4294    <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
4295    <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
4296      <organization>Brandenburg InternetWorking</organization>
4297      <address>
4298        <email></email>
4299      </address> 
4300    </author>
4301    <author initials="P." surname="Overell" fullname="Paul Overell">
4302      <organization>THUS plc.</organization>
4303      <address>
4304        <email></email>
4305      </address>
4306    </author>
4307    <date month="January" year="2008"/>
4308  </front>
4309  <seriesInfo name="STD" value="68"/>
4310  <seriesInfo name="RFC" value="5234"/>
4313<reference anchor="RFC2119">
4314  <front>
4315    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
4316    <author initials="S." surname="Bradner" fullname="Scott Bradner">
4317      <organization>Harvard University</organization>
4318      <address><email></email></address>
4319    </author>
4320    <date month="March" year="1997"/>
4321  </front>
4322  <seriesInfo name="BCP" value="14"/>
4323  <seriesInfo name="RFC" value="2119"/>
4326<reference anchor="RFC3986">
4327 <front>
4328  <title abbrev='URI Generic Syntax'>Uniform Resource Identifier (URI): Generic Syntax</title>
4329  <author initials='T.' surname='Berners-Lee' fullname='Tim Berners-Lee'>
4330    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
4331    <address>
4332       <email></email>
4333       <uri></uri>
4334    </address>
4335  </author>
4336  <author initials='R.' surname='Fielding' fullname='Roy T. Fielding'>
4337    <organization abbrev="Day Software">Day Software</organization>
4338    <address>
4339      <email></email>
4340      <uri></uri>
4341    </address>
4342  </author>
4343  <author initials='L.' surname='Masinter' fullname='Larry Masinter'>
4344    <organization abbrev="Adobe Systems">Adobe Systems Incorporated</organization>
4345    <address>
4346      <email></email>
4347      <uri></uri>
4348    </address>
4349  </author>
4350  <date month='January' year='2005'></date>
4351 </front>
4352 <seriesInfo name="STD" value="66"/>
4353 <seriesInfo name="RFC" value="3986"/>
4356<reference anchor="USASCII">
4357  <front>
4358    <title>Coded Character Set -- 7-bit American Standard Code for Information Interchange</title>
4359    <author>
4360      <organization>American National Standards Institute</organization>
4361    </author>
4362    <date year="1986"/>
4363  </front>
4364  <seriesInfo name="ANSI" value="X3.4"/>
4367<reference anchor="RFC1950">
4368  <front>
4369    <title>ZLIB Compressed Data Format Specification version 3.3</title>
4370    <author initials="L.P." surname="Deutsch" fullname="L. Peter Deutsch">
4371      <organization>Aladdin Enterprises</organization>
4372      <address><email></email></address>
4373    </author>
4374    <author initials="J-L." surname="Gailly" fullname="Jean-Loup Gailly"/>
4375    <date month="May" year="1996"/>
4376  </front>
4377  <seriesInfo name="RFC" value="1950"/>
4378  <annotation>
4379    RFC 1950 is an Informational RFC, thus it might be less stable than
4380    this specification. On the other hand, this downward reference was
4381    present since the publication of RFC 2068 in 1997 (<xref target="RFC2068"/>),
4382    therefore it is unlikely to cause problems in practice. See also
4383    <xref target="BCP97"/>.
4384  </annotation>
4387<reference anchor="RFC1951">
4388  <front>
4389    <title>DEFLATE Compressed Data Format Specification version 1.3</title>
4390    <author initials="P." surname="Deutsch" fullname="L. Peter Deutsch">
4391      <organization>Aladdin Enterprises</organization>
4392      <address><email></email></address>
4393    </author>
4394    <date month="May" year="1996"/>
4395  </front>
4396  <seriesInfo name="RFC" value="1951"/>
4397  <annotation>
4398    RFC 1951 is an Informational RFC, thus it might be less stable than
4399    this specification. On the other hand, this downward reference was
4400    present since the publication of RFC 2068 in 1997 (<xref target="RFC2068"/>),
4401    therefore it is unlikely to cause problems in practice. See also
4402    <xref target="BCP97"/>.
4403  </annotation>
4406<reference anchor="RFC1952">
4407  <front>
4408    <title>GZIP file format specification version 4.3</title>
4409    <author initials="P." surname="Deutsch" fullname="L. Peter Deutsch">
4410      <organization>Aladdin Enterprises</organization>
4411      <address><email></email></address>
4412    </author>
4413    <author initials="J-L." surname="Gailly" fullname="Jean-Loup Gailly">
4414      <address><email></email></address>
4415    </author>
4416    <author initials="M." surname="Adler" fullname="Mark Adler">
4417      <address><email></email></address>
4418    </author>
4419    <author initials="L.P." surname="Deutsch" fullname="L. Peter Deutsch">
4420      <address><email></email></address>
4421    </author>
4422    <author initials="G." surname="Randers-Pehrson" fullname="Glenn Randers-Pehrson">
4423      <address><email></email></address>
4424    </author>
4425    <date month="May" year="1996"/>
4426  </front>
4427  <seriesInfo name="RFC" value="1952"/>
4428  <annotation>
4429    RFC 1952 is an Informational RFC, thus it might be less stable than
4430    this specification. On the other hand, this downward reference was
4431    present since the publication of RFC 2068 in 1997 (<xref target="RFC2068"/>),
4432    therefore it is unlikely to cause problems in practice. See also
4433    <xref target="BCP97"/>.
4434  </annotation>
4439<references title="Informative References">
4441<reference anchor="Nie1997" target="">
4442  <front>
4443    <title>Network Performance Effects of HTTP/1.1, CSS1, and PNG</title>
4444    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen"/>
4445    <author initials="J." surname="Gettys" fullname="J. Gettys"/>
4446    <author initials="E." surname="Prud'hommeaux" fullname="E. Prud'hommeaux"/>
4447    <author initials="H." surname="Lie" fullname="H. Lie"/>
4448    <author initials="C." surname="Lilley" fullname="C. Lilley"/>
4449    <date year="1997" month="September"/>
4450  </front>
4451  <seriesInfo name="ACM" value="Proceedings of the ACM SIGCOMM '97 conference on Applications, technologies, architectures, and protocols for computer communication SIGCOMM '97"/>
4454<reference anchor="Pad1995" target="">
4455  <front>
4456    <title>Improving HTTP Latency</title>
4457    <author initials="V.N." surname="Padmanabhan" fullname="Venkata N. Padmanabhan"/>
4458    <author initials="J.C." surname="Mogul" fullname="Jeffrey C. Mogul"/>
4459    <date year="1995" month="December"/>
4460  </front>
4461  <seriesInfo name="Computer Networks and ISDN Systems" value="v. 28, pp. 25-35"/>
4464<reference anchor="RFC1123">
4465  <front>
4466    <title>Requirements for Internet Hosts - Application and Support</title>
4467    <author initials="R." surname="Braden" fullname="Robert Braden">
4468      <organization>University of Southern California (USC), Information Sciences Institute</organization>
4469      <address><email>Braden@ISI.EDU</email></address>
4470    </author>
4471    <date month="October" year="1989"/>
4472  </front>
4473  <seriesInfo name="STD" value="3"/>
4474  <seriesInfo name="RFC" value="1123"/>
4477<reference anchor='RFC1919'>
4478  <front>
4479    <title>Classical versus Transparent IP Proxies</title>
4480    <author initials='M.' surname='Chatel' fullname='Marc Chatel'>
4481      <address><email></email></address>
4482    </author>
4483    <date year='1996' month='March' />
4484  </front>
4485  <seriesInfo name='RFC' value='1919' />
4488<reference anchor="RFC1945">
4489  <front>
4490    <title abbrev="HTTP/1.0">Hypertext Transfer Protocol -- HTTP/1.0</title>
4491    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
4492      <organization>MIT, Laboratory for Computer Science</organization>
4493      <address><email></email></address>
4494    </author>
4495    <author initials="R.T." surname="Fielding" fullname="Roy T. Fielding">
4496      <organization>University of California, Irvine, Department of Information and Computer Science</organization>
4497      <address><email></email></address>
4498    </author>
4499    <author initials="H.F." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
4500      <organization>W3 Consortium, MIT Laboratory for Computer Science</organization>
4501      <address><email></email></address>
4502    </author>
4503    <date month="May" year="1996"/>
4504  </front>
4505  <seriesInfo name="RFC" value="1945"/>
4508<reference anchor="RFC2045">
4509  <front>
4510    <title abbrev="Internet Message Bodies">Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</title>
4511    <author initials="N." surname="Freed" fullname="Ned Freed">
4512      <organization>Innosoft International, Inc.</organization>
4513      <address><email></email></address>
4514    </author>
4515    <author initials="N.S." surname="Borenstein" fullname="Nathaniel S. Borenstein">
4516      <organization>First Virtual Holdings</organization>
4517      <address><email></email></address>
4518    </author>
4519    <date month="November" year="1996"/>
4520  </front>
4521  <seriesInfo name="RFC" value="2045"/>
4524<reference anchor="RFC2047">
4525  <front>
4526    <title abbrev="Message Header Extensions">MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text</title>
4527    <author initials="K." surname="Moore" fullname="Keith Moore">
4528      <organization>University of Tennessee</organization>
4529      <address><email></email></address>
4530    </author>
4531    <date month="November" year="1996"/>
4532  </front>
4533  <seriesInfo name="RFC" value="2047"/>
4536<reference anchor="RFC2068">
4537  <front>
4538    <title abbrev="HTTP/1.1">Hypertext Transfer Protocol -- HTTP/1.1</title>
4539    <author initials="R." surname="Fielding" fullname="Roy T. Fielding">
4540      <organization>University of California, Irvine, Department of Information and Computer Science</organization>
4541      <address><email></email></address>
4542    </author>
4543    <author initials="J." surname="Gettys" fullname="Jim Gettys">
4544      <organization>MIT Laboratory for Computer Science</organization>
4545      <address><email></email></address>
4546    </author>
4547    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
4548      <organization>Digital Equipment Corporation, Western Research Laboratory</organization>
4549      <address><email></email></address>
4550    </author>
4551    <author initials="H." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
4552      <organization>MIT Laboratory for Computer Science</organization>
4553      <address><email></email></address>
4554    </author>
4555    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
4556      <organization>MIT Laboratory for Computer Science</organization>
4557      <address><email></email></address>
4558    </author>
4559    <date month="January" year="1997"/>
4560  </front>
4561  <seriesInfo name="RFC" value="2068"/>
4564<reference anchor="RFC2145">
4565  <front>
4566    <title abbrev="HTTP Version Numbers">Use and Interpretation of HTTP Version Numbers</title>
4567    <author initials="J.C." surname="Mogul" fullname="Jeffrey C. Mogul">
4568      <organization>Western Research Laboratory</organization>
4569      <address><email></email></address>
4570    </author>
4571    <author initials="R.T." surname="Fielding" fullname="Roy T. Fielding">
4572      <organization>Department of Information and Computer Science</organization>
4573      <address><email></email></address>
4574    </author>
4575    <author initials="J." surname="Gettys" fullname="Jim Gettys">
4576      <organization>MIT Laboratory for Computer Science</organization>
4577      <address><email></email></address>
4578    </author>
4579    <author initials="H.F." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
4580      <organization>W3 Consortium</organization>
4581      <address><email></email></address>
4582    </author>
4583    <date month="May" year="1997"/>
4584  </front>
4585  <seriesInfo name="RFC" value="2145"/>
4588<reference anchor="RFC2616">
4589  <front>
4590    <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
4591    <author initials="R." surname="Fielding" fullname="R. Fielding">
4592      <organization>University of California, Irvine</organization>
4593      <address><email></email></address>
4594    </author>
4595    <author initials="J." surname="Gettys" fullname="J. Gettys">
4596      <organization>W3C</organization>
4597      <address><email></email></address>
4598    </author>
4599    <author initials="J." surname="Mogul" fullname="J. Mogul">
4600      <organization>Compaq Computer Corporation</organization>
4601      <address><email></email></address>
4602    </author>
4603    <author initials="H." surname="Frystyk" fullname="H. Frystyk">
4604      <organization>MIT Laboratory for Computer Science</organization>
4605      <address><email></email></address>
4606    </author>
4607    <author initials="L." surname="Masinter" fullname="L. Masinter">
4608      <organization>Xerox Corporation</organization>
4609      <address><email></email></address>
4610    </author>
4611    <author initials="P." surname="Leach" fullname="P. Leach">
4612      <organization>Microsoft Corporation</organization>
4613      <address><email></email></address>
4614    </author>
4615    <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
4616      <organization>W3C</organization>
4617      <address><email></email></address>
4618    </author>
4619    <date month="June" year="1999"/>
4620  </front>
4621  <seriesInfo name="RFC" value="2616"/>
4624<reference anchor='RFC2817'>
4625  <front>
4626    <title>Upgrading to TLS Within HTTP/1.1</title>
4627    <author initials='R.' surname='Khare' fullname='R. Khare'>
4628      <organization>4K Associates / UC Irvine</organization>
4629      <address><email></email></address>
4630    </author>
4631    <author initials='S.' surname='Lawrence' fullname='S. Lawrence'>
4632      <organization>Agranat Systems, Inc.</organization>
4633      <address><email></email></address>
4634    </author>
4635    <date year='2000' month='May' />
4636  </front>
4637  <seriesInfo name='RFC' value='2817' />
4640<reference anchor='RFC2818'>
4641  <front>
4642    <title>HTTP Over TLS</title>
4643    <author initials='E.' surname='Rescorla' fullname='Eric Rescorla'>
4644      <organization>RTFM, Inc.</organization>
4645      <address><email></email></address>
4646    </author>
4647    <date year='2000' month='May' />
4648  </front>
4649  <seriesInfo name='RFC' value='2818' />
4652<reference anchor='RFC2965'>
4653  <front>
4654    <title>HTTP State Management Mechanism</title>
4655    <author initials='D. M.' surname='Kristol' fullname='David M. Kristol'>
4656      <organization>Bell Laboratories, Lucent Technologies</organization>
4657      <address><email></email></address>
4658    </author>
4659    <author initials='L.' surname='Montulli' fullname='Lou Montulli'>
4660      <organization>, Inc.</organization>
4661      <address><email></email></address>
4662    </author>
4663    <date year='2000' month='October' />
4664  </front>
4665  <seriesInfo name='RFC' value='2965' />
4668<reference anchor='RFC3040'>
4669  <front>
4670    <title>Internet Web Replication and Caching Taxonomy</title>
4671    <author initials='I.' surname='Cooper' fullname='I. Cooper'>
4672      <organization>Equinix, Inc.</organization>
4673    </author>
4674    <author initials='I.' surname='Melve' fullname='I. Melve'>
4675      <organization>UNINETT</organization>
4676    </author>
4677    <author initials='G.' surname='Tomlinson' fullname='G. Tomlinson'>
4678      <organization>CacheFlow Inc.</organization>
4679    </author>
4680    <date year='2001' month='January' />
4681  </front>
4682  <seriesInfo name='RFC' value='3040' />
4685<reference anchor='RFC3864'>
4686  <front>
4687    <title>Registration Procedures for Message Header Fields</title>
4688    <author initials='G.' surname='Klyne' fullname='G. Klyne'>
4689      <organization>Nine by Nine</organization>
4690      <address><email></email></address>
4691    </author>
4692    <author initials='M.' surname='Nottingham' fullname='M. Nottingham'>
4693      <organization>BEA Systems</organization>
4694      <address><email></email></address>
4695    </author>
4696    <author initials='J.' surname='Mogul' fullname='J. Mogul'>
4697      <organization>HP Labs</organization>
4698      <address><email></email></address>
4699    </author>
4700    <date year='2004' month='September' />
4701  </front>
4702  <seriesInfo name='BCP' value='90' />
4703  <seriesInfo name='RFC' value='3864' />
4706<reference anchor='RFC4033'>
4707  <front>
4708    <title>DNS Security Introduction and Requirements</title>
4709    <author initials='R.' surname='Arends' fullname='R. Arends'/>
4710    <author initials='R.' surname='Austein' fullname='R. Austein'/>
4711    <author initials='M.' surname='Larson' fullname='M. Larson'/>
4712    <author initials='D.' surname='Massey' fullname='D. Massey'/>
4713    <author initials='S.' surname='Rose' fullname='S. Rose'/>
4714    <date year='2005' month='March' />
4715  </front>
4716  <seriesInfo name='RFC' value='4033' />
4719<reference anchor="RFC4288">
4720  <front>
4721    <title>Media Type Specifications and Registration Procedures</title>
4722    <author initials="N." surname="Freed" fullname="N. Freed">
4723      <organization>Sun Microsystems</organization>
4724      <address>
4725        <email></email>
4726      </address>
4727    </author>
4728    <author initials="J." surname="Klensin" fullname="J. Klensin">
4729      <address>
4730        <email></email>
4731      </address>
4732    </author>
4733    <date year="2005" month="December"/>
4734  </front>
4735  <seriesInfo name="BCP" value="13"/>
4736  <seriesInfo name="RFC" value="4288"/>
4739<reference anchor='RFC4395'>
4740  <front>
4741    <title>Guidelines and Registration Procedures for New URI Schemes</title>
4742    <author initials='T.' surname='Hansen' fullname='T. Hansen'>
4743      <organization>AT&amp;T Laboratories</organization>
4744      <address>
4745        <email></email>
4746      </address>
4747    </author>
4748    <author initials='T.' surname='Hardie' fullname='T. Hardie'>
4749      <organization>Qualcomm, Inc.</organization>
4750      <address>
4751        <email></email>
4752      </address>
4753    </author>
4754    <author initials='L.' surname='Masinter' fullname='L. Masinter'>
4755      <organization>Adobe Systems</organization>
4756      <address>
4757        <email></email>
4758      </address>
4759    </author>
4760    <date year='2006' month='February' />
4761  </front>
4762  <seriesInfo name='BCP' value='115' />
4763  <seriesInfo name='RFC' value='4395' />
4766<reference anchor='RFC4559'>
4767  <front>
4768    <title>SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows</title>
4769    <author initials='K.' surname='Jaganathan' fullname='K. Jaganathan'/>
4770    <author initials='L.' surname='Zhu' fullname='L. Zhu'/>
4771    <author initials='J.' surname='Brezak' fullname='J. Brezak'/>
4772    <date year='2006' month='June' />
4773  </front>
4774  <seriesInfo name='RFC' value='4559' />
4777<reference anchor='RFC5226'>
4778  <front>
4779    <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
4780    <author initials='T.' surname='Narten' fullname='T. Narten'>
4781      <organization>IBM</organization>
4782      <address><email></email></address>
4783    </author>
4784    <author initials='H.' surname='Alvestrand' fullname='H. Alvestrand'>
4785      <organization>Google</organization>
4786      <address><email></email></address>
4787    </author>
4788    <date year='2008' month='May' />
4789  </front>
4790  <seriesInfo name='BCP' value='26' />
4791  <seriesInfo name='RFC' value='5226' />
4794<reference anchor="RFC5322">
4795  <front>
4796    <title>Internet Message Format</title>
4797    <author initials="P." surname="Resnick" fullname="P. Resnick">
4798      <organization>Qualcomm Incorporated</organization>
4799    </author>
4800    <date year="2008" month="October"/>
4801  </front>
4802  <seriesInfo name="RFC" value="5322"/>
4805<reference anchor="RFC6265">
4806  <front>
4807    <title>HTTP State Management Mechanism</title>
4808    <author initials="A." surname="Barth" fullname="Adam Barth">
4809      <organization abbrev="U.C. Berkeley">
4810        University of California, Berkeley
4811      </organization>
4812      <address><email></email></address>
4813    </author>
4814    <date year="2011" month="April" />
4815  </front>
4816  <seriesInfo name="RFC" value="6265"/>
4819<reference anchor='BCP97'>
4820  <front>
4821    <title>Handling Normative References to Standards-Track Documents</title>
4822    <author initials='J.' surname='Klensin' fullname='J. Klensin'>
4823      <address>
4824        <email></email>
4825      </address>
4826    </author>
4827    <author initials='S.' surname='Hartman' fullname='S. Hartman'>
4828      <organization>MIT</organization>
4829      <address>
4830        <email></email>
4831      </address>
4832    </author>
4833    <date year='2007' month='June' />
4834  </front>
4835  <seriesInfo name='BCP' value='97' />
4836  <seriesInfo name='RFC' value='4897' />
4839<reference anchor="Kri2001" target="">
4840  <front>
4841    <title>HTTP Cookies: Standards, Privacy, and Politics</title>
4842    <author initials="D." surname="Kristol" fullname="David M. Kristol"/>
4843    <date year="2001" month="November"/>
4844  </front>
4845  <seriesInfo name="ACM Transactions on Internet Technology" value="Vol. 1, #2"/>
4848<reference anchor="Spe" target="">
4849  <front>
4850    <title>Analysis of HTTP Performance Problems</title>
4851    <author initials="S." surname="Spero" fullname="Simon E. Spero"/>
4852    <date/>
4853  </front>
4856<reference anchor="Tou1998" target="">
4857  <front>
4858  <title>Analysis of HTTP Performance</title>
4859  <author initials="J." surname="Touch" fullname="Joe Touch">
4860    <organization>USC/Information Sciences Institute</organization>
4861    <address><email></email></address>
4862  </author>
4863  <author initials="J." surname="Heidemann" fullname="John Heidemann">
4864    <organization>USC/Information Sciences Institute</organization>
4865    <address><email></email></address>
4866  </author>
4867  <author initials="K." surname="Obraczka" fullname="Katia Obraczka">
4868    <organization>USC/Information Sciences Institute</organization>
4869    <address><email></email></address>
4870  </author>
4871  <date year="1998" month="Aug"/>
4872  </front>
4873  <seriesInfo name="ISI Research Report" value="ISI/RR-98-463"/>
4874  <annotation>(original report dated Aug. 1996)</annotation>
4880<section title="Tolerant Applications" anchor="tolerant.applications">
4882   Although this document specifies the requirements for the generation
4883   of HTTP/1.1 messages, not all applications will be correct in their
4884   implementation. We therefore recommend that operational applications
4885   be tolerant of deviations whenever those deviations can be
4886   interpreted unambiguously.
4889   The line terminator for header fields is the sequence CRLF.
4890   However, we recommend that applications, when parsing such headers fields,
4891   recognize a single LF as a line terminator and ignore the leading CR.
4894   The character encoding of a representation &SHOULD; be labeled as the lowest
4895   common denominator of the character codes used within that representation, with
4896   the exception that not labeling the representation is preferred over labeling
4897   the representation with the labels US-ASCII or ISO-8859-1. See &payload;.
4900   Additional rules for requirements on parsing and encoding of dates
4901   and other potential problems with date encodings include:
4904  <list style="symbols">
4905     <t>HTTP/1.1 clients and caches &SHOULD; assume that an RFC-850 date
4906        which appears to be more than 50 years in the future is in fact
4907        in the past (this helps solve the "year 2000" problem).</t>
4909     <t>Although all date formats are specified to be case-sensitive,
4910        recipients &SHOULD; match day, week and timezone names
4911        case-insensitively.</t>
4913     <t>An HTTP/1.1 implementation &MAY; internally represent a parsed
4914        Expires date as earlier than the proper value, but &MUST-NOT;
4915        internally represent a parsed Expires date as later than the
4916        proper value.</t>
4918     <t>All expiration-related calculations &MUST; be done in GMT. The
4919        local time zone &MUST-NOT; influence the calculation or comparison
4920        of an age or expiration time.</t>
4922     <t>If an HTTP header field incorrectly carries a date value with a time
4923        zone other than GMT, it &MUST; be converted into GMT using the
4924        most conservative possible conversion.</t>
4925  </list>
4929<section title="HTTP Version History" anchor="compatibility">
4931   HTTP has been in use by the World-Wide Web global information initiative
4932   since 1990. The first version of HTTP, later referred to as HTTP/0.9,
4933   was a simple protocol for hypertext data transfer across the Internet
4934   with only a single request method (GET) and no metadata.
4935   HTTP/1.0, as defined by <xref target="RFC1945"/>, added a range of request
4936   methods and MIME-like messaging that could include metadata about the data
4937   transferred and modifiers on the request/response semantics. However,
4938   HTTP/1.0 did not sufficiently take into consideration the effects of
4939   hierarchical proxies, caching, the need for persistent connections, or
4940   name-based virtual hosts. The proliferation of incompletely-implemented
4941   applications calling themselves "HTTP/1.0" further necessitated a
4942   protocol version change in order for two communicating applications
4943   to determine each other's true capabilities.
4946   HTTP/1.1 remains compatible with HTTP/1.0 by including more stringent
4947   requirements that enable reliable implementations, adding only
4948   those new features that will either be safely ignored by an HTTP/1.0
4949   recipient or only sent when communicating with a party advertising
4950   compliance with HTTP/1.1.
4953   It is beyond the scope of a protocol specification to mandate
4954   compliance with previous versions. HTTP/1.1 was deliberately
4955   designed, however, to make supporting previous versions easy.
4956   We would expect a general-purpose HTTP/1.1 server to understand
4957   any valid request in the format of HTTP/1.0 and respond appropriately
4958   with an HTTP/1.1 message that only uses features understood (or
4959   safely ignored) by HTTP/1.0 clients.  Likewise, would expect
4960   an HTTP/1.1 client to understand any valid HTTP/1.0 response.
4963   Since HTTP/0.9 did not support header fields in a request,
4964   there is no mechanism for it to support name-based virtual
4965   hosts (selection of resource by inspection of the Host header
4966   field).  Any server that implements name-based virtual hosts
4967   ought to disable support for HTTP/0.9.  Most requests that
4968   appear to be HTTP/0.9 are, in fact, badly constructed HTTP/1.x
4969   requests wherein a buggy client failed to properly encode
4970   linear whitespace found in a URI reference and placed in
4971   the request-target.
4974<section title="Changes from HTTP/1.0" anchor="changes.from.1.0">
4976   This section summarizes major differences between versions HTTP/1.0
4977   and HTTP/1.1.
4980<section title="Multi-homed Web Servers" anchor="">
4982   The requirements that clients and servers support the Host header
4983   field (<xref target=""/>), report an error if it is
4984   missing from an HTTP/1.1 request, and accept absolute URIs (<xref target="request-target"/>)
4985   are among the most important changes defined by HTTP/1.1.
4988   Older HTTP/1.0 clients assumed a one-to-one relationship of IP
4989   addresses and servers; there was no other established mechanism for
4990   distinguishing the intended server of a request than the IP address
4991   to which that request was directed. The Host header field was
4992   introduced during the development of HTTP/1.1 and, though it was
4993   quickly implemented by most HTTP/1.0 browsers, additional requirements
4994   were placed on all HTTP/1.1 requests in order to ensure complete
4995   adoption.  At the time of this writing, most HTTP-based services
4996   are dependent upon the Host header field for targeting requests.
5000<section title="Keep-Alive Connections" anchor="compatibility.with.http.1.0.persistent.connections">
5002   For most implementations of HTTP/1.0, each connection is established
5003   by the client prior to the request and closed by the server after
5004   sending the response. However, some implementations implement the
5005   Keep-Alive version of persistent connections described in
5006   <xref x:sec="19.7.1" x:fmt="of" target="RFC2068"/>.
5009   Some clients and servers might wish to be compatible with some
5010   previous implementations of persistent connections in HTTP/1.0
5011   clients and servers. Persistent connections in HTTP/1.0 are
5012   explicitly negotiated as they are not the default behavior. HTTP/1.0
5013   experimental implementations of persistent connections are faulty,
5014   and the new facilities in HTTP/1.1 are designed to rectify these
5015   problems. The problem was that some existing HTTP/1.0 clients might
5016   send Keep-Alive to a proxy server that doesn't understand
5017   Connection, which would then erroneously forward it to the next
5018   inbound server, which would establish the Keep-Alive connection and
5019   result in a hung HTTP/1.0 proxy waiting for the close on the
5020   response. The result is that HTTP/1.0 clients must be prevented from
5021   using Keep-Alive when talking to proxies.
5024   However, talking to proxies is the most important use of persistent
5025   connections, so that prohibition is clearly unacceptable. Therefore,
5026   we need some other mechanism for indicating a persistent connection
5027   is desired, which is safe to use even when talking to an old proxy
5028   that ignores Connection. Persistent connections are the default for
5029   HTTP/1.1 messages; we introduce a new keyword (Connection: close) for
5030   declaring non-persistence. See <xref target="header.connection"/>.
5035<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
5037  Empty list elements in list productions have been deprecated.
5038  (<xref target="notation.abnf"/>)
5041  Rules about implicit linear whitespace between certain grammar productions
5042  have been removed; now it's only allowed when specifically pointed out
5043  in the ABNF. The NUL octet is no longer allowed in comment and quoted-string
5044  text. The quoted-pair rule no longer allows escaping control characters other than HTAB.
5045  Non-ASCII content in header fields and reason phrase has been obsoleted and
5046  made opaque (the TEXT rule was removed)
5047  (<xref target="basic.rules"/>)
5050  Clarify that the string "HTTP" in the HTTP-Version ABFN production is case
5051  sensitive. Restrict the version numbers to be single digits due to the fact
5052  that implementations are known to handle multi-digit version numbers
5053  incorrectly.
5054  (<xref target="http.version"/>)
5057  Require that invalid whitespace around field-names be rejected.
5058  (<xref target="header.fields"/>)
5061  Require recipients to handle bogus Content-Length header fields as errors.
5062  (<xref target="message.body"/>)
5065  Remove reference to non-existent identity transfer-coding value tokens.
5066  (Sections <xref format="counter" target="message.body"/> and
5067  <xref format="counter" target="transfer.codings"/>)
5070  Update use of abs_path production from RFC 1808 to the path-absolute + query
5071  components of RFC 3986. State that the asterisk form is allowed for the OPTIONS
5072  request method only.
5073  (<xref target="request-target"/>)
5076  Clarification that the chunk length does not include the count of the octets
5077  in the chunk header and trailer. Furthermore disallowed line folding
5078  in chunk extensions.
5079  (<xref target="chunked.encoding"/>)
5082  Remove hard limit of two connections per server.
5083  (<xref target="persistent.practical"/>)
5086  Change ABNF productions for header fields to only define the field value.
5087  (<xref target="header.field.definitions"/>)
5090  Clarify exactly when close connection options must be sent.
5091  (<xref target="header.connection"/>)
5094  Define the semantics of the "Upgrade" header field in responses other than
5095  101 (this was incorporated from <xref target="RFC2817"/>).
5096  (<xref target="header.upgrade"/>)
5101<?BEGININC p1-messaging.abnf-appendix ?>
5102<section xmlns:x="" title="Collected ABNF" anchor="collected.abnf">
5104<artwork type="abnf" name="p1-messaging.parsed-abnf">
5105<x:ref>BWS</x:ref> = OWS
5107<x:ref>Chunked-Body</x:ref> = *chunk last-chunk trailer-part CRLF
5108<x:ref>Connection</x:ref> = *( "," OWS ) connection-token *( OWS "," [ OWS
5109 connection-token ] )
5110<x:ref>Content-Length</x:ref> = 1*DIGIT
5112<x:ref>Date</x:ref> = HTTP-date
5114<x:ref>GMT</x:ref> = %x47.4D.54 ; GMT
5116<x:ref>HTTP-Prot-Name</x:ref> = %x48.54.54.50 ; HTTP
5117<x:ref>HTTP-Version</x:ref> = HTTP-Prot-Name "/" DIGIT "." DIGIT
5118<x:ref>HTTP-date</x:ref> = rfc1123-date / obs-date
5119<x:ref>HTTP-message</x:ref> = start-line *( header-field CRLF ) CRLF [ message-body
5120 ]
5121<x:ref>Host</x:ref> = uri-host [ ":" port ]
5123<x:ref>Method</x:ref> = token
5125<x:ref>OWS</x:ref> = *( [ obs-fold ] WSP )
5127<x:ref>RWS</x:ref> = 1*( [ obs-fold ] WSP )
5128<x:ref>Reason-Phrase</x:ref> = *( WSP / VCHAR / obs-text )
5129<x:ref>Request</x:ref> = Request-Line *( header-field CRLF ) CRLF [ message-body ]
5130<x:ref>Request-Line</x:ref> = Method SP request-target SP HTTP-Version CRLF
5131<x:ref>Response</x:ref> = Status-Line *( header-field CRLF ) CRLF [ message-body ]
5133<x:ref>Status-Code</x:ref> = 3DIGIT
5134<x:ref>Status-Line</x:ref> = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
5136<x:ref>TE</x:ref> = [ ( "," / t-codings ) *( OWS "," [ OWS t-codings ] ) ]
5137<x:ref>Trailer</x:ref> = *( "," OWS ) field-name *( OWS "," [ OWS field-name ] )
5138<x:ref>Transfer-Encoding</x:ref> = *( "," OWS ) transfer-coding *( OWS "," [ OWS
5139 transfer-coding ] )
5141<x:ref>URI-reference</x:ref> = &lt;URI-reference, defined in [RFC3986], Section 4.1&gt;
5142<x:ref>Upgrade</x:ref> = *( "," OWS ) product *( OWS "," [ OWS product ] )
5144<x:ref>Via</x:ref> = *( "," OWS ) received-protocol RWS received-by [ RWS comment ]
5145 *( OWS "," [ OWS received-protocol RWS received-by [ RWS comment ] ]
5146 )
5148<x:ref>absolute-URI</x:ref> = &lt;absolute-URI, defined in [RFC3986], Section 4.3&gt;
5149<x:ref>asctime-date</x:ref> = day-name SP date3 SP time-of-day SP year
5150<x:ref>attribute</x:ref> = token
5151<x:ref>authority</x:ref> = &lt;authority, defined in [RFC3986], Section 3.2&gt;
5153<x:ref>chunk</x:ref> = chunk-size *WSP [ chunk-ext ] CRLF chunk-data CRLF
5154<x:ref>chunk-data</x:ref> = 1*OCTET
5155<x:ref>chunk-ext</x:ref> = *( ";" *WSP chunk-ext-name [ "=" chunk-ext-val ] *WSP )
5156<x:ref>chunk-ext-name</x:ref> = token
5157<x:ref>chunk-ext-val</x:ref> = token / quoted-str-nf
5158<x:ref>chunk-size</x:ref> = 1*HEXDIG
5159<x:ref>comment</x:ref> = "(" *( ctext / quoted-cpair / comment ) ")"
5160<x:ref>connection-token</x:ref> = token
5161<x:ref>ctext</x:ref> = OWS / %x21-27 ; '!'-'''
5162 / %x2A-5B ; '*'-'['
5163 / %x5D-7E ; ']'-'~'
5164 / obs-text
5166<x:ref>date1</x:ref> = day SP month SP year
5167<x:ref>date2</x:ref> = day "-" month "-" 2DIGIT
5168<x:ref>date3</x:ref> = month SP ( 2DIGIT / ( SP DIGIT ) )
5169<x:ref>day</x:ref> = 2DIGIT
5170<x:ref>day-name</x:ref> = %x4D.6F.6E ; Mon
5171 / %x54.75.65 ; Tue
5172 / %x57.65.64 ; Wed
5173 / %x54.68.75 ; Thu
5174 / %x46.72.69 ; Fri
5175 / %x53.61.74 ; Sat
5176 / %x53.75.6E ; Sun
5177<x:ref>day-name-l</x:ref> = %x4D.6F.6E.64.61.79 ; Monday
5178 / %x54. ; Tuesday
5179 / %x57.65.64.6E. ; Wednesday
5180 / %x54. ; Thursday
5181 / %x46. ; Friday
5182 / %x53. ; Saturday
5183 / %x53.75.6E.64.61.79 ; Sunday
5185<x:ref>field-content</x:ref> = *( WSP / VCHAR / obs-text )
5186<x:ref>field-name</x:ref> = token
5187<x:ref>field-value</x:ref> = *( field-content / OWS )
5189<x:ref>header-field</x:ref> = field-name ":" OWS [ field-value ] OWS
5190<x:ref>hour</x:ref> = 2DIGIT
5191<x:ref>http-URI</x:ref> = "http://" authority path-abempty [ "?" query ]
5192<x:ref>https-URI</x:ref> = "https://" authority path-abempty [ "?" query ]
5194<x:ref>last-chunk</x:ref> = 1*"0" *WSP [ chunk-ext ] CRLF
5196<x:ref>message-body</x:ref> = *OCTET
5197<x:ref>minute</x:ref> = 2DIGIT
5198<x:ref>month</x:ref> = %x4A.61.6E ; Jan
5199 / %x46.65.62 ; Feb
5200 / %x4D.61.72 ; Mar
5201 / %x41.70.72 ; Apr
5202 / %x4D.61.79 ; May
5203 / %x4A.75.6E ; Jun
5204 / %x4A.75.6C ; Jul
5205 / %x41.75.67 ; Aug
5206 / %x53.65.70 ; Sep
5207 / %x4F.63.74 ; Oct
5208 / %x4E.6F.76 ; Nov
5209 / %x44.65.63 ; Dec
5211<x:ref>obs-date</x:ref> = rfc850-date / asctime-date
5212<x:ref>obs-fold</x:ref> = CRLF
5213<x:ref>obs-text</x:ref> = %x80-FF
5215<x:ref>partial-URI</x:ref> = relative-part [ "?" query ]
5216<x:ref>path-abempty</x:ref> = &lt;path-abempty, defined in [RFC3986], Section 3.3&gt;
5217<x:ref>path-absolute</x:ref> = &lt;path-absolute, defined in [RFC3986], Section 3.3&gt;
5218<x:ref>port</x:ref> = &lt;port, defined in [RFC3986], Section 3.2.3&gt;
5219<x:ref>product</x:ref> = token [ "/" product-version ]
5220<x:ref>product-version</x:ref> = token
5221<x:ref>protocol-name</x:ref> = token
5222<x:ref>protocol-version</x:ref> = token
5223<x:ref>pseudonym</x:ref> = token
5225<x:ref>qdtext</x:ref> = OWS / "!" / %x23-5B ; '#'-'['
5226 / %x5D-7E ; ']'-'~'
5227 / obs-text
5228<x:ref>qdtext-nf</x:ref> = WSP / "!" / %x23-5B ; '#'-'['
5229 / %x5D-7E ; ']'-'~'
5230 / obs-text
5231<x:ref>query</x:ref> = &lt;query, defined in [RFC3986], Section 3.4&gt;
5232<x:ref>quoted-cpair</x:ref> = "\" ( WSP / VCHAR / obs-text )
5233<x:ref>quoted-pair</x:ref> = "\" ( WSP / VCHAR / obs-text )
5234<x:ref>quoted-str-nf</x:ref> = DQUOTE *( qdtext-nf / quoted-pair ) DQUOTE
5235<x:ref>quoted-string</x:ref> = DQUOTE *( qdtext / quoted-pair ) DQUOTE
5236<x:ref>qvalue</x:ref> = ( "0" [ "." *3DIGIT ] ) / ( "1" [ "." *3"0" ] )
5238<x:ref>received-by</x:ref> = ( uri-host [ ":" port ] ) / pseudonym
5239<x:ref>received-protocol</x:ref> = [ protocol-name "/" ] protocol-version
5240<x:ref>relative-part</x:ref> = &lt;relative-part, defined in [RFC3986], Section 4.2&gt;
5241<x:ref>request-target</x:ref> = "*" / absolute-URI / ( path-absolute [ "?" query ] )
5242 / authority
5243<x:ref>rfc1123-date</x:ref> = day-name "," SP date1 SP time-of-day SP GMT
5244<x:ref>rfc850-date</x:ref> = day-name-l "," SP date2 SP time-of-day SP GMT
5246<x:ref>second</x:ref> = 2DIGIT
5247<x:ref>special</x:ref> = "(" / ")" / "&lt;" / "&gt;" / "@" / "," / ";" / ":" / "\" /
5248 DQUOTE / "/" / "[" / "]" / "?" / "=" / "{" / "}"
5249<x:ref>start-line</x:ref> = Request-Line / Status-Line
5251<x:ref>t-codings</x:ref> = "trailers" / ( transfer-extension [ te-params ] )
5252<x:ref>tchar</x:ref> = "!" / "#" / "$" / "%" / "&amp;" / "'" / "*" / "+" / "-" / "." /
5253 "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA
5254<x:ref>te-ext</x:ref> = OWS ";" OWS token [ "=" word ]
5255<x:ref>te-params</x:ref> = OWS ";" OWS "q=" qvalue *te-ext
5256<x:ref>time-of-day</x:ref> = hour ":" minute ":" second
5257<x:ref>token</x:ref> = 1*tchar
5258<x:ref>trailer-part</x:ref> = *( header-field CRLF )
5259<x:ref>transfer-coding</x:ref> = "chunked" / "compress" / "deflate" / "gzip" /
5260 transfer-extension
5261<x:ref>transfer-extension</x:ref> = token *( OWS ";" OWS transfer-parameter )
5262<x:ref>transfer-parameter</x:ref> = attribute BWS "=" BWS value
5264<x:ref>uri-host</x:ref> = &lt;host, defined in [RFC3986], Section 3.2.2&gt;
5266<x:ref>value</x:ref> = word
5268<x:ref>word</x:ref> = token / quoted-string
5270<x:ref>year</x:ref> = 4DIGIT
5273<figure><preamble>ABNF diagnostics:</preamble><artwork type="inline">
5274; Chunked-Body defined but not used
5275; Connection defined but not used
5276; Content-Length defined but not used
5277; Date defined but not used
5278; HTTP-message defined but not used
5279; Host defined but not used
5280; Request defined but not used
5281; Response defined but not used
5282; TE defined but not used
5283; Trailer defined but not used
5284; Transfer-Encoding defined but not used
5285; URI-reference defined but not used
5286; Upgrade defined but not used
5287; Via defined but not used
5288; http-URI defined but not used
5289; https-URI defined but not used
5290; partial-URI defined but not used
5291; special defined but not used
5293<?ENDINC p1-messaging.abnf-appendix ?>
5295<section title="Change Log (to be removed by RFC Editor before publication)" anchor="change.log">
5297<section title="Since RFC 2616">
5299  Extracted relevant partitions from <xref target="RFC2616"/>.
5303<section title="Since draft-ietf-httpbis-p1-messaging-00">
5305  Closed issues:
5306  <list style="symbols">
5307    <t>
5308      <eref target=""/>:
5309      "HTTP Version should be case sensitive"
5310      (<eref target=""/>)
5311    </t>
5312    <t>
5313      <eref target=""/>:
5314      "'unsafe' characters"
5315      (<eref target=""/>)
5316    </t>
5317    <t>
5318      <eref target=""/>:
5319      "Chunk Size Definition"
5320      (<eref target=""/>)
5321    </t>
5322    <t>
5323      <eref target=""/>:
5324      "Message Length"
5325      (<eref target=""/>)
5326    </t>
5327    <t>
5328      <eref target=""/>:
5329      "Media Type Registrations"
5330      (<eref target=""/>)
5331    </t>
5332    <t>
5333      <eref target=""/>:
5334      "URI includes query"
5335      (<eref target=""/>)
5336    </t>
5337    <t>
5338      <eref target=""/>:
5339      "No close on 1xx responses"
5340      (<eref target=""/>)
5341    </t>
5342    <t>
5343      <eref target=""/>:
5344      "Remove 'identity' token references"
5345      (<eref target=""/>)
5346    </t>
5347    <t>
5348      <eref target=""/>:
5349      "Import query BNF"
5350    </t>
5351    <t>
5352      <eref target=""/>:
5353      "qdtext BNF"
5354    </t>
5355    <t>
5356      <eref target=""/>:
5357      "Normative and Informative references"
5358    </t>
5359    <t>
5360      <eref target=""/>:
5361      "RFC2606 Compliance"
5362    </t>
5363    <t>
5364      <eref target=""/>:
5365      "RFC977 reference"
5366    </t>
5367    <t>
5368      <eref target=""/>:
5369      "RFC1700 references"
5370    </t>
5371    <t>
5372      <eref target=""/>:
5373      "inconsistency in date format explanation"
5374    </t>
5375    <t>
5376      <eref target=""/>:
5377      "Date reference typo"
5378    </t>
5379    <t>
5380      <eref target=""/>:
5381      "Informative references"
5382    </t>
5383    <t>
5384      <eref target=""/>:
5385      "ISO-8859-1 Reference"
5386    </t>
5387    <t>
5388      <eref target=""/>:
5389      "Normative up-to-date references"
5390    </t>
5391  </list>
5394  Other changes:
5395  <list style="symbols">
5396    <t>
5397      Update media type registrations to use RFC4288 template.
5398    </t>
5399    <t>
5400      Use names of RFC4234 core rules DQUOTE and WSP,
5401      fix broken ABNF for chunk-data
5402      (work in progress on <eref target=""/>)
5403    </t>
5404  </list>
5408<section title="Since draft-ietf-httpbis-p1-messaging-01">
5410  Closed issues:
5411  <list style="symbols">
5412    <t>
5413      <eref target=""/>:
5414      "Bodies on GET (and other) requests"
5415    </t>
5416    <t>
5417      <eref target=""/>:
5418      "Updating to RFC4288"
5419    </t>
5420    <t>
5421      <eref target=""/>:
5422      "Status Code and Reason Phrase"
5423    </t>
5424    <t>
5425      <eref target=""/>:
5426      "rel_path not used"
5427    </t>
5428  </list>
5431  Ongoing work on ABNF conversion (<eref target=""/>):
5432  <list style="symbols">
5433    <t>
5434      Get rid of duplicate BNF rule names ("host" -> "uri-host", "trailer" ->
5435      "trailer-part").
5436    </t>
5437    <t>
5438      Avoid underscore character in rule names ("http_URL" ->
5439      "http-URL", "abs_path" -> "path-absolute").
5440    </t>
5441    <t>
5442      Add rules for terms imported from URI spec ("absoluteURI", "authority",
5443      "path-absolute", "port", "query", "relativeURI", "host) &mdash; these will
5444      have to be updated when switching over to RFC3986.
5445    </t>
5446    <t>
5447      Synchronize core rules with RFC5234.
5448    </t>
5449    <t>
5450      Get rid of prose rules that span multiple lines.
5451    </t>
5452    <t>
5453      Get rid of unused rules LOALPHA and UPALPHA.
5454    </t>
5455    <t>
5456      Move "Product Tokens" section (back) into Part 1, as "token" is used
5457      in the definition of the Upgrade header field.
5458    </t>
5459    <t>
5460      Add explicit references to BNF syntax and rules imported from other parts of the specification.
5461    </t>
5462    <t>
5463      Rewrite prose rule "token" in terms of "tchar", rewrite prose rule "TEXT".
5464    </t>
5465  </list>
5469<section title="Since draft-ietf-httpbis-p1-messaging-02" anchor="changes.since.02">
5471  Closed issues:
5472  <list style="symbols">
5473    <t>
5474      <eref target=""/>:
5475      "HTTP-date vs. rfc1123-date"
5476    </t>
5477    <t>
5478      <eref target=""/>:
5479      "WS in quoted-pair"
5480    </t>
5481  </list>
5484  Ongoing work on IANA Message Header Field Registration (<eref target=""/>):
5485  <list style="symbols">
5486    <t>
5487      Reference RFC 3984, and update header field registrations for headers defined
5488      in this document.
5489    </t>
5490  </list>
5493  Ongoing work on ABNF conversion (<eref target=""/>):
5494  <list style="symbols">
5495    <t>
5496      Replace string literals when the string really is case-sensitive (HTTP-Version).
5497    </t>
5498  </list>
5502<section title="Since draft-ietf-httpbis-p1-messaging-03" anchor="changes.since.03">
5504  Closed issues:
5505  <list style="symbols">
5506    <t>
5507      <eref target=""/>:
5508      "Connection closing"
5509    </t>
5510    <t>
5511      <eref target=""/>:
5512      "Move registrations and registry information to IANA Considerations"
5513    </t>
5514    <t>
5515      <eref target=""/>:
5516      "need new URL for PAD1995 reference"
5517    </t>
5518    <t>
5519      <eref target=""/>:
5520      "IANA Considerations: update HTTP URI scheme registration"
5521    </t>
5522    <t>
5523      <eref target=""/>:
5524      "Cite HTTPS URI scheme definition"
5525    </t>
5526    <t>
5527      <eref target=""/>:
5528      "List-type headers vs Set-Cookie"
5529    </t>
5530  </list>
5533  Ongoing work on ABNF conversion (<eref target=""/>):
5534  <list style="symbols">
5535    <t>
5536      Replace string literals when the string really is case-sensitive (HTTP-Date).
5537    </t>
5538    <t>
5539      Replace HEX by HEXDIG for future consistence with RFC 5234's core rules.
5540    </t>
5541  </list>
5545<section title="Since draft-ietf-httpbis-p1-messaging-04" anchor="changes.since.04">
5547  Closed issues:
5548  <list style="symbols">
5549    <t>
5550      <eref target=""/>:
5551      "Out-of-date reference for URIs"
5552    </t>
5553    <t>
5554      <eref target=""/>:
5555      "RFC 2822 is updated by RFC 5322"
5556    </t>
5557  </list>
5560  Ongoing work on ABNF conversion (<eref target=""/>):
5561  <list style="symbols">
5562    <t>
5563      Use "/" instead of "|" for alternatives.
5564    </t>
5565    <t>
5566      Get rid of RFC822 dependency; use RFC5234 plus extensions instead.
5567    </t>
5568    <t>
5569      Only reference RFC 5234's core rules.
5570    </t>
5571    <t>
5572      Introduce new ABNF rules for "bad" whitespace ("BWS"), optional
5573      whitespace ("OWS") and required whitespace ("RWS").
5574    </t>
5575    <t>
5576      Rewrite ABNFs to spell out whitespace rules, factor out
5577      header field value format definitions.
5578    </t>
5579  </list>
5583<section title="Since draft-ietf-httpbis-p1-messaging-05" anchor="changes.since.05">
5585  Closed issues:
5586  <list style="symbols">
5587    <t>
5588      <eref target=""/>:
5589      "Header LWS"
5590    </t>
5591    <t>
5592      <eref target=""/>:
5593      "Sort 1.3 Terminology"
5594    </t>
5595    <t>
5596      <eref target=""/>:
5597      "RFC2047 encoded words"
5598    </t>
5599    <t>
5600      <eref target=""/>:
5601      "Character Encodings in TEXT"
5602    </t>
5603    <t>
5604      <eref target=""/>:
5605      "Line Folding"
5606    </t>
5607    <t>
5608      <eref target=""/>:
5609      "OPTIONS * and proxies"
5610    </t>
5611    <t>
5612      <eref target=""/>:
5613      "Reason-Phrase BNF"
5614    </t>
5615    <t>
5616      <eref target=""/>:
5617      "Use of TEXT"
5618    </t>
5619    <t>
5620      <eref target=""/>:
5621      "Join "Differences Between HTTP Entities and RFC 2045 Entities"?"
5622    </t>
5623    <t>
5624      <eref target=""/>:
5625      "RFC822 reference left in discussion of date formats"
5626    </t>
5627  </list>
5630  Final work on ABNF conversion (<eref target=""/>):
5631  <list style="symbols">
5632    <t>
5633      Rewrite definition of list rules, deprecate empty list elements.
5634    </t>
5635    <t>
5636      Add appendix containing collected and expanded ABNF.
5637    </t>
5638  </list>
5641  Other changes:
5642  <list style="symbols">
5643    <t>
5644      Rewrite introduction; add mostly new Architecture Section.
5645    </t>
5646    <t>
5647      Move definition of quality values from Part 3 into Part 1;
5648      make TE request header field grammar independent of accept-params (defined in Part 3).
5649    </t>
5650  </list>
5654<section title="Since draft-ietf-httpbis-p1-messaging-06" anchor="changes.since.06">
5656  Closed issues:
5657  <list style="symbols">
5658    <t>
5659      <eref target=""/>:
5660      "base for numeric protocol elements"
5661    </t>
5662    <t>
5663      <eref target=""/>:
5664      "comment ABNF"
5665    </t>
5666  </list>
5669  Partly resolved issues:
5670  <list style="symbols">
5671    <t>
5672      <eref target=""/>:
5673      "205 Bodies" (took out language that implied that there might be
5674      methods for which a request body MUST NOT be included)
5675    </t>
5676    <t>
5677      <eref target=""/>:
5678      "editorial improvements around HTTP-date"
5679    </t>
5680  </list>
5684<section title="Since draft-ietf-httpbis-p1-messaging-07" anchor="changes.since.07">
5686  Closed issues:
5687  <list style="symbols">
5688    <t>
5689      <eref target=""/>:
5690      "Repeating single-value headers"
5691    </t>
5692    <t>
5693      <eref target=""/>:
5694      "increase connection limit"
5695    </t>
5696    <t>
5697      <eref target=""/>:
5698      "IP addresses in URLs"
5699    </t>
5700    <t>
5701      <eref target=""/>:
5702      "take over HTTP Upgrade Token Registry"
5703    </t>
5704    <t>
5705      <eref target=""/>:
5706      "CR and LF in chunk extension values"
5707    </t>
5708    <t>
5709      <eref target=""/>:
5710      "HTTP/0.9 support"
5711    </t>
5712    <t>
5713      <eref target=""/>:
5714      "pick IANA policy (RFC5226) for Transfer Coding / Content Coding"
5715    </t>
5716    <t>
5717      <eref target=""/>:
5718      "move definitions of gzip/deflate/compress to part 1"
5719    </t>
5720    <t>
5721      <eref target=""/>:
5722      "disallow control characters in quoted-pair"
5723    </t>
5724  </list>
5727  Partly resolved issues:
5728  <list style="symbols">
5729    <t>
5730      <eref target=""/>:
5731      "update IANA requirements wrt Transfer-Coding values" (add the
5732      IANA Considerations subsection)
5733    </t>
5734  </list>
5738<section title="Since draft-ietf-httpbis-p1-messaging-08" anchor="changes.since.08">
5740  Closed issues:
5741  <list style="symbols">
5742    <t>
5743      <eref target=""/>:
5744      "header parsing, treatment of leading and trailing OWS"
5745    </t>
5746  </list>
5749  Partly resolved issues:
5750  <list style="symbols">
5751    <t>
5752      <eref target=""/>:
5753      "Placement of 13.5.1 and 13.5.2"
5754    </t>
5755    <t>
5756      <eref target=""/>:
5757      "use of term "word" when talking about header structure"
5758    </t>
5759  </list>
5763<section title="Since draft-ietf-httpbis-p1-messaging-09" anchor="changes.since.09">
5765  Closed issues:
5766  <list style="symbols">
5767    <t>
5768      <eref target=""/>:
5769      "Clarification of the term 'deflate'"
5770    </t>
5771    <t>
5772      <eref target=""/>:
5773      "OPTIONS * and proxies"
5774    </t>
5775    <t>
5776      <eref target=""/>:
5777      "MIME-Version not listed in P1, general header fields"
5778    </t>
5779    <t>
5780      <eref target=""/>:
5781      "IANA registry for content/transfer encodings"
5782    </t>
5783    <t>
5784      <eref target=""/>:
5785      "Case-sensitivity of HTTP-date"
5786    </t>
5787    <t>
5788      <eref target=""/>:
5789      "use of term "word" when talking about header structure"
5790    </t>
5791  </list>
5794  Partly resolved issues:
5795  <list style="symbols">
5796    <t>
5797      <eref target=""/>:
5798      "Term for the requested resource's URI"
5799    </t>
5800  </list>
5804<section title="Since draft-ietf-httpbis-p1-messaging-10" anchor="changes.since.10">
5806  Closed issues:
5807  <list style="symbols">
5808    <t>
5809      <eref target=""/>:
5810      "Connection Closing"
5811    </t>
5812    <t>
5813      <eref target=""/>:
5814      "Delimiting messages with multipart/byteranges"
5815    </t>
5816    <t>
5817      <eref target=""/>:
5818      "Handling multiple Content-Length headers"
5819    </t>
5820    <t>
5821      <eref target=""/>:
5822      "Clarify entity / representation / variant terminology"
5823    </t>
5824    <t>
5825      <eref target=""/>:
5826      "consider removing the 'changes from 2068' sections"
5827    </t>
5828  </list>
5831  Partly resolved issues:
5832  <list style="symbols">
5833    <t>
5834      <eref target=""/>:
5835      "HTTP(s) URI scheme definitions"
5836    </t>
5837  </list>
5841<section title="Since draft-ietf-httpbis-p1-messaging-11" anchor="changes.since.11">
5843  Closed issues:
5844  <list style="symbols">
5845    <t>
5846      <eref target=""/>:
5847      "Trailer requirements"
5848    </t>
5849    <t>
5850      <eref target=""/>:
5851      "Text about clock requirement for caches belongs in p6"
5852    </t>
5853    <t>
5854      <eref target=""/>:
5855      "effective request URI: handling of missing host in HTTP/1.0"
5856    </t>
5857    <t>
5858      <eref target=""/>:
5859      "confusing Date requirements for clients"
5860    </t>
5861  </list>
5864  Partly resolved issues:
5865  <list style="symbols">
5866    <t>
5867      <eref target=""/>:
5868      "Handling multiple Content-Length headers"
5869    </t>
5870  </list>
5874<section title="Since draft-ietf-httpbis-p1-messaging-12" anchor="changes.since.12">
5876  Closed issues:
5877  <list style="symbols">
5878    <t>
5879      <eref target=""/>:
5880      "RFC2145 Normative"
5881    </t>
5882    <t>
5883      <eref target=""/>:
5884      "HTTP(s) URI scheme definitions" (tune the requirements on userinfo)
5885    </t>
5886    <t>
5887      <eref target=""/>:
5888      "define 'transparent' proxy"
5889    </t>
5890    <t>
5891      <eref target=""/>:
5892      "Header Classification"
5893    </t>
5894    <t>
5895      <eref target=""/>:
5896      "Is * usable as a request-uri for new methods?"
5897    </t>
5898    <t>
5899      <eref target=""/>:
5900      "Migrate Upgrade details from RFC2817"
5901    </t>
5902    <t>
5903      <eref target=""/>:
5904      "untangle ABNFs for header fields"
5905    </t>
5906    <t>
5907      <eref target=""/>:
5908      "update RFC 2109 reference"
5909    </t>
5910  </list>
5914<section title="Since draft-ietf-httpbis-p1-messaging-13" anchor="changes.since.13">
5916  Closed issues:
5917  <list style="symbols">
5918    <t>
5919      <eref target=""/>:
5920      "Allow is not in 13.5.2"
5921    </t>
5922    <t>
5923      <eref target=""/>:
5924      "Handling multiple Content-Length headers"
5925    </t>
5926    <t>
5927      <eref target=""/>:
5928      "untangle ABNFs for header fields"
5929    </t>
5930    <t>
5931      <eref target=""/>:
5932      "Content-Length ABNF broken"
5933    </t>
5934  </list>
5938<section title="Since draft-ietf-httpbis-p1-messaging-14" anchor="changes.since.14">
5940  Closed issues:
5941  <list style="symbols">
5942    <t>
5943      <eref target=""/>:
5944      "HTTP-Version should be redefined as fixed length pair of DIGIT . DIGIT"
5945    </t>
5946    <t>
5947      <eref target=""/>:
5948      "Recommend minimum sizes for protocol elements"
5949    </t>
5950    <t>
5951      <eref target=""/>:
5952      "Set expectations around buffering"
5953    </t>
5954    <t>
5955      <eref target=""/>:
5956      "Considering messages in isolation"
5957    </t>
5958  </list>
5962<section title="Since draft-ietf-httpbis-p1-messaging-15" anchor="changes.since.15">
5964  Closed issues:
5965  <list style="symbols">
5966    <t>
5967      <eref target=""/>:
5968      "DNS Spoofing / DNS Binding advice"
5969    </t>
5970    <t>
5971      <eref target=""/>:
5972      "\-escaping in quoted strings"
5973    </t>
5974    <t>
5975      <eref target=""/>:
5976      "'Close' should be reserved in the HTTP header field registry"
5977    </t>
5978  </list>
Note: See TracBrowser for help on using the repository browser.