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

Last change on this file since 543 was 543, checked in by julian.reschke@…, 11 years ago

Resolve #36: In P2..P7, mention list rule defined in P1; also point to Appendix containing collected ABNF with list rule being expanded (closes #36)

  • Property svn:eol-style set to native
File size: 212.9 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<?xml-stylesheet type='text/xsl' href='../myxml2rfc.xslt'?>
3<!DOCTYPE rfc [
4  <!ENTITY MAY "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MAY</bcp14>">
5  <!ENTITY MUST "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST</bcp14>">
6  <!ENTITY MUST-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST NOT</bcp14>">
7  <!ENTITY OPTIONAL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>OPTIONAL</bcp14>">
8  <!ENTITY RECOMMENDED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>RECOMMENDED</bcp14>">
9  <!ENTITY REQUIRED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>REQUIRED</bcp14>">
10  <!ENTITY SHALL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL</bcp14>">
11  <!ENTITY SHALL-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL NOT</bcp14>">
12  <!ENTITY SHOULD "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD</bcp14>">
13  <!ENTITY SHOULD-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD NOT</bcp14>">
14  <!ENTITY ID-VERSION "latest">
15  <!ENTITY ID-MONTH "March">
16  <!ENTITY ID-YEAR "2009">
17  <!ENTITY caching                "<xref target='Part6' x:rel='#caching' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
18  <!ENTITY payload                "<xref target='Part3' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
19  <!ENTITY media-types            "<xref target='Part3' x:rel='#media.types' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
20  <!ENTITY content-codings        "<xref target='Part3' x:rel='#content.codings' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
21  <!ENTITY CONNECT                "<xref target='Part2' x:rel='#CONNECT' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
22  <!ENTITY content.negotiation    "<xref target='Part3' x:rel='#content.negotiation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
23  <!ENTITY diff2045entity         "<xref target='Part3' x:rel='#differences.between.http.entities.and.rfc.2045.entities' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
24  <!ENTITY entity                 "<xref target='Part3' x:rel='#entity' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
25  <!ENTITY entity-body            "<xref target='Part3' x:rel='#entity.body' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
26  <!ENTITY entity-header-fields   "<xref target='Part3' x:rel='#entity.header.fields' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
27  <!ENTITY header-cache-control   "<xref target='Part6' x:rel='#header.cache-control' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
28  <!ENTITY header-expect          "<xref target='Part2' x:rel='#header.expect' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
29  <!ENTITY header-pragma          "<xref target='Part6' x:rel='#header.pragma' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
30  <!ENTITY header-warning         "<xref target='Part6' x:rel='#header.warning' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
31  <!ENTITY idempotent-methods     "<xref target='Part2' x:rel='#idempotent.methods' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
32  <!ENTITY request-header-fields  "<xref target='Part2' x:rel='#request.header.fields' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
33  <!ENTITY response-header-fields "<xref target='Part2' x:rel='#response.header.fields' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
34  <!ENTITY method                 "<xref target='Part2' x:rel='#method' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
35  <!ENTITY status-codes           "<xref target='Part2' x:rel='#status.codes' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
36  <!ENTITY status-100             "<xref target='Part2' x:rel='#status.100' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
37  <!ENTITY status-1xx             "<xref target='Part2' x:rel='#status.1xx' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
38  <!ENTITY status-414             "<xref target='Part2' x:rel='#status.414' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
39]>
40<?rfc toc="yes" ?>
41<?rfc symrefs="yes" ?>
42<?rfc sortrefs="yes" ?>
43<?rfc compact="yes"?>
44<?rfc subcompact="no" ?>
45<?rfc linkmailto="no" ?>
46<?rfc editing="no" ?>
47<?rfc comments="yes"?>
48<?rfc inline="yes"?>
49<?rfc-ext allow-markup-in-artwork="yes" ?>
50<?rfc-ext include-references-in-index="yes" ?>
51<rfc obsoletes="2616" category="std" x:maturity-level="draft"
52     ipr="pre5378Trust200902" docName="draft-ietf-httpbis-p1-messaging-&ID-VERSION;"
53     xmlns:x='http://purl.org/net/xml2rfc/ext'>
54<front>
55
56  <title abbrev="HTTP/1.1, Part 1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title>
57
58  <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
59    <organization abbrev="Day Software">Day Software</organization>
60    <address>
61      <postal>
62        <street>23 Corporate Plaza DR, Suite 280</street>
63        <city>Newport Beach</city>
64        <region>CA</region>
65        <code>92660</code>
66        <country>USA</country>
67      </postal>
68      <phone>+1-949-706-5300</phone>
69      <facsimile>+1-949-706-5305</facsimile>
70      <email>fielding@gbiv.com</email>
71      <uri>http://roy.gbiv.com/</uri>
72    </address>
73  </author>
74
75  <author initials="J." surname="Gettys" fullname="Jim Gettys">
76    <organization>One Laptop per Child</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>jg@laptop.org</email>
86      <uri>http://www.laptop.org/</uri>
87    </address>
88  </author>
89 
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>JeffMogul@acm.org</email>
102    </address>
103  </author>
104
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>henrikn@microsoft.com</email>
116    </address>
117  </author>
118
119  <author initials="L." surname="Masinter" fullname="Larry Masinter">
120    <organization abbrev="Adobe Systems">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>LMM@acm.org</email>
130      <uri>http://larry.masinter.net/</uri>
131    </address>
132  </author>
133 
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>paulle@microsoft.com</email>
144    </address>
145  </author>
146   
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>timbl@w3.org</email>
160      <uri>http://www.w3.org/People/Berners-Lee/</uri>
161    </address>
162  </author>
163
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>ylafon@w3.org</email>
176      <uri>http://www.raubacapeu.net/people/yves/</uri>
177    </address>
178  </author>
179
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>julian.reschke@greenbytes.de</email>       
191      <uri>http://greenbytes.de/tech/webdav/</uri>     
192    </address>
193  </author>
194
195  <date month="&ID-MONTH;" year="&ID-YEAR;"/>
196  <workgroup>HTTPbis Working Group</workgroup>
197
198<abstract>
199<t>
200   The Hypertext Transfer Protocol (HTTP) is an application-level
201   protocol for distributed, collaborative, hypertext information
202   systems. HTTP has been in use by the World Wide Web global information
203   initiative since 1990. This document is Part 1 of the seven-part specification
204   that defines the protocol referred to as "HTTP/1.1" and, taken together,
205   obsoletes RFC 2616.  Part 1 provides an overview of HTTP and
206   its associated terminology, defines the "http" and "https" Uniform
207   Resource Identifier (URI) schemes, defines the generic message syntax
208   and parsing requirements for HTTP message frames, and describes
209   general security concerns for implementations.
210</t>
211</abstract>
212
213<note title="Editorial Note (To be removed by RFC Editor)">
214  <t>
215    Discussion of this draft should take place on the HTTPBIS working group
216    mailing list (ietf-http-wg@w3.org). The current issues list is
217    at <eref target="http://tools.ietf.org/wg/httpbis/trac/report/11"/>
218    and related documents (including fancy diffs) can be found at
219    <eref target="http://tools.ietf.org/wg/httpbis/"/>.
220  </t>
221  <t>
222    The changes in this draft are summarized in <xref target="changes.since.05"/>.
223  </t>
224</note>
225</front>
226<middle>
227<section title="Introduction" anchor="introduction">
228<t>
229   The Hypertext Transfer Protocol (HTTP) is an application-level
230   request/response protocol that uses extensible semantics and MIME-like
231   message payloads for flexible interaction with network-based hypertext
232   information systems. HTTP relies upon the Uniform Resource Identifier (URI)
233   standard <xref target="RFC3986"/> to indicate resource targets and
234   relationships between resources.
235   Messages are passed in a format similar to that used by Internet mail
236   <xref target="RFC5322"/> and the Multipurpose Internet Mail Extensions
237   (MIME) <xref target="RFC2045"/> (see &diff2045entity; for the differences
238   between HTTP and MIME messages).
239</t>
240<t>
241   HTTP is a generic interface protocol for informations systems. It is
242   designed to hide the details of how a service is implemented by presenting
243   a uniform interface to clients that is independent of the types of
244   resources provided. Likewise, servers do not need to be aware of each
245   client's purpose: an HTTP request can be considered in isolation rather
246   than being associated with a specific type of client or a predetermined
247   sequence of application steps. The result is a protocol that can be used
248   effectively in many different contexts and for which implementations can
249   evolve independently over time.
250</t>
251<t>
252   HTTP is also designed for use as a generic protocol for translating
253   communication to and from other Internet information systems, such as
254   USENET news services via NNTP <xref target="RFC3977"/>,
255   file services via FTP <xref target="RFC959"/>,
256   Gopher <xref target="RFC1436"/>, and WAIS <xref target="WAIS"/>.
257   HTTP proxies and gateways provide access to alternative information
258   services by translating their diverse protocols into a hypertext
259   format that can be viewed and manipulated by clients in the same way
260   as HTTP services.
261</t>
262<t>
263   One consequence of HTTP flexibility is that the protocol cannot be defined
264   in terms of what occurs behind the interface. Instead, we are
265   limited to defining the syntax of communication, the intent
266   of received communication, and the expected behavior of recipients. If
267   the communication is considered in isolation, then successful actions
268   should be reflected in the observable interface provided by servers.
269   However, since many clients are potentially acting in parallel and
270   perhaps at cross-purposes, it would be meaningless to require that such
271   behavior be observable.
272</t>
273<t>
274   This document is Part 1 of the seven-part specification of HTTP,
275   defining the protocol referred to as "HTTP/1.1" and obsoleting
276   <xref target="RFC2616"/>.
277   Part 1 defines the URI schemes specific to HTTP-based resources, overall
278   network operation, transport protocol connection management, and HTTP
279   message framing and forwarding requirements.
280   Our goal is to define all of the mechanisms necessary for HTTP message
281   handling that are independent of message semantics, thereby defining the
282   complete set of requirements for a message parser and transparent
283   message-forwarding intermediaries.
284</t>
285
286<section title="Requirements" anchor="intro.requirements">
287<t>
288   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
289   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
290   document are to be interpreted as described in <xref target="RFC2119"/>.
291</t>
292<t>
293   An implementation is not compliant if it fails to satisfy one or more
294   of the &MUST; or &REQUIRED; level requirements for the protocols it
295   implements. An implementation that satisfies all the &MUST; or &REQUIRED;
296   level and all the &SHOULD; level requirements for its protocols is said
297   to be "unconditionally compliant"; one that satisfies all the &MUST;
298   level requirements but not all the &SHOULD; level requirements for its
299   protocols is said to be "conditionally compliant."
300</t>
301</section>
302
303<section title="Syntax Notation" anchor="notation">
304<iref primary="true" item="Grammar" subitem="ALPHA"/>
305<iref primary="true" item="Grammar" subitem="CR"/>
306<iref primary="true" item="Grammar" subitem="CRLF"/>
307<iref primary="true" item="Grammar" subitem="CTL"/>
308<iref primary="true" item="Grammar" subitem="DIGIT"/>
309<iref primary="true" item="Grammar" subitem="DQUOTE"/>
310<iref primary="true" item="Grammar" subitem="HEXDIG"/>
311<iref primary="true" item="Grammar" subitem="LF"/>
312<iref primary="true" item="Grammar" subitem="OCTET"/>
313<iref primary="true" item="Grammar" subitem="SP"/>
314<iref primary="true" item="Grammar" subitem="VCHAR"/>
315<iref primary="true" item="Grammar" subitem="WSP"/>
316<t>
317   This specification uses the Augmented Backus-Naur Form (ABNF) notation
318   of <xref target="RFC5234"/>.
319</t>
320<t anchor="core.rules">
321  <x:anchor-alias value="ALPHA"/>
322  <x:anchor-alias value="CTL"/>
323  <x:anchor-alias value="CR"/>
324  <x:anchor-alias value="CRLF"/>
325  <x:anchor-alias value="DIGIT"/>
326  <x:anchor-alias value="DQUOTE"/>
327  <x:anchor-alias value="HEXDIG"/>
328  <x:anchor-alias value="LF"/>
329  <x:anchor-alias value="OCTET"/>
330  <x:anchor-alias value="SP"/>
331  <x:anchor-alias value="VCHAR"/>
332  <x:anchor-alias value="WSP"/>
333   The following core rules are included by
334   reference, as defined in <xref target="RFC5234" x:fmt="," x:sec="B.1"/>:
335   ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls),
336   DIGIT (decimal 0-9), DQUOTE (double quote),
337   HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed),
338   OCTET (any 8-bit sequence of data), SP (space),
339   VCHAR (any visible <xref target="USASCII"/> character),
340   and WSP (whitespace).
341</t>
342
343<section title="ABNF Extension: #rule" anchor="notation.abnf">
344  <t>
345    One extension to the ABNF rules of <xref target="RFC5234"/> is used to
346    improve readability.
347  </t>
348  <t>
349    A construct "#" is defined, similar to "*", for defining lists of
350    elements. The full form is "&lt;n&gt;#&lt;m&gt;element" indicating at least
351    &lt;n&gt; and at most &lt;m&gt; elements, each separated by a single comma
352    (",") and optional whitespace (OWS).   
353  </t>
354  <figure><preamble>
355    Thus,
356</preamble><artwork type="example">
357  1#element =&gt; element *( OWS "," OWS element )
358</artwork></figure>
359  <figure><preamble>
360    and:
361</preamble><artwork type="example">
362  #element =&gt; [ 1#element ]
363</artwork></figure>
364  <figure><preamble>
365    and for n &gt;= 1 and m &gt; 1:
366</preamble><artwork type="example">
367  &lt;n&gt;#&lt;m&gt;element =&gt; element &lt;n-1&gt;*&lt;m-1&gt;( OWS "," OWS element )
368</artwork></figure>
369  <t>
370    For compatibility with legacy list rules, recipients &SHOULD; accept empty
371    list elements. In other words, consumers would follow the list productions:
372  </t>
373<figure><artwork type="example">
374  #element =&gt; [ ( "," / element ) *( OWS "," [ OWS element ] ) ]
375 
376  1#element =&gt; *( "," OWS ) element *( OWS "," [ OWS element ] )
377</artwork></figure> 
378<t>
379  <xref target="collected.abnf"/> shows the collected ABNF, with the list rules
380  expanded as explained above.
381</t>
382</section>
383
384<section title="Basic Rules" anchor="basic.rules">
385<t anchor="rule.CRLF">
386  <x:anchor-alias value="CRLF"/>
387   HTTP/1.1 defines the sequence CR LF as the end-of-line marker for all
388   protocol elements except the entity-body (see <xref target="tolerant.applications"/> for
389   tolerant applications). The end-of-line marker within an entity-body
390   is defined by its associated media type, as described in &media-types;.
391</t>
392<t anchor="rule.LWS">
393   This specification uses three rules to denote the use of linear
394   whitespace: OWS (optional whitespace), RWS (required whitespace), and
395   BWS ("bad" whitespace).
396</t>
397<t>
398   The OWS rule is used where zero or more linear whitespace characters may
399   appear. OWS &SHOULD; either not be produced or be produced as a single SP
400   character. Multiple OWS characters that occur within field-content &SHOULD;
401   be replaced with a single SP before interpreting the field value or
402   forwarding the message downstream.
403</t>
404<t>
405   RWS is used when at least one linear whitespace character is required to
406   separate field tokens. RWS &SHOULD; be produced as a single SP character.
407   Multiple RWS characters that occur within field-content &SHOULD; be
408   replaced with a single SP before interpreting the field value or
409   forwarding the message downstream.
410</t>
411<t>
412   BWS is used where the grammar allows optional whitespace for historical
413   reasons but senders &SHOULD-NOT; produce it in messages. HTTP/1.1
414   recipients &MUST; accept such bad optional whitespace and remove it before
415   interpreting the field value or forwarding the message downstream.
416</t>
417<t anchor="rule.whitespace">
418  <x:anchor-alias value="BWS"/>
419  <x:anchor-alias value="OWS"/>
420  <x:anchor-alias value="RWS"/>
421  <x:anchor-alias value="obs-fold"/>
422</t>
423<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"/>
424  <x:ref>OWS</x:ref>            = *( [ obs-fold ] <x:ref>WSP</x:ref> )
425                 ; "optional" whitespace
426  <x:ref>RWS</x:ref>            = 1*( [ obs-fold ] <x:ref>WSP</x:ref> )
427                 ; "required" whitespace
428  <x:ref>BWS</x:ref>            = <x:ref>OWS</x:ref>
429                 ; "bad" whitespace
430  <x:ref>obs-fold</x:ref>       = <x:ref>CRLF</x:ref>
431                 ; see <xref target="message.headers"/>
432</artwork></figure>
433<t anchor="rule.token.separators">
434  <x:anchor-alias value="tchar"/>
435  <x:anchor-alias value="token"/>
436   Many HTTP/1.1 header field values consist of words separated by whitespace
437   or special characters. These special characters &MUST; be in a quoted
438   string to be used within a parameter value (as defined in
439   <xref target="transfer.codings"/>).
440</t>
441<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="token"/><iref primary="true" item="Grammar" subitem="tchar"/>
442  <x:ref>tchar</x:ref>          = "!" / "#" / "$" / "%" / "&amp;" / "'" / "*"
443                 / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
444                 / <x:ref>DIGIT</x:ref> / <x:ref>ALPHA</x:ref>
445                 
446  <x:ref>token</x:ref>          = 1*<x:ref>tchar</x:ref>
447</artwork></figure>
448<t anchor="rule.quoted-string">
449  <x:anchor-alias value="quoted-string"/>
450  <x:anchor-alias value="qdtext"/>
451  <x:anchor-alias value="obs-text"/>
452   A string of text is parsed as a single word if it is quoted using
453   double-quote marks.
454</t>
455<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"/>
456  <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>
457  <x:ref>qdtext</x:ref>         = *( <x:ref>OWS</x:ref> / %x21 / %x23-5B / %x5D-7E / <x:ref>obs-text</x:ref> )
458  <x:ref>obs-text</x:ref>       = %x80-FF
459</artwork></figure>
460<t anchor="rule.quoted-pair">
461  <x:anchor-alias value="quoted-pair"/>
462  <x:anchor-alias value="quoted-text"/>
463   The backslash character ("\") &MAY; be used as a single-character
464   quoting mechanism only within quoted-string and comment constructs.
465</t>
466<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="quoted-text"/><iref primary="true" item="Grammar" subitem="quoted-pair"/>
467  <x:ref>quoted-text</x:ref>    = %x01-09 /
468                   %x0B-0C /
469                   %x0E-FF ; Characters excluding NUL, <x:ref>CR</x:ref> and <x:ref>LF</x:ref>
470  <x:ref>quoted-pair</x:ref>    = "\" <x:ref>quoted-text</x:ref>
471</artwork></figure>
472</section>
473
474<section title="ABNF Rules defined in other Parts of the Specification" anchor="abnf.dependencies">
475  <x:anchor-alias value="request-header"/>
476  <x:anchor-alias value="response-header"/>
477  <x:anchor-alias value="entity-body"/>
478  <x:anchor-alias value="entity-header"/>
479  <x:anchor-alias value="Cache-Control"/>
480  <x:anchor-alias value="Pragma"/>
481  <x:anchor-alias value="Warning"/>
482<t>
483  The ABNF rules below are defined in other parts:
484</t>
485<figure><!-- Part2--><artwork type="abnf2616">
486  <x:ref>request-header</x:ref>  = &lt;request-header, defined in &request-header-fields;&gt;
487  <x:ref>response-header</x:ref> = &lt;response-header, defined in &response-header-fields;&gt;
488</artwork></figure>
489<figure><!-- Part3--><artwork type="abnf2616">
490  <x:ref>entity-body</x:ref>     = &lt;entity-body, defined in &entity-body;&gt;
491  <x:ref>entity-header</x:ref>   = &lt;entity-header, defined in &entity-header-fields;&gt;
492</artwork></figure>
493<figure><!-- Part6--><artwork type="abnf2616">
494  <x:ref>Cache-Control</x:ref>   = &lt;Cache-Control, defined in &header-pragma;&gt;
495  <x:ref>Pragma</x:ref>          = &lt;Pragma, defined in &header-pragma;&gt;
496  <x:ref>Warning</x:ref>         = &lt;Warning, defined in &header-warning;&gt;
497</artwork></figure>
498</section>
499
500</section>
501</section>
502
503<section title="HTTP architecture" anchor="architecture">
504<t>
505   HTTP was created with a specific architecture in mind, the World Wide Web,
506   and has evolved over time to support the scalability needs of a worldwide
507   hypertext system. Much of that architecture is reflected in the terminology
508   and syntax productions used to define HTTP.
509</t>
510
511<section title="Uniform Resource Identifiers" anchor="uri">
512<t>
513   Uniform Resource Identifiers (URIs) <xref target="RFC3986"/> are used
514   throughout HTTP as the means for identifying resources. URI references
515   are used to target requests, redirect responses, and define relationships.
516   HTTP does not limit what a resource may be; it merely defines an interface
517   that can be used to interact with a resource via HTTP. More information on
518   the scope of URIs and resources can be found in <xref target="RFC3986"/>.
519</t>
520  <x:anchor-alias value="URI"/>
521  <x:anchor-alias value="URI-reference"/>
522  <x:anchor-alias value="absolute-URI"/>
523  <x:anchor-alias value="relative-part"/>
524  <x:anchor-alias value="authority"/>
525  <x:anchor-alias value="fragment"/>
526  <x:anchor-alias value="path-abempty"/>
527  <x:anchor-alias value="path-absolute"/>
528  <x:anchor-alias value="port"/>
529  <x:anchor-alias value="query"/>
530  <x:anchor-alias value="uri-host"/>
531  <x:anchor-alias value="partial-URI"/>
532<t>
533   This specification adopts the definitions of "URI-reference",
534   "absolute-URI", "relative-part", "fragment", "port", "host",
535   "path-abempty", "path-absolute", "query", and "authority" from
536   <xref target="RFC3986"/>. In addition, we define a partial-URI rule for
537   protocol elements that allow a relative URI without a fragment.
538</t>
539<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"/>
540  <x:ref>URI</x:ref>           = &lt;URI, defined in <xref target="RFC3986" x:fmt="," x:sec="3"/>&gt;
541  <x:ref>URI-reference</x:ref> = &lt;URI-reference, defined in <xref target="RFC3986" x:fmt="," x:sec="4.1"/>&gt;
542  <x:ref>absolute-URI</x:ref>  = &lt;absolute-URI, defined in <xref target="RFC3986" x:fmt="," x:sec="4.3"/>&gt;
543  <x:ref>relative-part</x:ref> = &lt;relative-part, defined in <xref target="RFC3986" x:fmt="," x:sec="4.2"/>&gt;
544  <x:ref>authority</x:ref>     = &lt;authority, defined in <xref target="RFC3986" x:fmt="," x:sec="3.2"/>&gt;
545  <x:ref>fragment</x:ref>      = &lt;fragment, defined in <xref target="RFC3986" x:fmt="," x:sec="3.5"/>&gt;
546  <x:ref>path-abempty</x:ref>  = &lt;path-abempty, defined in <xref target="RFC3986" x:fmt="," x:sec="3.3"/>&gt;
547  <x:ref>path-absolute</x:ref> = &lt;path-absolute, defined in <xref target="RFC3986" x:fmt="," x:sec="3.3"/>&gt;
548  <x:ref>port</x:ref>          = &lt;port, defined in <xref target="RFC3986" x:fmt="," x:sec="3.2.3"/>&gt;
549  <x:ref>query</x:ref>         = &lt;query, defined in <xref target="RFC3986" x:fmt="," x:sec="3.4"/>&gt;
550  <x:ref>uri-host</x:ref>      = &lt;host, defined in <xref target="RFC3986" x:fmt="," x:sec="3.2.2"/>&gt;
551 
552  <x:ref>partial-URI</x:ref>   = relative-part [ "?" query ]
553</artwork></figure>
554<t>
555   Each protocol element in HTTP that allows a URI reference will indicate in
556   its ABNF production whether the element allows only a URI in absolute form
557   (absolute-URI), any relative reference (relative-ref), or some other subset
558   of the URI-reference grammar. Unless otherwise indicated, URI references
559   are parsed relative to the request target (the default base URI for both
560   the request and its corresponding response).
561</t>
562
563<section title="http URI scheme" anchor="http.uri">
564  <x:anchor-alias value="http-URI"/>
565  <iref item="http URI scheme" primary="true"/>
566  <iref item="URI scheme" subitem="http" primary="true"/>
567<t>
568   The "http" scheme is used to locate network resources via the HTTP
569   protocol.
570</t>
571<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="http-URI"/>
572  <x:ref>http-URI</x:ref> = "http:" "//" <x:ref>authority</x:ref> <x:ref>path-abempty</x:ref> [ "?" <x:ref>query</x:ref> ]
573</artwork></figure>
574<t>
575   If the port is empty or not given, port 80 is assumed. The semantics
576   are that the identified resource is located at the server listening
577   for TCP connections on that port of that host, and the request-target
578   for the resource is path-absolute (<xref target="request-target"/>). The use of IP addresses
579   in URLs &SHOULD; be avoided whenever possible (see <xref target="RFC1900"/>). If
580   the path-absolute is not present in the URL, it &MUST; be given as "/" when
581   used as a request-target for a resource (<xref target="request-target"/>). If a proxy
582   receives a host name which is not a fully qualified domain name, it
583   &MAY; add its domain to the host name it received. If a proxy receives
584   a fully qualified domain name, the proxy &MUST-NOT; change the host
585   name.
586</t>
587</section>
588
589<section title="https URI scheme" anchor="https.uri">
590   <iref item="https URI scheme"/>
591   <iref item="URI scheme" subitem="https"/>
592<t>
593   <cref>TBD: Define and explain purpose of https scheme.</cref>
594</t>
595<t><list><t>
596  <x:h>Note:</x:h> the "https" scheme is defined in <xref target="RFC2818"/>.
597</t></list></t>
598</section>
599
600<section title="URI Comparison" anchor="uri.comparison">
601<t>
602   When comparing two URIs to decide if they match or not, a client
603   &SHOULD; use a case-sensitive octet-by-octet comparison of the entire
604   URIs, with these exceptions:
605  <list style="symbols">
606    <t>A port that is empty or not given is equivalent to the default
607        port for that URI-reference;</t>
608    <t>Comparisons of host names &MUST; be case-insensitive;</t>
609    <t>Comparisons of scheme names &MUST; be case-insensitive;</t>
610    <t>An empty path-absolute is equivalent to a path-absolute of "/".</t>
611    <t>Characters other than those in the "reserved" set are equivalent to their
612       percent-encoded octets (see <xref target="RFC3986" x:fmt="," x:sec="2.1"/>).
613    </t>
614  </list>
615</t>
616<t>
617   For example, the following three URIs are equivalent:
618</t>
619<figure><artwork type="example">
620   http://example.com:80/~smith/home.html
621   http://EXAMPLE.com/%7Esmith/home.html
622   http://EXAMPLE.com:/%7esmith/home.html
623</artwork></figure>
624</section>
625
626<section title="Scheme aliases considered harmful" anchor="scheme.aliases">
627<t>
628</t>
629</section>
630</section>
631
632<section title="Overall Operation" anchor="intro.overall.operation">
633<t>
634   HTTP is a request/response protocol. A client sends a
635   request to the server in the form of a request method, URI, and
636   protocol version, followed by a MIME-like message containing request
637   modifiers, client information, and possible body content over a
638   connection with a server. The server responds with a status line,
639   including the message's protocol version and a success or error code,
640   followed by a MIME-like message containing server information, entity
641   metainformation, and possible entity-body content.
642</t>
643<t>
644   Most HTTP communication is initiated by a user agent and consists of
645   a request to be applied to a resource on some origin server. In the
646   simplest case, this may be accomplished via a single connection (v)
647   between the user agent (UA) and the origin server (O).
648</t>
649<figure><artwork type="drawing">
650       request chain ------------------------&gt;
651    UA -------------------v------------------- O
652       &lt;----------------------- response chain
653</artwork></figure>
654<t>
655   A more complicated situation occurs when one or more intermediaries
656   are present in the request/response chain. There are three common
657   forms of intermediary: proxy, gateway, and tunnel. A proxy is a
658   forwarding agent, receiving requests for a URI in its absolute form,
659   rewriting all or part of the message, and forwarding the reformatted
660   request toward the server identified by the URI. A gateway is a
661   receiving agent, acting as a layer above some other server(s) and, if
662   necessary, translating the requests to the underlying server's
663   protocol. A tunnel acts as a relay point between two connections
664   without changing the messages; tunnels are used when the
665   communication needs to pass through an intermediary (such as a
666   firewall) even when the intermediary cannot understand the contents
667   of the messages.
668</t>
669<figure><artwork type="drawing">
670       request chain --------------------------------------&gt;
671    UA -----v----- A -----v----- B -----v----- C -----v----- O
672       &lt;------------------------------------- response chain
673</artwork></figure>
674<t>
675   The figure above shows three intermediaries (A, B, and C) between the
676   user agent and origin server. A request or response message that
677   travels the whole chain will pass through four separate connections.
678   This distinction is important because some HTTP communication options
679   may apply only to the connection with the nearest, non-tunnel
680   neighbor, only to the end-points of the chain, or to all connections
681   along the chain. Although the diagram is linear, each participant may
682   be engaged in multiple, simultaneous communications. For example, B
683   may be receiving requests from many clients other than A, and/or
684   forwarding requests to servers other than C, at the same time that it
685   is handling A's request.
686</t>
687<t>
688   Any party to the communication which is not acting as a tunnel may
689   employ an internal cache for handling requests. The effect of a cache
690   is that the request/response chain is shortened if one of the
691   participants along the chain has a cached response applicable to that
692   request. The following illustrates the resulting chain if B has a
693   cached copy of an earlier response from O (via C) for a request which
694   has not been cached by UA or A.
695</t>
696<figure><artwork type="drawing">
697          request chain ----------&gt;
698       UA -----v----- A -----v----- B - - - - - - C - - - - - - O
699          &lt;--------- response chain
700</artwork></figure>
701<t>
702   Not all responses are usefully cacheable, and some requests may
703   contain modifiers which place special requirements on cache behavior.
704   HTTP requirements for cache behavior and cacheable responses are
705   defined in &caching;.
706</t>
707<t>
708   In fact, there are a wide variety of architectures and configurations
709   of caches and proxies currently being experimented with or deployed
710   across the World Wide Web. These systems include national hierarchies
711   of proxy caches to save transoceanic bandwidth, systems that
712   broadcast or multicast cache entries, organizations that distribute
713   subsets of cached data via CD-ROM, and so on. HTTP systems are used
714   in corporate intranets over high-bandwidth links, and for access via
715   PDAs with low-power radio links and intermittent connectivity. The
716   goal of HTTP/1.1 is to support the wide diversity of configurations
717   already deployed while introducing protocol constructs that meet the
718   needs of those who build web applications that require high
719   reliability and, failing that, at least reliable indications of
720   failure.
721</t>
722<t>
723   HTTP communication usually takes place over TCP/IP connections. The
724   default port is TCP 80 (<eref target="http://www.iana.org/assignments/port-numbers"/>), but other ports can be used. This does
725   not preclude HTTP from being implemented on top of any other protocol
726   on the Internet, or on other networks. HTTP only presumes a reliable
727   transport; any protocol that provides such guarantees can be used;
728   the mapping of the HTTP/1.1 request and response structures onto the
729   transport data units of the protocol in question is outside the scope
730   of this specification.
731</t>
732<t>
733   In HTTP/1.0, most implementations used a new connection for each
734   request/response exchange. In HTTP/1.1, a connection may be used for
735   one or more request/response exchanges, although connections may be
736   closed for a variety of reasons (see <xref target="persistent.connections"/>).
737</t>
738</section>
739
740<section title="Use of HTTP for proxy communication" anchor="http.proxy">
741<t>
742   <cref>TBD: Configured to use HTTP to proxy HTTP or other protocols.</cref>
743</t>
744</section>
745<section title="Interception of HTTP for access control" anchor="http.intercept">
746<t>
747   <cref>TBD: Interception of HTTP traffic for initiating access control.</cref>
748</t>
749</section>
750<section title="Use of HTTP by other protocols" anchor="http.others">
751<t>
752   <cref>TBD: Profiles of HTTP defined by other protocol.
753   Extensions of HTTP like WebDAV.</cref>
754</t>
755</section>
756<section title="Use of HTTP by media type specification" anchor="http.media">
757<t>
758   <cref>TBD: Instructions on composing HTTP requests via hypertext formats.</cref>
759</t>
760</section>
761</section>
762
763<section title="Protocol Parameters" anchor="protocol.parameters">
764
765<section title="HTTP Version" anchor="http.version">
766  <x:anchor-alias value="HTTP-Version"/>
767  <x:anchor-alias value="HTTP-Prot-Name"/>
768<t>
769   HTTP uses a "&lt;major&gt;.&lt;minor&gt;" numbering scheme to indicate versions
770   of the protocol. The protocol versioning policy is intended to allow
771   the sender to indicate the format of a message and its capacity for
772   understanding further HTTP communication, rather than the features
773   obtained via that communication. No change is made to the version
774   number for the addition of message components which do not affect
775   communication behavior or which only add to extensible field values.
776   The &lt;minor&gt; number is incremented when the changes made to the
777   protocol add features which do not change the general message parsing
778   algorithm, but which may add to the message semantics and imply
779   additional capabilities of the sender. The &lt;major&gt; number is
780   incremented when the format of a message within the protocol is
781   changed. See <xref target="RFC2145"/> for a fuller explanation.
782</t>
783<t>
784   The version of an HTTP message is indicated by an HTTP-Version field
785   in the first line of the message. HTTP-Version is case-sensitive.
786</t>
787<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="HTTP-Version"/><iref primary="true" item="Grammar" subitem="HTTP-Prot-Name"/>
788  <x:ref>HTTP-Version</x:ref>   = <x:ref>HTTP-Prot-Name</x:ref> "/" 1*<x:ref>DIGIT</x:ref> "." 1*<x:ref>DIGIT</x:ref>
789  <x:ref>HTTP-Prot-Name</x:ref> = <x:abnf-char-sequence>"HTTP"</x:abnf-char-sequence> ; "HTTP", case-sensitive
790</artwork></figure>
791<t>
792   Note that the major and minor numbers &MUST; be treated as separate
793   integers and that each &MAY; be incremented higher than a single digit.
794   Thus, HTTP/2.4 is a lower version than HTTP/2.13, which in turn is
795   lower than HTTP/12.3. Leading zeros &MUST; be ignored by recipients and
796   &MUST-NOT; be sent.
797</t>
798<t>
799   An application that sends a request or response message that includes
800   HTTP-Version of "HTTP/1.1" &MUST; be at least conditionally compliant
801   with this specification. Applications that are at least conditionally
802   compliant with this specification &SHOULD; use an HTTP-Version of
803   "HTTP/1.1" in their messages, and &MUST; do so for any message that is
804   not compatible with HTTP/1.0. For more details on when to send
805   specific HTTP-Version values, see <xref target="RFC2145"/>.
806</t>
807<t>
808   The HTTP version of an application is the highest HTTP version for
809   which the application is at least conditionally compliant.
810</t>
811<t>
812   Proxy and gateway applications need to be careful when forwarding
813   messages in protocol versions different from that of the application.
814   Since the protocol version indicates the protocol capability of the
815   sender, a proxy/gateway &MUST-NOT; send a message with a version
816   indicator which is greater than its actual version. If a higher
817   version request is received, the proxy/gateway &MUST; either downgrade
818   the request version, or respond with an error, or switch to tunnel
819   behavior.
820</t>
821<t>
822   Due to interoperability problems with HTTP/1.0 proxies discovered
823   since the publication of <xref target="RFC2068"/>, caching proxies &MUST;, gateways
824   &MAY;, and tunnels &MUST-NOT; upgrade the request to the highest version
825   they support. The proxy/gateway's response to that request &MUST; be in
826   the same major version as the request.
827</t>
828<t>
829  <list>
830    <t>
831      <x:h>Note:</x:h> Converting between versions of HTTP may involve modification
832      of header fields required or forbidden by the versions involved.
833    </t>
834  </list>
835</t>
836</section>
837
838<section title="Date/Time Formats" anchor="date.time.formats">
839<section title="Full Date" anchor="full.date">
840  <x:anchor-alias value="HTTP-date"/>
841  <x:anchor-alias value="obsolete-date"/>
842  <x:anchor-alias value="rfc1123-date"/>
843  <x:anchor-alias value="rfc850-date"/>
844  <x:anchor-alias value="asctime-date"/>
845  <x:anchor-alias value="date1"/>
846  <x:anchor-alias value="date2"/>
847  <x:anchor-alias value="date3"/>
848  <x:anchor-alias value="rfc1123-date"/>
849  <x:anchor-alias value="time"/>
850  <x:anchor-alias value="wkday"/>
851  <x:anchor-alias value="weekday"/>
852  <x:anchor-alias value="month"/>
853<t>
854   HTTP applications have historically allowed three different formats
855   for the representation of date/time stamps:
856</t>
857<figure><artwork type="example">
858  Sun, 06 Nov 1994 08:49:37 GMT  ; RFC 1123
859  Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format
860  Sun Nov  6 08:49:37 1994       ; ANSI C's asctime() format
861</artwork></figure>
862<t>
863   The first format is preferred as an Internet standard and represents
864   a fixed-length subset of that defined by <xref target="RFC1123"/>. The
865   other formats are described here only for
866   compatibility with obsolete implementations.
867   HTTP/1.1 clients and servers that parse the date value &MUST; accept
868   all three formats (for compatibility with HTTP/1.0), though they &MUST;
869   only generate the RFC 1123 format for representing HTTP-date values
870   in header fields. See <xref target="tolerant.applications"/> for further information.
871</t>
872<t><list><t>
873      <x:h>Note:</x:h> Recipients of date values are encouraged to be robust in
874      accepting date values that may have been sent by non-HTTP
875      applications, as is sometimes the case when retrieving or posting
876      messages via proxies/gateways to SMTP or NNTP.
877</t></list></t>
878<t>
879   All HTTP date/time stamps &MUST; be represented in Greenwich Mean Time
880   (GMT), without exception. For the purposes of HTTP, GMT is exactly
881   equal to UTC (Coordinated Universal Time). This is indicated in the
882   first two formats by the inclusion of "GMT" as the three-letter
883   abbreviation for time zone, and &MUST; be assumed when reading the
884   asctime format. HTTP-date is case sensitive and &MUST-NOT; include
885   additional whitespace beyond that specifically included as SP in the
886   grammar.
887</t>
888<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="HTTP-date"/><iref primary="true" item="Grammar" subitem="rfc1123-date"/><iref primary="true" item="Grammar" subitem="obsolete-date"/><iref primary="true" item="Grammar" subitem="rfc850-date"/><iref primary="true" item="Grammar" subitem="asctime-date"/><iref primary="true" item="Grammar" subitem="date1"/><iref primary="true" item="Grammar" subitem="date2"/><iref primary="true" item="Grammar" subitem="date3"/><iref primary="true" item="Grammar" subitem="time"/><iref primary="true" item="Grammar" subitem="wkday"/><iref primary="true" item="Grammar" subitem="weekday"/><iref primary="true" item="Grammar" subitem="month"/>
889  <x:ref>HTTP-date</x:ref>    = <x:ref>rfc1123-date</x:ref> / <x:ref>obsolete-date</x:ref>
890  <x:ref>obsolete-date</x:ref> = <x:ref>rfc850-date</x:ref> / <x:ref>asctime-date</x:ref> 
891  <x:ref>rfc1123-date</x:ref> = <x:ref>wkday</x:ref> "," <x:ref>SP</x:ref> date1 <x:ref>SP</x:ref> time <x:ref>SP</x:ref> GMT
892  <x:ref>rfc850-date</x:ref>  = <x:ref>weekday</x:ref> "," <x:ref>SP</x:ref> date2 <x:ref>SP</x:ref> time <x:ref>SP</x:ref> GMT
893  <x:ref>asctime-date</x:ref> = <x:ref>wkday</x:ref> <x:ref>SP</x:ref> <x:ref>date3</x:ref> <x:ref>SP</x:ref> <x:ref>time</x:ref> <x:ref>SP</x:ref> 4<x:ref>DIGIT</x:ref>
894  <x:ref>date1</x:ref>        = 2<x:ref>DIGIT</x:ref> <x:ref>SP</x:ref> <x:ref>month</x:ref> <x:ref>SP</x:ref> 4<x:ref>DIGIT</x:ref>
895                 ; day month year (e.g., 02 Jun 1982)
896  <x:ref>date2</x:ref>        = 2<x:ref>DIGIT</x:ref> "-" <x:ref>month</x:ref> "-" 2<x:ref>DIGIT</x:ref>
897                 ; day-month-year (e.g., 02-Jun-82)
898  <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> ))
899                 ; month day (e.g., Jun  2)
900  <x:ref>time</x:ref>         = 2<x:ref>DIGIT</x:ref> ":" 2<x:ref>DIGIT</x:ref> ":" 2<x:ref>DIGIT</x:ref>
901                 ; 00:00:00 - 23:59:59
902  <x:ref>wkday</x:ref>        = s-Mon / s-Tue / s-Wed
903               / s-Thu / s-Fri / s-Sat / s-Sun
904  <x:ref>weekday</x:ref>      = l-Mon / l-Tue / l-Wed
905               / l-Thu / l-Fri / l-Sat / l-Sun
906  <x:ref>month</x:ref>        = s-Jan / s-Feb / s-Mar / s-Apr
907               / s-May / s-Jun / s-Jul / s-Aug
908               / s-Sep / s-Oct / s-Nov / s-Dec
909               
910  GMT   = <x:abnf-char-sequence>"GMT"</x:abnf-char-sequence> ; "GMT", case-sensitive
911
912  s-Mon = <x:abnf-char-sequence>"Mon"</x:abnf-char-sequence> ; "Mon", case-sensitive
913  s-Tue = <x:abnf-char-sequence>"Tue"</x:abnf-char-sequence> ; "Tue", case-sensitive
914  s-Wed = <x:abnf-char-sequence>"Wed"</x:abnf-char-sequence> ; "Wed", case-sensitive
915  s-Thu = <x:abnf-char-sequence>"Thu"</x:abnf-char-sequence> ; "Thu", case-sensitive
916  s-Fri = <x:abnf-char-sequence>"Fri"</x:abnf-char-sequence> ; "Fri", case-sensitive
917  s-Sat = <x:abnf-char-sequence>"Sat"</x:abnf-char-sequence> ; "Sat", case-sensitive
918  s-Sun = <x:abnf-char-sequence>"Sun"</x:abnf-char-sequence> ; "Sun", case-sensitive
919
920  l-Mon = <x:abnf-char-sequence>"Monday"</x:abnf-char-sequence>          ; "Monday", case-sensitive
921  l-Tue = <x:abnf-char-sequence>"Tuesday"</x:abnf-char-sequence>       ; "Tuesday", case-sensitive
922  l-Wed = <x:abnf-char-sequence>"Wednesday"</x:abnf-char-sequence> ; "Wednesday", case-sensitive
923  l-Thu = <x:abnf-char-sequence>"Thursday"</x:abnf-char-sequence>    ; "Thursday", case-sensitive
924  l-Fri = <x:abnf-char-sequence>"Friday"</x:abnf-char-sequence>          ; "Friday", case-sensitive
925  l-Sat = <x:abnf-char-sequence>"Saturday"</x:abnf-char-sequence>    ; "Saturday", case-sensitive
926  l-Sun = <x:abnf-char-sequence>"Sunday"</x:abnf-char-sequence>          ; "Sunday", case-sensitive
927
928  s-Jan = <x:abnf-char-sequence>"Jan"</x:abnf-char-sequence> ; "Jan", case-sensitive
929  s-Feb = <x:abnf-char-sequence>"Feb"</x:abnf-char-sequence> ; "Feb", case-sensitive
930  s-Mar = <x:abnf-char-sequence>"Mar"</x:abnf-char-sequence> ; "Mar", case-sensitive
931  s-Apr = <x:abnf-char-sequence>"Apr"</x:abnf-char-sequence> ; "Apr", case-sensitive
932  s-May = <x:abnf-char-sequence>"May"</x:abnf-char-sequence> ; "May", case-sensitive
933  s-Jun = <x:abnf-char-sequence>"Jun"</x:abnf-char-sequence> ; "Jun", case-sensitive
934  s-Jul = <x:abnf-char-sequence>"Jul"</x:abnf-char-sequence> ; "Jul", case-sensitive
935  s-Aug = <x:abnf-char-sequence>"Aug"</x:abnf-char-sequence> ; "Aug", case-sensitive
936  s-Sep = <x:abnf-char-sequence>"Sep"</x:abnf-char-sequence> ; "Sep", case-sensitive
937  s-Oct = <x:abnf-char-sequence>"Oct"</x:abnf-char-sequence> ; "Oct", case-sensitive
938  s-Nov = <x:abnf-char-sequence>"Nov"</x:abnf-char-sequence> ; "Nov", case-sensitive
939  s-Dec = <x:abnf-char-sequence>"Dec"</x:abnf-char-sequence> ; "Dec", case-sensitive
940</artwork></figure>
941<t>
942      <x:h>Note:</x:h> HTTP requirements for the date/time stamp format apply only
943      to their usage within the protocol stream. Clients and servers are
944      not required to use these formats for user presentation, request
945      logging, etc.
946</t>
947</section>
948</section>
949
950<section title="Transfer Codings" anchor="transfer.codings">
951  <x:anchor-alias value="parameter"/>
952  <x:anchor-alias value="transfer-coding"/>
953  <x:anchor-alias value="transfer-extension"/>
954<t>
955   Transfer-coding values are used to indicate an encoding
956   transformation that has been, can be, or may need to be applied to an
957   entity-body in order to ensure "safe transport" through the network.
958   This differs from a content coding in that the transfer-coding is a
959   property of the message, not of the original entity.
960</t>
961<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="transfer-coding"/><iref primary="true" item="Grammar" subitem="transfer-extension"/>
962  <x:ref>transfer-coding</x:ref>         = "chunked" / <x:ref>transfer-extension</x:ref>
963  <x:ref>transfer-extension</x:ref>      = <x:ref>token</x:ref> *( <x:ref>OWS</x:ref> ";" <x:ref>OWS</x:ref> <x:ref>parameter</x:ref> )
964</artwork></figure>
965<t anchor="rule.parameter">
966  <x:anchor-alias value="attribute"/>
967  <x:anchor-alias value="parameter"/>
968  <x:anchor-alias value="value"/>
969   Parameters are in  the form of attribute/value pairs.
970</t>
971<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="parameter"/><iref primary="true" item="Grammar" subitem="attribute"/><iref primary="true" item="Grammar" subitem="value"/>
972  <x:ref>parameter</x:ref>               = <x:ref>attribute</x:ref> <x:ref>BWS</x:ref> "=" <x:ref>BWS</x:ref> <x:ref>value</x:ref>
973  <x:ref>attribute</x:ref>               = <x:ref>token</x:ref>
974  <x:ref>value</x:ref>                   = <x:ref>token</x:ref> / <x:ref>quoted-string</x:ref>
975</artwork></figure>
976<t>
977   All transfer-coding values are case-insensitive. HTTP/1.1 uses
978   transfer-coding values in the TE header field (<xref target="header.te"/>) and in
979   the Transfer-Encoding header field (<xref target="header.transfer-encoding"/>).
980</t>
981<t>
982   Whenever a transfer-coding is applied to a message-body, the set of
983   transfer-codings &MUST; include "chunked", unless the message indicates it
984   is terminated by closing the connection. When the "chunked" transfer-coding
985   is used, it &MUST; be the last transfer-coding applied to the
986   message-body. The "chunked" transfer-coding &MUST-NOT; be applied more
987   than once to a message-body. These rules allow the recipient to
988   determine the transfer-length of the message (<xref target="message.length"/>).
989</t>
990<t>
991   Transfer-codings are analogous to the Content-Transfer-Encoding
992   values of MIME <xref target="RFC2045"/>, which were designed to enable safe transport of
993   binary data over a 7-bit transport service. However, safe transport
994   has a different focus for an 8bit-clean transfer protocol. In HTTP,
995   the only unsafe characteristic of message-bodies is the difficulty in
996   determining the exact body length (<xref target="message.length"/>), or the desire to
997   encrypt data over a shared transport.
998</t>
999<t>
1000   The Internet Assigned Numbers Authority (IANA) acts as a registry for
1001   transfer-coding value tokens. Initially, the registry contains the
1002   following tokens: "chunked" (<xref target="chunked.transfer.encoding"/>),
1003   "gzip", "compress", and "deflate" (&content-codings;).
1004</t>
1005<t>
1006   New transfer-coding value tokens &SHOULD; be registered in the same way
1007   as new content-coding value tokens (&content-codings;).
1008</t>
1009<t>
1010   A server which receives an entity-body with a transfer-coding it does
1011   not understand &SHOULD; return 501 (Not Implemented), and close the
1012   connection. A server &MUST-NOT; send transfer-codings to an HTTP/1.0
1013   client.
1014</t>
1015
1016<section title="Chunked Transfer Coding" anchor="chunked.transfer.encoding">
1017  <x:anchor-alias value="chunk"/>
1018  <x:anchor-alias value="Chunked-Body"/>
1019  <x:anchor-alias value="chunk-data"/>
1020  <x:anchor-alias value="chunk-ext"/>
1021  <x:anchor-alias value="chunk-ext-name"/>
1022  <x:anchor-alias value="chunk-ext-val"/>
1023  <x:anchor-alias value="chunk-size"/>
1024  <x:anchor-alias value="last-chunk"/>
1025  <x:anchor-alias value="trailer-part"/>
1026<t>
1027   The chunked encoding modifies the body of a message in order to
1028   transfer it as a series of chunks, each with its own size indicator,
1029   followed by an &OPTIONAL; trailer containing entity-header fields. This
1030   allows dynamically produced content to be transferred along with the
1031   information necessary for the recipient to verify that it has
1032   received the full message.
1033</t>
1034<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"/>
1035  <x:ref>Chunked-Body</x:ref>   = *<x:ref>chunk</x:ref>
1036                   <x:ref>last-chunk</x:ref>
1037                   <x:ref>trailer-part</x:ref>
1038                   <x:ref>CRLF</x:ref>
1039 
1040  <x:ref>chunk</x:ref>          = <x:ref>chunk-size</x:ref> *WSP [ <x:ref>chunk-ext</x:ref> ] <x:ref>CRLF</x:ref>
1041                   <x:ref>chunk-data</x:ref> <x:ref>CRLF</x:ref>
1042  <x:ref>chunk-size</x:ref>     = 1*<x:ref>HEXDIG</x:ref>
1043  <x:ref>last-chunk</x:ref>     = 1*("0") *WSP [ <x:ref>chunk-ext</x:ref> ] <x:ref>CRLF</x:ref>
1044 
1045  <x:ref>chunk-ext</x:ref>      = *( ";" *WSP <x:ref>chunk-ext-name</x:ref>
1046                      [ "=" <x:ref>chunk-ext-val</x:ref> ] *WSP )
1047  <x:ref>chunk-ext-name</x:ref> = <x:ref>token</x:ref>
1048  <x:ref>chunk-ext-val</x:ref>  = <x:ref>token</x:ref> / <x:ref>quoted-string</x:ref>
1049  <x:ref>chunk-data</x:ref>     = 1*<x:ref>OCTET</x:ref> ; a sequence of chunk-size octets
1050  <x:ref>trailer-part</x:ref>   = *( <x:ref>entity-header</x:ref> <x:ref>CRLF</x:ref> )
1051</artwork></figure>
1052<t>
1053   The chunk-size field is a string of hex digits indicating the size of
1054   the chunk-data in octets. The chunked encoding is ended by any chunk whose size is
1055   zero, followed by the trailer, which is terminated by an empty line.
1056</t>
1057<t>
1058   The trailer allows the sender to include additional HTTP header
1059   fields at the end of the message. The Trailer header field can be
1060   used to indicate which header fields are included in a trailer (see
1061   <xref target="header.trailer"/>).
1062</t>
1063<t>
1064   A server using chunked transfer-coding in a response &MUST-NOT; use the
1065   trailer for any header fields unless at least one of the following is
1066   true:
1067  <list style="numbers">
1068    <t>the request included a TE header field that indicates "trailers" is
1069     acceptable in the transfer-coding of the  response, as described in
1070     <xref target="header.te"/>; or,</t>
1071
1072    <t>the server is the origin server for the response, the trailer
1073     fields consist entirely of optional metadata, and the recipient
1074     could use the message (in a manner acceptable to the origin server)
1075     without receiving this metadata.  In other words, the origin server
1076     is willing to accept the possibility that the trailer fields might
1077     be silently discarded along the path to the client.</t>
1078  </list>
1079</t>
1080<t>
1081   This requirement prevents an interoperability failure when the
1082   message is being received by an HTTP/1.1 (or later) proxy and
1083   forwarded to an HTTP/1.0 recipient. It avoids a situation where
1084   compliance with the protocol would have necessitated a possibly
1085   infinite buffer on the proxy.
1086</t>
1087<t>
1088   A process for decoding the "chunked" transfer-coding
1089   can be represented in pseudo-code as:
1090</t>
1091<figure><artwork type="code">
1092  length := 0
1093  read chunk-size, chunk-ext (if any) and CRLF
1094  while (chunk-size &gt; 0) {
1095     read chunk-data and CRLF
1096     append chunk-data to entity-body
1097     length := length + chunk-size
1098     read chunk-size and CRLF
1099  }
1100  read entity-header
1101  while (entity-header not empty) {
1102     append entity-header to existing header fields
1103     read entity-header
1104  }
1105  Content-Length := length
1106  Remove "chunked" from Transfer-Encoding
1107</artwork></figure>
1108<t>
1109   All HTTP/1.1 applications &MUST; be able to receive and decode the
1110   "chunked" transfer-coding, and &MUST; ignore chunk-ext extensions
1111   they do not understand.
1112</t>
1113</section>
1114</section>
1115
1116<section title="Product Tokens" anchor="product.tokens">
1117  <x:anchor-alias value="product"/>
1118  <x:anchor-alias value="product-version"/>
1119<t>
1120   Product tokens are used to allow communicating applications to
1121   identify themselves by software name and version. Most fields using
1122   product tokens also allow sub-products which form a significant part
1123   of the application to be listed, separated by whitespace. By
1124   convention, the products are listed in order of their significance
1125   for identifying the application.
1126</t>
1127<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="product"/><iref primary="true" item="Grammar" subitem="product-version"/>
1128  <x:ref>product</x:ref>         = <x:ref>token</x:ref> ["/" <x:ref>product-version</x:ref>]
1129  <x:ref>product-version</x:ref> = <x:ref>token</x:ref>
1130</artwork></figure>
1131<t>
1132   Examples:
1133</t>
1134<figure><artwork type="example">
1135  User-Agent: CERN-LineMode/2.15 libwww/2.17b3
1136  Server: Apache/0.8.4
1137</artwork></figure>
1138<t>
1139   Product tokens &SHOULD; be short and to the point. They &MUST-NOT; be
1140   used for advertising or other non-essential information. Although any
1141   token character &MAY; appear in a product-version, this token &SHOULD;
1142   only be used for a version identifier (i.e., successive versions of
1143   the same product &SHOULD; only differ in the product-version portion of
1144   the product value).
1145</t>
1146</section>
1147
1148<section title="Quality Values" anchor="quality.values">
1149  <x:anchor-alias value="qvalue"/>
1150<t>
1151   Both transfer codings (TE request header, <xref target="header.te"/>)
1152   and content negotiation (&content.negotiation;) use short "floating point"
1153   numbers to indicate the relative importance ("weight") of various
1154   negotiable parameters.  A weight is normalized to a real number in
1155   the range 0 through 1, where 0 is the minimum and 1 the maximum
1156   value. If a parameter has a quality value of 0, then content with
1157   this parameter is `not acceptable' for the client. HTTP/1.1
1158   applications &MUST-NOT; generate more than three digits after the
1159   decimal point. User configuration of these values &SHOULD; also be
1160   limited in this fashion.
1161</t>
1162<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="qvalue"/>
1163  <x:ref>qvalue</x:ref>         = ( "0" [ "." 0*3<x:ref>DIGIT</x:ref> ] )
1164                 / ( "1" [ "." 0*3("0") ] )
1165</artwork></figure>
1166<x:note>
1167  <t>
1168     <x:h>Note:</x:h> "Quality values" is a misnomer, since these values merely represent
1169     relative degradation in desired quality.
1170  </t>
1171</x:note>
1172</section>
1173
1174</section>
1175
1176<section title="HTTP Message" anchor="http.message">
1177
1178<section title="Message Types" anchor="message.types">
1179  <x:anchor-alias value="generic-message"/>
1180  <x:anchor-alias value="HTTP-message"/>
1181  <x:anchor-alias value="start-line"/>
1182<t>
1183   HTTP messages consist of requests from client to server and responses
1184   from server to client.
1185</t>
1186<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="HTTP-message"/>
1187  <x:ref>HTTP-message</x:ref>   = <x:ref>Request</x:ref> / <x:ref>Response</x:ref>     ; HTTP/1.1 messages
1188</artwork></figure>
1189<t>
1190   Request (<xref target="request"/>) and Response (<xref target="response"/>) messages use the generic
1191   message format of <xref target="RFC5322"/> for transferring entities (the payload
1192   of the message). Both types of message consist of a start-line, zero
1193   or more header fields (also known as "headers"), an empty line (i.e.,
1194   a line with nothing preceding the CRLF) indicating the end of the
1195   header fields, and possibly a message-body.
1196</t>
1197<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="generic-message"/><iref primary="true" item="Grammar" subitem="start-line"/>
1198  <x:ref>generic-message</x:ref> = <x:ref>start-line</x:ref>
1199                    *( <x:ref>message-header</x:ref> <x:ref>CRLF</x:ref> )
1200                    <x:ref>CRLF</x:ref>
1201                    [ <x:ref>message-body</x:ref> ]
1202  <x:ref>start-line</x:ref>      = <x:ref>Request-Line</x:ref> / <x:ref>Status-Line</x:ref>
1203</artwork></figure>
1204<t>
1205   In the interest of robustness, servers &SHOULD; ignore any empty
1206   line(s) received where a Request-Line is expected. In other words, if
1207   the server is reading the protocol stream at the beginning of a
1208   message and receives a CRLF first, it should ignore the CRLF.
1209</t>
1210<t>
1211   Certain buggy HTTP/1.0 client implementations generate extra CRLF's
1212   after a POST request. To restate what is explicitly forbidden by the
1213   BNF, an HTTP/1.1 client &MUST-NOT; preface or follow a request with an
1214   extra CRLF.
1215</t>
1216<t>
1217   Whitespace (WSP) &MUST-NOT; be sent between the start-line and the first
1218   header field. The presence of whitespace might be an attempt to trick a
1219   noncompliant implementation of HTTP into ignoring that field or processing
1220   the next line as a new request, either of which may result in security
1221   issues when implementations within the request chain interpret the
1222   same message differently. HTTP/1.1 servers &MUST; reject such a message
1223   with a 400 (Bad Request) response.
1224</t>
1225</section>
1226
1227<section title="Message Headers" anchor="message.headers">
1228  <x:anchor-alias value="field-content"/>
1229  <x:anchor-alias value="field-name"/>
1230  <x:anchor-alias value="field-value"/>
1231  <x:anchor-alias value="message-header"/>
1232<t>
1233   HTTP header fields follow the same general format as Internet messages in
1234   <xref target="RFC5322" x:fmt="of" x:sec="2.1"/>. Each header field consists
1235   of a name followed by a colon (":"), optional whitespace, and the field
1236   value. Field names are case-insensitive.
1237</t>
1238<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="message-header"/><iref primary="true" item="Grammar" subitem="field-name"/><iref primary="true" item="Grammar" subitem="field-value"/><iref primary="true" item="Grammar" subitem="field-content"/>
1239  <x:ref>message-header</x:ref> = <x:ref>field-name</x:ref> ":" OWS [ <x:ref>field-value</x:ref> ] OWS
1240  <x:ref>field-name</x:ref>     = <x:ref>token</x:ref>
1241  <x:ref>field-value</x:ref>    = *( <x:ref>field-content</x:ref> / <x:ref>OWS</x:ref> )
1242  <x:ref>field-content</x:ref>  = *( <x:ref>WSP</x:ref> / <x:ref>VCHAR</x:ref> / <x:ref>obs-text</x:ref> )
1243</artwork></figure>
1244<t>
1245   Historically, HTTP has allowed field-content with text in the ISO-8859-1
1246   <xref target="ISO-8859-1"/> character encoding (allowing other character sets
1247   through use of <xref target="RFC2047"/> encoding). In practice, most HTTP
1248   header field-values use only a subset of the US-ASCII charset
1249   <xref target="USASCII"/>. Newly defined header fields &SHOULD; constrain
1250   their field-values to US-ASCII characters. Recipients &SHOULD; treat other
1251   (obs-text) octets in field-content as opaque data.
1252</t>
1253<t>
1254   No whitespace is allowed between the header field-name and colon. For
1255   security reasons, any request message received containing such whitespace
1256   &MUST; be rejected with a response code of 400 (Bad Request) and any such
1257   whitespace in a response message &MUST; be removed.
1258</t>
1259<t>
1260   The field value &MAY; be preceded by optional whitespace; a single SP is
1261   preferred. The field-value does not include any leading or trailing white
1262   space: OWS occurring before the first non-whitespace character of the
1263   field-value or after the last non-whitespace character of the field-value
1264   is ignored and &MAY; be removed without changing the meaning of the header
1265   field.
1266</t>
1267<t>
1268   Historically, HTTP header field values could be extended over multiple
1269   lines by preceding each extra line with at least one space or horizontal
1270   tab character (line folding). This specification deprecates such line
1271   folding except within the message/http media type
1272   (<xref target="internet.media.type.message.http"/>).
1273   HTTP/1.1 senders &MUST-NOT; produce messages that include line folding
1274   (i.e., that contain any field-content that matches the obs-fold rule) unless
1275   the message is intended for packaging within the message/http media type.
1276   HTTP/1.1 recipients &SHOULD; accept line folding and replace any embedded
1277   obs-fold whitespace with a single SP prior to interpreting the field value
1278   or forwarding the message downstream.
1279</t>
1280<t anchor="rule.comment">
1281  <x:anchor-alias value="comment"/>
1282  <x:anchor-alias value="ctext"/>
1283   Comments can be included in some HTTP header fields by surrounding
1284   the comment text with parentheses. Comments are only allowed in
1285   fields containing "comment" as part of their field value definition.
1286   In all other fields, parentheses are considered part of the field
1287   value.
1288</t>
1289<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="comment"/><iref primary="true" item="Grammar" subitem="ctext"/>
1290  <x:ref>comment</x:ref>        = "(" *( <x:ref>ctext</x:ref> / <x:ref>quoted-pair</x:ref> / <x:ref>comment</x:ref> ) ")"
1291  <x:ref>ctext</x:ref>          = *( <x:ref>OWS</x:ref> / %x21-27 / %x2A-7E / <x:ref>obs-text</x:ref> )
1292</artwork></figure>
1293<t>
1294   The order in which header fields with differing field names are
1295   received is not significant. However, it is "good practice" to send
1296   general-header fields first, followed by request-header or response-header
1297   fields, and ending with the entity-header fields.
1298</t>
1299<t>
1300   Multiple message-header fields with the same field-name &MAY; be
1301   present in a message if and only if the entire field-value for that
1302   header field is defined as a comma-separated list [i.e., #(values)].
1303   It &MUST; be possible to combine the multiple header fields into one
1304   "field-name: field-value" pair, without changing the semantics of the
1305   message, by appending each subsequent field-value to the first, each
1306   separated by a comma. The order in which header fields with the same
1307   field-name are received is therefore significant to the
1308   interpretation of the combined field value, and thus a proxy &MUST-NOT;
1309   change the order of these field values when a message is forwarded.
1310</t>
1311<t>
1312  <list><t>
1313   <x:h>Note:</x:h> the "Set-Cookie" header as implemented in
1314   practice (as opposed to how it is specified in <xref target="RFC2109"/>)
1315   can occur multiple times, but does not use the list syntax, and thus cannot
1316   be combined into a single line. (See Appendix A.2.3 of <xref target="Kri2001"/>
1317   for details.) Also note that the Set-Cookie2 header specified in
1318   <xref target="RFC2965"/> does not share this problem.
1319  </t></list>
1320</t>
1321 
1322</section>
1323
1324<section title="Message Body" anchor="message.body">
1325  <x:anchor-alias value="message-body"/>
1326<t>
1327   The message-body (if any) of an HTTP message is used to carry the
1328   entity-body associated with the request or response. The message-body
1329   differs from the entity-body only when a transfer-coding has been
1330   applied, as indicated by the Transfer-Encoding header field (<xref target="header.transfer-encoding"/>).
1331</t>
1332<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="message-body"/>
1333  <x:ref>message-body</x:ref> = <x:ref>entity-body</x:ref>
1334               / &lt;entity-body encoded as per <x:ref>Transfer-Encoding</x:ref>&gt;
1335</artwork></figure>
1336<t>
1337   Transfer-Encoding &MUST; be used to indicate any transfer-codings
1338   applied by an application to ensure safe and proper transfer of the
1339   message. Transfer-Encoding is a property of the message, not of the
1340   entity, and thus &MAY; be added or removed by any application along the
1341   request/response chain. (However, <xref target="transfer.codings"/> places restrictions on
1342   when certain transfer-codings may be used.)
1343</t>
1344<t>
1345   The rules for when a message-body is allowed in a message differ for
1346   requests and responses.
1347</t>
1348<t>
1349   The presence of a message-body in a request is signaled by the
1350   inclusion of a Content-Length or Transfer-Encoding header field in
1351   the request's message-headers. A message-body &MUST-NOT; be included in
1352   a request if the specification of the request method (&method;)
1353   explicitly disallows an entity-body in requests.
1354   When a request message contains both a message-body of non-zero
1355   length and a method that does not define any semantics for that
1356   request message-body, then an origin server &SHOULD; either ignore
1357   the message-body or respond with an appropriate error message
1358   (e.g., 413).  A proxy or gateway, when presented the same request,
1359   &SHOULD; either forward the request inbound with the message-body or
1360   ignore the message-body when determining a response.
1361</t>
1362<t>
1363   For response messages, whether or not a message-body is included with
1364   a message is dependent on both the request method and the response
1365   status code (<xref target="status.code.and.reason.phrase"/>). All responses to the HEAD request method
1366   &MUST-NOT; include a message-body, even though the presence of entity-header
1367   fields might lead one to believe they do. All 1xx
1368   (informational), 204 (No Content), and 304 (Not Modified) responses
1369   &MUST-NOT; include a message-body. All other responses do include a
1370   message-body, although it &MAY; be of zero length.
1371</t>
1372</section>
1373
1374<section title="Message Length" anchor="message.length">
1375<t>
1376   The transfer-length of a message is the length of the message-body as
1377   it appears in the message; that is, after any transfer-codings have
1378   been applied. When a message-body is included with a message, the
1379   transfer-length of that body is determined by one of the following
1380   (in order of precedence):
1381</t>
1382<t>
1383  <list style="numbers">
1384    <x:lt><t>
1385     Any response message which "&MUST-NOT;" include a message-body (such
1386     as the 1xx, 204, and 304 responses and any response to a HEAD
1387     request) is always terminated by the first empty line after the
1388     header fields, regardless of the entity-header fields present in
1389     the message.
1390    </t></x:lt>
1391    <x:lt><t>
1392     If a Transfer-Encoding header field (<xref target="header.transfer-encoding"/>)
1393     is present and the "chunked" transfer-coding (<xref target="transfer.codings"/>)
1394     is used, the transfer-length is defined by the use of this transfer-coding.
1395     If a Transfer-Encoding header field is present and the "chunked" transfer-coding
1396     is not present, the transfer-length is defined by the sender closing the connection.
1397    </t></x:lt>
1398    <x:lt><t>
1399     If a Content-Length header field (<xref target="header.content-length"/>) is present, its
1400     decimal value in OCTETs represents both the entity-length and the
1401     transfer-length. The Content-Length header field &MUST-NOT; be sent
1402     if these two lengths are different (i.e., if a Transfer-Encoding
1403     header field is present). If a message is received with both a
1404     Transfer-Encoding header field and a Content-Length header field,
1405     the latter &MUST; be ignored.
1406    </t></x:lt>
1407    <x:lt><t>
1408     If the message uses the media type "multipart/byteranges", and the
1409     transfer-length is not otherwise specified, then this self-delimiting
1410     media type defines the transfer-length. This media type
1411     &MUST-NOT; be used unless the sender knows that the recipient can parse
1412     it; the presence in a request of a Range header with multiple byte-range
1413     specifiers from a 1.1 client implies that the client can parse
1414     multipart/byteranges responses.
1415    <list style="empty"><t>
1416       A range header might be forwarded by a 1.0 proxy that does not
1417       understand multipart/byteranges; in this case the server &MUST;
1418       delimit the message using methods defined in items 1, 3 or 5 of
1419       this section.
1420    </t></list>
1421    </t></x:lt>
1422    <x:lt><t>
1423     By the server closing the connection. (Closing the connection
1424     cannot be used to indicate the end of a request body, since that
1425     would leave no possibility for the server to send back a response.)
1426    </t></x:lt>
1427  </list>
1428</t>
1429<t>
1430   For compatibility with HTTP/1.0 applications, HTTP/1.1 requests
1431   containing a message-body &MUST; include a valid Content-Length header
1432   field unless the server is known to be HTTP/1.1 compliant. If a
1433   request contains a message-body and a Content-Length is not given,
1434   the server &SHOULD; respond with 400 (Bad Request) if it cannot
1435   determine the length of the message, or with 411 (Length Required) if
1436   it wishes to insist on receiving a valid Content-Length.
1437</t>
1438<t>
1439   All HTTP/1.1 applications that receive entities &MUST; accept the
1440   "chunked" transfer-coding (<xref target="transfer.codings"/>), thus allowing this mechanism
1441   to be used for messages when the message length cannot be determined
1442   in advance.
1443</t>
1444<t>
1445   Messages &MUST-NOT; include both a Content-Length header field and a
1446   transfer-coding. If the message does include a
1447   transfer-coding, the Content-Length &MUST; be ignored.
1448</t>
1449<t>
1450   When a Content-Length is given in a message where a message-body is
1451   allowed, its field value &MUST; exactly match the number of OCTETs in
1452   the message-body. HTTP/1.1 user agents &MUST; notify the user when an
1453   invalid length is received and detected.
1454</t>
1455</section>
1456
1457<section title="General Header Fields" anchor="general.header.fields">
1458  <x:anchor-alias value="general-header"/>
1459<t>
1460   There are a few header fields which have general applicability for
1461   both request and response messages, but which do not apply to the
1462   entity being transferred. These header fields apply only to the
1463   message being transmitted.
1464</t>
1465<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="general-header"/>
1466  <x:ref>general-header</x:ref> = <x:ref>Cache-Control</x:ref>            ; &header-cache-control;
1467                 / <x:ref>Connection</x:ref>               ; <xref target="header.connection"/>
1468                 / <x:ref>Date</x:ref>                     ; <xref target="header.date"/>
1469                 / <x:ref>Pragma</x:ref>                   ; &header-pragma;
1470                 / <x:ref>Trailer</x:ref>                  ; <xref target="header.trailer"/>
1471                 / <x:ref>Transfer-Encoding</x:ref>        ; <xref target="header.transfer-encoding"/>
1472                 / <x:ref>Upgrade</x:ref>                  ; <xref target="header.upgrade"/>
1473                 / <x:ref>Via</x:ref>                      ; <xref target="header.via"/>
1474                 / <x:ref>Warning</x:ref>                  ; &header-warning;
1475</artwork></figure>
1476<t>
1477   General-header field names can be extended reliably only in
1478   combination with a change in the protocol version. However, new or
1479   experimental header fields may be given the semantics of general
1480   header fields if all parties in the communication recognize them to
1481   be general-header fields. Unrecognized header fields are treated as
1482   entity-header fields.
1483</t>
1484</section>
1485</section>
1486
1487<section title="Request" anchor="request">
1488  <x:anchor-alias value="Request"/>
1489<t>
1490   A request message from a client to a server includes, within the
1491   first line of that message, the method to be applied to the resource,
1492   the identifier of the resource, and the protocol version in use.
1493</t>
1494<!--                 Host                      ; should be moved here eventually -->
1495<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Request"/>
1496  <x:ref>Request</x:ref>       = <x:ref>Request-Line</x:ref>              ; <xref target="request-line"/>
1497                  *(( <x:ref>general-header</x:ref>        ; <xref target="general.header.fields"/>
1498                   / <x:ref>request-header</x:ref>         ; &request-header-fields;
1499                   / <x:ref>entity-header</x:ref> ) <x:ref>CRLF</x:ref> )  ; &entity-header-fields;
1500                  <x:ref>CRLF</x:ref>
1501                  [ <x:ref>message-body</x:ref> ]          ; <xref target="message.body"/>
1502</artwork></figure>
1503
1504<section title="Request-Line" anchor="request-line">
1505  <x:anchor-alias value="Request-Line"/>
1506<t>
1507   The Request-Line begins with a method token, followed by the
1508   request-target and the protocol version, and ending with CRLF. The
1509   elements are separated by SP characters. No CR or LF is allowed
1510   except in the final CRLF sequence.
1511</t>
1512<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Request-Line"/>
1513  <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>
1514</artwork></figure>
1515
1516<section title="Method" anchor="method">
1517  <x:anchor-alias value="Method"/>
1518<t>
1519   The Method  token indicates the method to be performed on the
1520   resource identified by the request-target. The method is case-sensitive.
1521</t>
1522<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Method"/><iref primary="true" item="Grammar" subitem="extension-method"/>
1523  <x:ref>Method</x:ref>         = <x:ref>token</x:ref>
1524</artwork></figure>
1525</section>
1526
1527<section title="request-target" anchor="request-target">
1528  <x:anchor-alias value="request-target"/>
1529<t>
1530   The request-target
1531   identifies the resource upon which to apply the request.
1532</t>
1533<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="request-target"/>
1534  <x:ref>request-target</x:ref> = "*"
1535                 / <x:ref>absolute-URI</x:ref>
1536                 / ( <x:ref>path-absolute</x:ref> [ "?" <x:ref>query</x:ref> ] )
1537                 / <x:ref>authority</x:ref>
1538</artwork></figure>
1539<t>
1540   The four options for request-target are dependent on the nature of the
1541   request. The asterisk "*" means that the request does not apply to a
1542   particular resource, but to the server itself, and is only allowed
1543   when the method used does not necessarily apply to a resource. One
1544   example would be
1545</t>
1546<figure><artwork type="example">
1547  OPTIONS * HTTP/1.1
1548</artwork></figure>
1549<t>
1550   The absolute-URI form is &REQUIRED; when the request is being made to a
1551   proxy. The proxy is requested to forward the request or service it
1552   from a valid cache, and return the response. Note that the proxy &MAY;
1553   forward the request on to another proxy or directly to the server
1554   specified by the absolute-URI. In order to avoid request loops, a
1555   proxy &MUST; be able to recognize all of its server names, including
1556   any aliases, local variations, and the numeric IP address. An example
1557   Request-Line would be:
1558</t>
1559<figure><artwork type="example">
1560  GET http://www.example.org/pub/WWW/TheProject.html HTTP/1.1
1561</artwork></figure>
1562<t>
1563   To allow for transition to absolute-URIs in all requests in future
1564   versions of HTTP, all HTTP/1.1 servers &MUST; accept the absolute-URI
1565   form in requests, even though HTTP/1.1 clients will only generate
1566   them in requests to proxies.
1567</t>
1568<t>
1569   The authority form is only used by the CONNECT method (&CONNECT;).
1570</t>
1571<t>
1572   The most common form of request-target is that used to identify a
1573   resource on an origin server or gateway. In this case the absolute
1574   path of the URI &MUST; be transmitted (see <xref target="http.uri"/>, path-absolute) as
1575   the request-target, and the network location of the URI (authority) &MUST;
1576   be transmitted in a Host header field. For example, a client wishing
1577   to retrieve the resource above directly from the origin server would
1578   create a TCP connection to port 80 of the host "www.example.org" and send
1579   the lines:
1580</t>
1581<figure><artwork type="example">
1582  GET /pub/WWW/TheProject.html HTTP/1.1
1583  Host: www.example.org
1584</artwork></figure>
1585<t>
1586   followed by the remainder of the Request. Note that the absolute path
1587   cannot be empty; if none is present in the original URI, it &MUST; be
1588   given as "/" (the server root).
1589</t>
1590<t>
1591   If a proxy receives a request without any path in the request-target and
1592   the method specified is capable of supporting the asterisk form of
1593   request-target, then the last proxy on the request chain &MUST; forward the
1594   request with "*" as the final request-target.
1595</t>
1596<figure><preamble>   
1597   For example, the request
1598</preamble><artwork type="example">
1599  OPTIONS http://www.example.org:8001 HTTP/1.1
1600</artwork></figure>
1601<figure><preamble>   
1602  would be forwarded by the proxy as
1603</preamble><artwork type="example">
1604  OPTIONS * HTTP/1.1
1605  Host: www.example.org:8001
1606</artwork>
1607<postamble>
1608   after connecting to port 8001 of host "www.example.org".
1609</postamble>
1610</figure>
1611<t>
1612   The request-target is transmitted in the format specified in
1613   <xref target="http.uri"/>. If the request-target is percent-encoded
1614   (<xref target="RFC3986" x:fmt="," x:sec="2.1"/>), the origin server
1615   &MUST; decode the request-target in order to
1616   properly interpret the request. Servers &SHOULD; respond to invalid
1617   request-targets with an appropriate status code.
1618</t>
1619<t>
1620   A transparent proxy &MUST-NOT; rewrite the "path-absolute" part of the
1621   received request-target when forwarding it to the next inbound server,
1622   except as noted above to replace a null path-absolute with "/".
1623</t>
1624<t>
1625  <list><t>
1626      <x:h>Note:</x:h> The "no rewrite" rule prevents the proxy from changing the
1627      meaning of the request when the origin server is improperly using
1628      a non-reserved URI character for a reserved purpose.  Implementors
1629      should be aware that some pre-HTTP/1.1 proxies have been known to
1630      rewrite the request-target.
1631  </t></list>
1632</t>
1633<t>
1634   HTTP does not place a pre-defined limit on the length of a request-target.
1635   A server &MUST; be prepared to receive URIs of unbounded length and
1636   respond with the 414 (URI Too Long) status if the received
1637   request-target would be longer than the server wishes to handle
1638   (see &status-414;).
1639</t>
1640<t>
1641   Various ad-hoc limitations on request-target length are found in practice.
1642   It is &RECOMMENDED; that all HTTP senders and recipients support
1643   request-target lengths of 8000 or more OCTETs.
1644</t>
1645</section>
1646</section>
1647
1648<section title="The Resource Identified by a Request" anchor="the.resource.identified.by.a.request">
1649<t>
1650   The exact resource identified by an Internet request is determined by
1651   examining both the request-target and the Host header field.
1652</t>
1653<t>
1654   An origin server that does not allow resources to differ by the
1655   requested host &MAY; ignore the Host header field value when
1656   determining the resource identified by an HTTP/1.1 request. (But see
1657   <xref target="changes.to.simplify.multi-homed.web.servers.and.conserve.ip.addresses"/>
1658   for other requirements on Host support in HTTP/1.1.)
1659</t>
1660<t>
1661   An origin server that does differentiate resources based on the host
1662   requested (sometimes referred to as virtual hosts or vanity host
1663   names) &MUST; use the following rules for determining the requested
1664   resource on an HTTP/1.1 request:
1665  <list style="numbers">
1666    <t>If request-target is an absolute-URI, the host is part of the
1667     request-target. Any Host header field value in the request &MUST; be
1668     ignored.</t>
1669    <t>If the request-target is not an absolute-URI, and the request includes
1670     a Host header field, the host is determined by the Host header
1671     field value.</t>
1672    <t>If the host as determined by rule 1 or 2 is not a valid host on
1673     the server, the response &MUST; be a 400 (Bad Request) error message.</t>
1674  </list>
1675</t>
1676<t>
1677   Recipients of an HTTP/1.0 request that lacks a Host header field &MAY;
1678   attempt to use heuristics (e.g., examination of the URI path for
1679   something unique to a particular host) in order to determine what
1680   exact resource is being requested.
1681</t>
1682</section>
1683
1684</section>
1685
1686
1687<section title="Response" anchor="response">
1688  <x:anchor-alias value="Response"/>
1689<t>
1690   After receiving and interpreting a request message, a server responds
1691   with an HTTP response message.
1692</t>
1693<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Response"/>
1694  <x:ref>Response</x:ref>      = <x:ref>Status-Line</x:ref>               ; <xref target="status-line"/>
1695                  *(( <x:ref>general-header</x:ref>        ; <xref target="general.header.fields"/>
1696                   / <x:ref>response-header</x:ref>        ; &response-header-fields;
1697                   / <x:ref>entity-header</x:ref> ) <x:ref>CRLF</x:ref> )  ; &entity-header-fields;
1698                  <x:ref>CRLF</x:ref>
1699                  [ <x:ref>message-body</x:ref> ]          ; <xref target="message.body"/>
1700</artwork></figure>
1701
1702<section title="Status-Line" anchor="status-line">
1703  <x:anchor-alias value="Status-Line"/>
1704<t>
1705   The first line of a Response message is the Status-Line, consisting
1706   of the protocol version followed by a numeric status code and its
1707   associated textual phrase, with each element separated by SP
1708   characters. No CR or LF is allowed except in the final CRLF sequence.
1709</t>
1710<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Status-Line"/>
1711  <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>
1712</artwork></figure>
1713
1714<section title="Status Code and Reason Phrase" anchor="status.code.and.reason.phrase">
1715  <x:anchor-alias value="Reason-Phrase"/>
1716  <x:anchor-alias value="Status-Code"/>
1717<t>
1718   The Status-Code element is a 3-digit integer result code of the
1719   attempt to understand and satisfy the request. These codes are fully
1720   defined in &status-codes;.  The Reason Phrase exists for the sole
1721   purpose of providing a textual description associated with the numeric
1722   status code, out of deference to earlier Internet application protocols
1723   that were more frequently used with interactive text clients.
1724   A client &SHOULD; ignore the content of the Reason Phrase.
1725</t>
1726<t>
1727   The first digit of the Status-Code defines the class of response. The
1728   last two digits do not have any categorization role. There are 5
1729   values for the first digit:
1730  <list style="symbols">
1731    <t>
1732      1xx: Informational - Request received, continuing process
1733    </t>
1734    <t>
1735      2xx: Success - The action was successfully received,
1736        understood, and accepted
1737    </t>
1738    <t>
1739      3xx: Redirection - Further action must be taken in order to
1740        complete the request
1741    </t>
1742    <t>
1743      4xx: Client Error - The request contains bad syntax or cannot
1744        be fulfilled
1745    </t>
1746    <t>
1747      5xx: Server Error - The server failed to fulfill an apparently
1748        valid request
1749    </t>
1750  </list>
1751</t>
1752<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Status-Code"/><iref primary="true" item="Grammar" subitem="extension-code"/><iref primary="true" item="Grammar" subitem="Reason-Phrase"/>
1753  <x:ref>Status-Code</x:ref>    = 3<x:ref>DIGIT</x:ref>
1754  <x:ref>Reason-Phrase</x:ref>  = *( <x:ref>WSP</x:ref> / <x:ref>VCHAR</x:ref> / <x:ref>obs-text</x:ref> )
1755</artwork></figure>
1756</section>
1757</section>
1758
1759</section>
1760
1761
1762<section title="Connections" anchor="connections">
1763
1764<section title="Persistent Connections" anchor="persistent.connections">
1765
1766<section title="Purpose" anchor="persistent.purpose">
1767<t>
1768   Prior to persistent connections, a separate TCP connection was
1769   established to fetch each URL, increasing the load on HTTP servers
1770   and causing congestion on the Internet. The use of inline images and
1771   other associated data often require a client to make multiple
1772   requests of the same server in a short amount of time. Analysis of
1773   these performance problems and results from a prototype
1774   implementation are available <xref target="Pad1995"/> <xref target="Spe"/>. Implementation experience and
1775   measurements of actual HTTP/1.1 (<xref target="RFC2068" x:fmt="none">RFC 2068</xref>) implementations show good
1776   results <xref target="Nie1997"/>. Alternatives have also been explored, for example,
1777   T/TCP <xref target="Tou1998"/>.
1778</t>
1779<t>
1780   Persistent HTTP connections have a number of advantages:
1781  <list style="symbols">
1782      <t>
1783        By opening and closing fewer TCP connections, CPU time is saved
1784        in routers and hosts (clients, servers, proxies, gateways,
1785        tunnels, or caches), and memory used for TCP protocol control
1786        blocks can be saved in hosts.
1787      </t>
1788      <t>
1789        HTTP requests and responses can be pipelined on a connection.
1790        Pipelining allows a client to make multiple requests without
1791        waiting for each response, allowing a single TCP connection to
1792        be used much more efficiently, with much lower elapsed time.
1793      </t>
1794      <t>
1795        Network congestion is reduced by reducing the number of packets
1796        caused by TCP opens, and by allowing TCP sufficient time to
1797        determine the congestion state of the network.
1798      </t>
1799      <t>
1800        Latency on subsequent requests is reduced since there is no time
1801        spent in TCP's connection opening handshake.
1802      </t>
1803      <t>
1804        HTTP can evolve more gracefully, since errors can be reported
1805        without the penalty of closing the TCP connection. Clients using
1806        future versions of HTTP might optimistically try a new feature,
1807        but if communicating with an older server, retry with old
1808        semantics after an error is reported.
1809      </t>
1810    </list>
1811</t>
1812<t>
1813   HTTP implementations &SHOULD; implement persistent connections.
1814</t>
1815</section>
1816
1817<section title="Overall Operation" anchor="persistent.overall">
1818<t>
1819   A significant difference between HTTP/1.1 and earlier versions of
1820   HTTP is that persistent connections are the default behavior of any
1821   HTTP connection. That is, unless otherwise indicated, the client
1822   &SHOULD; assume that the server will maintain a persistent connection,
1823   even after error responses from the server.
1824</t>
1825<t>
1826   Persistent connections provide a mechanism by which a client and a
1827   server can signal the close of a TCP connection. This signaling takes
1828   place using the Connection header field (<xref target="header.connection"/>). Once a close
1829   has been signaled, the client &MUST-NOT; send any more requests on that
1830   connection.
1831</t>
1832
1833<section title="Negotiation" anchor="persistent.negotiation">
1834<t>
1835   An HTTP/1.1 server &MAY; assume that a HTTP/1.1 client intends to
1836   maintain a persistent connection unless a Connection header including
1837   the connection-token "close" was sent in the request. If the server
1838   chooses to close the connection immediately after sending the
1839   response, it &SHOULD; send a Connection header including the
1840   connection-token close.
1841</t>
1842<t>
1843   An HTTP/1.1 client &MAY; expect a connection to remain open, but would
1844   decide to keep it open based on whether the response from a server
1845   contains a Connection header with the connection-token close. In case
1846   the client does not want to maintain a connection for more than that
1847   request, it &SHOULD; send a Connection header including the
1848   connection-token close.
1849</t>
1850<t>
1851   If either the client or the server sends the close token in the
1852   Connection header, that request becomes the last one for the
1853   connection.
1854</t>
1855<t>
1856   Clients and servers &SHOULD-NOT;  assume that a persistent connection is
1857   maintained for HTTP versions less than 1.1 unless it is explicitly
1858   signaled. See <xref target="compatibility.with.http.1.0.persistent.connections"/> for more information on backward
1859   compatibility with HTTP/1.0 clients.
1860</t>
1861<t>
1862   In order to remain persistent, all messages on the connection &MUST;
1863   have a self-defined message length (i.e., one not defined by closure
1864   of the connection), as described in <xref target="message.length"/>.
1865</t>
1866</section>
1867
1868<section title="Pipelining" anchor="pipelining">
1869<t>
1870   A client that supports persistent connections &MAY; "pipeline" its
1871   requests (i.e., send multiple requests without waiting for each
1872   response). A server &MUST; send its responses to those requests in the
1873   same order that the requests were received.
1874</t>
1875<t>
1876   Clients which assume persistent connections and pipeline immediately
1877   after connection establishment &SHOULD; be prepared to retry their
1878   connection if the first pipelined attempt fails. If a client does
1879   such a retry, it &MUST-NOT; pipeline before it knows the connection is
1880   persistent. Clients &MUST; also be prepared to resend their requests if
1881   the server closes the connection before sending all of the
1882   corresponding responses.
1883</t>
1884<t>
1885   Clients &SHOULD-NOT;  pipeline requests using non-idempotent methods or
1886   non-idempotent sequences of methods (see &idempotent-methods;). Otherwise, a
1887   premature termination of the transport connection could lead to
1888   indeterminate results. A client wishing to send a non-idempotent
1889   request &SHOULD; wait to send that request until it has received the
1890   response status for the previous request.
1891</t>
1892</section>
1893</section>
1894
1895<section title="Proxy Servers" anchor="persistent.proxy">
1896<t>
1897   It is especially important that proxies correctly implement the
1898   properties of the Connection header field as specified in <xref target="header.connection"/>.
1899</t>
1900<t>
1901   The proxy server &MUST; signal persistent connections separately with
1902   its clients and the origin servers (or other proxy servers) that it
1903   connects to. Each persistent connection applies to only one transport
1904   link.
1905</t>
1906<t>
1907   A proxy server &MUST-NOT; establish a HTTP/1.1 persistent connection
1908   with an HTTP/1.0 client (but see <xref target="RFC2068"/> for information and
1909   discussion of the problems with the Keep-Alive header implemented by
1910   many HTTP/1.0 clients).
1911</t>
1912</section>
1913
1914<section title="Practical Considerations" anchor="persistent.practical">
1915<t>
1916   Servers will usually have some time-out value beyond which they will
1917   no longer maintain an inactive connection. Proxy servers might make
1918   this a higher value since it is likely that the client will be making
1919   more connections through the same server. The use of persistent
1920   connections places no requirements on the length (or existence) of
1921   this time-out for either the client or the server.
1922</t>
1923<t>
1924   When a client or server wishes to time-out it &SHOULD; issue a graceful
1925   close on the transport connection. Clients and servers &SHOULD; both
1926   constantly watch for the other side of the transport close, and
1927   respond to it as appropriate. If a client or server does not detect
1928   the other side's close promptly it could cause unnecessary resource
1929   drain on the network.
1930</t>
1931<t>
1932   A client, server, or proxy &MAY; close the transport connection at any
1933   time. For example, a client might have started to send a new request
1934   at the same time that the server has decided to close the "idle"
1935   connection. From the server's point of view, the connection is being
1936   closed while it was idle, but from the client's point of view, a
1937   request is in progress.
1938</t>
1939<t>
1940   This means that clients, servers, and proxies &MUST; be able to recover
1941   from asynchronous close events. Client software &SHOULD; reopen the
1942   transport connection and retransmit the aborted sequence of requests
1943   without user interaction so long as the request sequence is
1944   idempotent (see &idempotent-methods;). Non-idempotent methods or sequences
1945   &MUST-NOT; be automatically retried, although user agents &MAY; offer a
1946   human operator the choice of retrying the request(s). Confirmation by
1947   user-agent software with semantic understanding of the application
1948   &MAY; substitute for user confirmation. The automatic retry &SHOULD-NOT; 
1949   be repeated if the second sequence of requests fails.
1950</t>
1951<t>
1952   Servers &SHOULD; always respond to at least one request per connection,
1953   if at all possible. Servers &SHOULD-NOT;  close a connection in the
1954   middle of transmitting a response, unless a network or client failure
1955   is suspected.
1956</t>
1957<t>
1958   Clients that use persistent connections &SHOULD; limit the number of
1959   simultaneous connections that they maintain to a given server. A
1960   single-user client &SHOULD-NOT; maintain more than 2 connections with
1961   any server or proxy. A proxy &SHOULD; use up to 2*N connections to
1962   another server or proxy, where N is the number of simultaneously
1963   active users. These guidelines are intended to improve HTTP response
1964   times and avoid congestion.
1965</t>
1966</section>
1967</section>
1968
1969<section title="Message Transmission Requirements" anchor="message.transmission.requirements">
1970
1971<section title="Persistent Connections and Flow Control" anchor="persistent.flow">
1972<t>
1973   HTTP/1.1 servers &SHOULD; maintain persistent connections and use TCP's
1974   flow control mechanisms to resolve temporary overloads, rather than
1975   terminating connections with the expectation that clients will retry.
1976   The latter technique can exacerbate network congestion.
1977</t>
1978</section>
1979
1980<section title="Monitoring Connections for Error Status Messages" anchor="persistent.monitor">
1981<t>
1982   An HTTP/1.1 (or later) client sending a message-body &SHOULD; monitor
1983   the network connection for an error status while it is transmitting
1984   the request. If the client sees an error status, it &SHOULD;
1985   immediately cease transmitting the body. If the body is being sent
1986   using a "chunked" encoding (<xref target="transfer.codings"/>), a zero length chunk and
1987   empty trailer &MAY; be used to prematurely mark the end of the message.
1988   If the body was preceded by a Content-Length header, the client &MUST;
1989   close the connection.
1990</t>
1991</section>
1992
1993<section title="Use of the 100 (Continue) Status" anchor="use.of.the.100.status">
1994<t>
1995   The purpose of the 100 (Continue) status (see &status-100;) is to
1996   allow a client that is sending a request message with a request body
1997   to determine if the origin server is willing to accept the request
1998   (based on the request headers) before the client sends the request
1999   body. In some cases, it might either be inappropriate or highly
2000   inefficient for the client to send the body if the server will reject
2001   the message without looking at the body.
2002</t>
2003<t>
2004   Requirements for HTTP/1.1 clients:
2005  <list style="symbols">
2006    <t>
2007        If a client will wait for a 100 (Continue) response before
2008        sending the request body, it &MUST; send an Expect request-header
2009        field (&header-expect;) with the "100-continue" expectation.
2010    </t>
2011    <t>
2012        A client &MUST-NOT; send an Expect request-header field (&header-expect;)
2013        with the "100-continue" expectation if it does not intend
2014        to send a request body.
2015    </t>
2016  </list>
2017</t>
2018<t>
2019   Because of the presence of older implementations, the protocol allows
2020   ambiguous situations in which a client may send "Expect: 100-continue"
2021   without receiving either a 417 (Expectation Failed) status
2022   or a 100 (Continue) status. Therefore, when a client sends this
2023   header field to an origin server (possibly via a proxy) from which it
2024   has never seen a 100 (Continue) status, the client &SHOULD-NOT;  wait
2025   for an indefinite period before sending the request body.
2026</t>
2027<t>
2028   Requirements for HTTP/1.1 origin servers:
2029  <list style="symbols">
2030    <t> Upon receiving a request which includes an Expect request-header
2031        field with the "100-continue" expectation, an origin server &MUST;
2032        either respond with 100 (Continue) status and continue to read
2033        from the input stream, or respond with a final status code. The
2034        origin server &MUST-NOT; wait for the request body before sending
2035        the 100 (Continue) response. If it responds with a final status
2036        code, it &MAY; close the transport connection or it &MAY; continue
2037        to read and discard the rest of the request.  It &MUST-NOT;
2038        perform the requested method if it returns a final status code.
2039    </t>
2040    <t> An origin server &SHOULD-NOT;  send a 100 (Continue) response if
2041        the request message does not include an Expect request-header
2042        field with the "100-continue" expectation, and &MUST-NOT; send a
2043        100 (Continue) response if such a request comes from an HTTP/1.0
2044        (or earlier) client. There is an exception to this rule: for
2045        compatibility with <xref target="RFC2068"/>, a server &MAY; send a 100 (Continue)
2046        status in response to an HTTP/1.1 PUT or POST request that does
2047        not include an Expect request-header field with the "100-continue"
2048        expectation. This exception, the purpose of which is
2049        to minimize any client processing delays associated with an
2050        undeclared wait for 100 (Continue) status, applies only to
2051        HTTP/1.1 requests, and not to requests with any other HTTP-version
2052        value.
2053    </t>
2054    <t> An origin server &MAY; omit a 100 (Continue) response if it has
2055        already received some or all of the request body for the
2056        corresponding request.
2057    </t>
2058    <t> An origin server that sends a 100 (Continue) response &MUST;
2059    ultimately send a final status code, once the request body is
2060        received and processed, unless it terminates the transport
2061        connection prematurely.
2062    </t>
2063    <t> If an origin server receives a request that does not include an
2064        Expect request-header field with the "100-continue" expectation,
2065        the request includes a request body, and the server responds
2066        with a final status code before reading the entire request body
2067        from the transport connection, then the server &SHOULD-NOT;  close
2068        the transport connection until it has read the entire request,
2069        or until the client closes the connection. Otherwise, the client
2070        might not reliably receive the response message. However, this
2071        requirement is not be construed as preventing a server from
2072        defending itself against denial-of-service attacks, or from
2073        badly broken client implementations.
2074      </t>
2075    </list>
2076</t>
2077<t>
2078   Requirements for HTTP/1.1 proxies:
2079  <list style="symbols">
2080    <t> If a proxy receives a request that includes an Expect request-header
2081        field with the "100-continue" expectation, and the proxy
2082        either knows that the next-hop server complies with HTTP/1.1 or
2083        higher, or does not know the HTTP version of the next-hop
2084        server, it &MUST; forward the request, including the Expect header
2085        field.
2086    </t>
2087    <t> If the proxy knows that the version of the next-hop server is
2088        HTTP/1.0 or lower, it &MUST-NOT; forward the request, and it &MUST;
2089        respond with a 417 (Expectation Failed) status.
2090    </t>
2091    <t> Proxies &SHOULD; maintain a cache recording the HTTP version
2092        numbers received from recently-referenced next-hop servers.
2093    </t>
2094    <t> A proxy &MUST-NOT; forward a 100 (Continue) response if the
2095        request message was received from an HTTP/1.0 (or earlier)
2096        client and did not include an Expect request-header field with
2097        the "100-continue" expectation. This requirement overrides the
2098        general rule for forwarding of 1xx responses (see &status-1xx;).
2099    </t>
2100  </list>
2101</t>
2102</section>
2103
2104<section title="Client Behavior if Server Prematurely Closes Connection" anchor="connection.premature">
2105<t>
2106   If an HTTP/1.1 client sends a request which includes a request body,
2107   but which does not include an Expect request-header field with the
2108   "100-continue" expectation, and if the client is not directly
2109   connected to an HTTP/1.1 origin server, and if the client sees the
2110   connection close before receiving any status from the server, the
2111   client &SHOULD; retry the request.  If the client does retry this
2112   request, it &MAY; use the following "binary exponential backoff"
2113   algorithm to be assured of obtaining a reliable response:
2114  <list style="numbers">
2115    <t>
2116      Initiate a new connection to the server
2117    </t>
2118    <t>
2119      Transmit the request-headers
2120    </t>
2121    <t>
2122      Initialize a variable R to the estimated round-trip time to the
2123         server (e.g., based on the time it took to establish the
2124         connection), or to a constant value of 5 seconds if the round-trip
2125         time is not available.
2126    </t>
2127    <t>
2128       Compute T = R * (2**N), where N is the number of previous
2129         retries of this request.
2130    </t>
2131    <t>
2132       Wait either for an error response from the server, or for T
2133         seconds (whichever comes first)
2134    </t>
2135    <t>
2136       If no error response is received, after T seconds transmit the
2137         body of the request.
2138    </t>
2139    <t>
2140       If client sees that the connection is closed prematurely,
2141         repeat from step 1 until the request is accepted, an error
2142         response is received, or the user becomes impatient and
2143         terminates the retry process.
2144    </t>
2145  </list>
2146</t>
2147<t>
2148   If at any point an error status is received, the client
2149  <list style="symbols">
2150      <t>&SHOULD-NOT;  continue and</t>
2151
2152      <t>&SHOULD; close the connection if it has not completed sending the
2153        request message.</t>
2154    </list>
2155</t>
2156</section>
2157</section>
2158</section>
2159
2160
2161<section title="Header Field Definitions" anchor="header.fields">
2162<t>
2163   This section defines the syntax and semantics of HTTP/1.1 header fields
2164   related to message framing and transport protocols.
2165</t>
2166<t>
2167   For entity-header fields, both sender and recipient refer to either the
2168   client or the server, depending on who sends and who receives the entity.
2169</t>
2170
2171<section title="Connection" anchor="header.connection">
2172  <iref primary="true" item="Connection header" x:for-anchor=""/>
2173  <iref primary="true" item="Headers" subitem="Connection" x:for-anchor=""/>
2174  <x:anchor-alias value="Connection"/>
2175  <x:anchor-alias value="connection-token"/>
2176  <x:anchor-alias value="Connection-v"/>
2177<t>
2178   The general-header field "Connection" allows the sender to specify
2179   options that are desired for that particular connection and &MUST-NOT;
2180   be communicated by proxies over further connections.
2181</t>
2182<t>
2183   The Connection header's value has the following grammar:
2184</t>
2185<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Connection"/><iref primary="true" item="Grammar" subitem="Connection-v"/><iref primary="true" item="Grammar" subitem="connection-token"/>
2186  <x:ref>Connection</x:ref>       = "Connection" ":" <x:ref>OWS</x:ref> <x:ref>Connection-v</x:ref>
2187  <x:ref>Connection-v</x:ref>     = 1#<x:ref>connection-token</x:ref>
2188  <x:ref>connection-token</x:ref> = <x:ref>token</x:ref>
2189</artwork></figure>
2190<t>
2191   HTTP/1.1 proxies &MUST; parse the Connection header field before a
2192   message is forwarded and, for each connection-token in this field,
2193   remove any header field(s) from the message with the same name as the
2194   connection-token. Connection options are signaled by the presence of
2195   a connection-token in the Connection header field, not by any
2196   corresponding additional header field(s), since the additional header
2197   field may not be sent if there are no parameters associated with that
2198   connection option.
2199</t>
2200<t>
2201   Message headers listed in the Connection header &MUST-NOT; include
2202   end-to-end headers, such as Cache-Control.
2203</t>
2204<t>
2205   HTTP/1.1 defines the "close" connection option for the sender to
2206   signal that the connection will be closed after completion of the
2207   response. For example,
2208</t>
2209<figure><artwork type="example">
2210  Connection: close
2211</artwork></figure>
2212<t>
2213   in either the request or the response header fields indicates that
2214   the connection &SHOULD-NOT;  be considered `persistent' (<xref target="persistent.connections"/>)
2215   after the current request/response is complete.
2216</t>
2217<t>
2218   An HTTP/1.1 client that does not support persistent connections &MUST;
2219   include the "close" connection option in every request message.
2220</t>
2221<t>
2222   An HTTP/1.1 server that does not support persistent connections &MUST;
2223   include the "close" connection option in every response message that
2224   does not have a 1xx (informational) status code.
2225</t>
2226<t>
2227   A system receiving an HTTP/1.0 (or lower-version) message that
2228   includes a Connection header &MUST;, for each connection-token in this
2229   field, remove and ignore any header field(s) from the message with
2230   the same name as the connection-token. This protects against mistaken
2231   forwarding of such header fields by pre-HTTP/1.1 proxies. See <xref target="compatibility.with.http.1.0.persistent.connections"/>.
2232</t>
2233</section>
2234
2235<section title="Content-Length" anchor="header.content-length">
2236  <iref primary="true" item="Content-Length header" x:for-anchor=""/>
2237  <iref primary="true" item="Headers" subitem="Content-Length" x:for-anchor=""/>
2238  <x:anchor-alias value="Content-Length"/>
2239  <x:anchor-alias value="Content-Length-v"/>
2240<t>
2241   The entity-header field "Content-Length" indicates the size of the
2242   entity-body, in decimal number of OCTETs, sent to the recipient or,
2243   in the case of the HEAD method, the size of the entity-body that
2244   would have been sent had the request been a GET.
2245</t>
2246<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Content-Length"/><iref primary="true" item="Grammar" subitem="Content-Length-v"/>
2247  <x:ref>Content-Length</x:ref>   = "Content-Length" ":" <x:ref>OWS</x:ref> 1*<x:ref>Content-Length-v</x:ref>
2248  <x:ref>Content-Length-v</x:ref> = 1*<x:ref>DIGIT</x:ref>
2249</artwork></figure>
2250<t>
2251   An example is
2252</t>
2253<figure><artwork type="example">
2254  Content-Length: 3495
2255</artwork></figure>
2256<t>
2257   Applications &SHOULD; use this field to indicate the transfer-length of
2258   the message-body, unless this is prohibited by the rules in <xref target="message.length"/>.
2259</t>
2260<t>
2261   Any Content-Length greater than or equal to zero is a valid value.
2262   <xref target="message.length"/> describes how to determine the length of a message-body
2263   if a Content-Length is not given.
2264</t>
2265<t>
2266   Note that the meaning of this field is significantly different from
2267   the corresponding definition in MIME, where it is an optional field
2268   used within the "message/external-body" content-type. In HTTP, it
2269   &SHOULD; be sent whenever the message's length can be determined prior
2270   to being transferred, unless this is prohibited by the rules in
2271   <xref target="message.length"/>.
2272</t>
2273</section>
2274
2275<section title="Date" anchor="header.date">
2276  <iref primary="true" item="Date header" x:for-anchor=""/>
2277  <iref primary="true" item="Headers" subitem="Date" x:for-anchor=""/>
2278  <x:anchor-alias value="Date"/>
2279  <x:anchor-alias value="Date-v"/>
2280<t>
2281   The general-header field "Date" represents the date and time at which
2282   the message was originated, having the same semantics as orig-date in
2283   <xref target="RFC5322" x:fmt="of" x:sec="3.6.1"/>. The field value is an
2284   HTTP-date, as described in <xref target="full.date"/>;
2285   it &MUST; be sent in rfc1123-date format.
2286</t>
2287<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Date"/><iref primary="true" item="Grammar" subitem="Date-v"/>
2288  <x:ref>Date</x:ref>   = "Date" ":" <x:ref>OWS</x:ref> <x:ref>Date-v</x:ref>
2289  <x:ref>Date-v</x:ref> = <x:ref>HTTP-date</x:ref>
2290</artwork></figure>
2291<t>
2292   An example is
2293</t>
2294<figure><artwork type="example">
2295  Date: Tue, 15 Nov 1994 08:12:31 GMT
2296</artwork></figure>
2297<t>
2298   Origin servers &MUST; include a Date header field in all responses,
2299   except in these cases:
2300  <list style="numbers">
2301      <t>If the response status code is 100 (Continue) or 101 (Switching
2302         Protocols), the response &MAY; include a Date header field, at
2303         the server's option.</t>
2304
2305      <t>If the response status code conveys a server error, e.g. 500
2306         (Internal Server Error) or 503 (Service Unavailable), and it is
2307         inconvenient or impossible to generate a valid Date.</t>
2308
2309      <t>If the server does not have a clock that can provide a
2310         reasonable approximation of the current time, its responses
2311         &MUST-NOT; include a Date header field. In this case, the rules
2312         in <xref target="clockless.origin.server.operation"/> &MUST; be followed.</t>
2313  </list>
2314</t>
2315<t>
2316   A received message that does not have a Date header field &MUST; be
2317   assigned one by the recipient if the message will be cached by that
2318   recipient or gatewayed via a protocol which requires a Date. An HTTP
2319   implementation without a clock &MUST-NOT; cache responses without
2320   revalidating them on every use. An HTTP cache, especially a shared
2321   cache, &SHOULD; use a mechanism, such as NTP <xref target="RFC1305"/>, to synchronize its
2322   clock with a reliable external standard.
2323</t>
2324<t>
2325   Clients &SHOULD; only send a Date header field in messages that include
2326   an entity-body, as in the case of the PUT and POST requests, and even
2327   then it is optional. A client without a clock &MUST-NOT; send a Date
2328   header field in a request.
2329</t>
2330<t>
2331   The HTTP-date sent in a Date header &SHOULD-NOT;  represent a date and
2332   time subsequent to the generation of the message. It &SHOULD; represent
2333   the best available approximation of the date and time of message
2334   generation, unless the implementation has no means of generating a
2335   reasonably accurate date and time. In theory, the date ought to
2336   represent the moment just before the entity is generated. In
2337   practice, the date can be generated at any time during the message
2338   origination without affecting its semantic value.
2339</t>
2340
2341<section title="Clockless Origin Server Operation" anchor="clockless.origin.server.operation">
2342<t>
2343   Some origin server implementations might not have a clock available.
2344   An origin server without a clock &MUST-NOT; assign Expires or Last-Modified
2345   values to a response, unless these values were associated
2346   with the resource by a system or user with a reliable clock. It &MAY;
2347   assign an Expires value that is known, at or before server
2348   configuration time, to be in the past (this allows "pre-expiration"
2349   of responses without storing separate Expires values for each
2350   resource).
2351</t>
2352</section>
2353</section>
2354
2355<section title="Host" anchor="header.host">
2356  <iref primary="true" item="Host header" x:for-anchor=""/>
2357  <iref primary="true" item="Headers" subitem="Host" x:for-anchor=""/>
2358  <x:anchor-alias value="Host"/>
2359  <x:anchor-alias value="Host-v"/>
2360<t>
2361   The request-header field "Host" specifies the Internet host and port
2362   number of the resource being requested, as obtained from the original
2363   URI given by the user or referring resource (generally an http URI,
2364   as described in <xref target="http.uri"/>). The Host field value &MUST; represent
2365   the naming authority of the origin server or gateway given by the
2366   original URL. This allows the origin server or gateway to
2367   differentiate between internally-ambiguous URLs, such as the root "/"
2368   URL of a server for multiple host names on a single IP address.
2369</t>
2370<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Host"/><iref primary="true" item="Grammar" subitem="Host-v"/>
2371  <x:ref>Host</x:ref>   = "Host" ":" <x:ref>OWS</x:ref> <x:ref>Host-v</x:ref>
2372  <x:ref>Host-v</x:ref> = <x:ref>uri-host</x:ref> [ ":" <x:ref>port</x:ref> ] ; <xref target="http.uri"/>
2373</artwork></figure>
2374<t>
2375   A "host" without any trailing port information implies the default
2376   port for the service requested (e.g., "80" for an HTTP URL). For
2377   example, a request on the origin server for
2378   &lt;http://www.example.org/pub/WWW/&gt; would properly include:
2379</t>
2380<figure><artwork type="example">
2381  GET /pub/WWW/ HTTP/1.1
2382  Host: www.example.org
2383</artwork></figure>
2384<t>
2385   A client &MUST; include a Host header field in all HTTP/1.1 request
2386   messages. If the requested URI does not include an Internet host
2387   name for the service being requested, then the Host header field &MUST;
2388   be given with an empty value. An HTTP/1.1 proxy &MUST; ensure that any
2389   request message it forwards does contain an appropriate Host header
2390   field that identifies the service being requested by the proxy. All
2391   Internet-based HTTP/1.1 servers &MUST; respond with a 400 (Bad Request)
2392   status code to any HTTP/1.1 request message which lacks a Host header
2393   field.
2394</t>
2395<t>
2396   See Sections <xref target="the.resource.identified.by.a.request" format="counter"/>
2397   and <xref target="changes.to.simplify.multi-homed.web.servers.and.conserve.ip.addresses" format="counter"/>
2398   for other requirements relating to Host.
2399</t>
2400</section>
2401
2402<section title="TE" anchor="header.te">
2403  <iref primary="true" item="TE header" x:for-anchor=""/>
2404  <iref primary="true" item="Headers" subitem="TE" x:for-anchor=""/>
2405  <x:anchor-alias value="TE"/>
2406  <x:anchor-alias value="TE-v"/>
2407  <x:anchor-alias value="t-codings"/>
2408  <x:anchor-alias value="te-params"/>
2409  <x:anchor-alias value="te-ext"/>
2410<t>
2411   The request-header field "TE" indicates what extension transfer-codings
2412   it is willing to accept in the response and whether or not it is
2413   willing to accept trailer fields in a chunked transfer-coding. Its
2414   value may consist of the keyword "trailers" and/or a comma-separated
2415   list of extension transfer-coding names with optional accept
2416   parameters (as described in <xref target="transfer.codings"/>).
2417</t>
2418<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="TE"/><iref primary="true" item="Grammar" subitem="TE-v"/><iref primary="true" item="Grammar" subitem="t-codings"/><iref primary="true" item="Grammar" subitem="te-params"/><iref primary="true" item="Grammar" subitem="te-ext"/>
2419  <x:ref>TE</x:ref>        = "TE" ":" <x:ref>OWS</x:ref> <x:ref>TE-v</x:ref>
2420  <x:ref>TE-v</x:ref>      = #<x:ref>t-codings</x:ref>
2421  <x:ref>t-codings</x:ref> = "trailers" / ( <x:ref>transfer-extension</x:ref> [ <x:ref>te-params</x:ref> ] )
2422  <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> )
2423  <x:ref>te-ext</x:ref>    = <x:ref>OWS</x:ref> ";" <x:ref>OWS</x:ref> <x:ref>token</x:ref> [ "=" ( <x:ref>token</x:ref> / <x:ref>quoted-string</x:ref> ) ]
2424</artwork></figure>
2425<t>
2426   The presence of the keyword "trailers" indicates that the client is
2427   willing to accept trailer fields in a chunked transfer-coding, as
2428   defined in <xref target="chunked.transfer.encoding"/>. This keyword is reserved for use with
2429   transfer-coding values even though it does not itself represent a
2430   transfer-coding.
2431</t>
2432<t>
2433   Examples of its use are:
2434</t>
2435<figure><artwork type="example">
2436  TE: deflate
2437  TE:
2438  TE: trailers, deflate;q=0.5
2439</artwork></figure>
2440<t>
2441   The TE header field only applies to the immediate connection.
2442   Therefore, the keyword &MUST; be supplied within a Connection header
2443   field (<xref target="header.connection"/>) whenever TE is present in an HTTP/1.1 message.
2444</t>
2445<t>
2446   A server tests whether a transfer-coding is acceptable, according to
2447   a TE field, using these rules:
2448  <list style="numbers">
2449    <x:lt>
2450      <t>The "chunked" transfer-coding is always acceptable. If the
2451         keyword "trailers" is listed, the client indicates that it is
2452         willing to accept trailer fields in the chunked response on
2453         behalf of itself and any downstream clients. The implication is
2454         that, if given, the client is stating that either all
2455         downstream clients are willing to accept trailer fields in the
2456         forwarded response, or that it will attempt to buffer the
2457         response on behalf of downstream recipients.
2458      </t><t>
2459         <x:h>Note:</x:h> HTTP/1.1 does not define any means to limit the size of a
2460         chunked response such that a client can be assured of buffering
2461         the entire response.</t>
2462    </x:lt>
2463    <x:lt>
2464      <t>If the transfer-coding being tested is one of the transfer-codings
2465         listed in the TE field, then it is acceptable unless it
2466         is accompanied by a qvalue of 0. (As defined in <xref target="quality.values"/>, a
2467         qvalue of 0 means "not acceptable.")</t>
2468    </x:lt>
2469    <x:lt>
2470      <t>If multiple transfer-codings are acceptable, then the
2471         acceptable transfer-coding with the highest non-zero qvalue is
2472         preferred.  The "chunked" transfer-coding always has a qvalue
2473         of 1.</t>
2474    </x:lt>
2475  </list>
2476</t>
2477<t>
2478   If the TE field-value is empty or if no TE field is present, the only
2479   transfer-coding is "chunked". A message with no transfer-coding is
2480   always acceptable.
2481</t>
2482</section>
2483
2484<section title="Trailer" anchor="header.trailer">
2485  <iref primary="true" item="Trailer header" x:for-anchor=""/>
2486  <iref primary="true" item="Headers" subitem="Trailer" x:for-anchor=""/>
2487  <x:anchor-alias value="Trailer"/>
2488  <x:anchor-alias value="Trailer-v"/>
2489<t>
2490   The general field "Trailer" indicates that the given set of
2491   header fields is present in the trailer of a message encoded with
2492   chunked transfer-coding.
2493</t>
2494<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Trailer"/><iref primary="true" item="Grammar" subitem="Trailer-v"/>
2495  <x:ref>Trailer</x:ref>   = "Trailer" ":" <x:ref>OWS</x:ref> <x:ref>Trailer-v</x:ref>
2496  <x:ref>Trailer-v</x:ref> = 1#<x:ref>field-name</x:ref>
2497</artwork></figure>
2498<t>
2499   An HTTP/1.1 message &SHOULD; include a Trailer header field in a
2500   message using chunked transfer-coding with a non-empty trailer. Doing
2501   so allows the recipient to know which header fields to expect in the
2502   trailer.
2503</t>
2504<t>
2505   If no Trailer header field is present, the trailer &SHOULD-NOT;  include
2506   any header fields. See <xref target="chunked.transfer.encoding"/> for restrictions on the use of
2507   trailer fields in a "chunked" transfer-coding.
2508</t>
2509<t>
2510   Message header fields listed in the Trailer header field &MUST-NOT;
2511   include the following header fields:
2512  <list style="symbols">
2513    <t>Transfer-Encoding</t>
2514    <t>Content-Length</t>
2515    <t>Trailer</t>
2516  </list>
2517</t>
2518</section>
2519
2520<section title="Transfer-Encoding" anchor="header.transfer-encoding">
2521  <iref primary="true" item="Transfer-Encoding header" x:for-anchor=""/>
2522  <iref primary="true" item="Headers" subitem="Transfer-Encoding" x:for-anchor=""/>
2523  <x:anchor-alias value="Transfer-Encoding"/>
2524  <x:anchor-alias value="Transfer-Encoding-v"/>
2525<t>
2526   The general-header "Transfer-Encoding" field indicates what (if any)
2527   type of transformation has been applied to the message body in order
2528   to safely transfer it between the sender and the recipient. This
2529   differs from the content-coding in that the transfer-coding is a
2530   property of the message, not of the entity.
2531</t>
2532<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Transfer-Encoding"/><iref primary="true" item="Grammar" subitem="Transfer-Encoding-v"/>
2533  <x:ref>Transfer-Encoding</x:ref>   = "Transfer-Encoding" ":" <x:ref>OWS</x:ref>
2534                        <x:ref>Transfer-Encoding-v</x:ref>
2535  <x:ref>Transfer-Encoding-v</x:ref> = 1#<x:ref>transfer-coding</x:ref>
2536</artwork></figure>
2537<t>
2538   Transfer-codings are defined in <xref target="transfer.codings"/>. An example is:
2539</t>
2540<figure><artwork type="example">
2541  Transfer-Encoding: chunked
2542</artwork></figure>
2543<t>
2544   If multiple encodings have been applied to an entity, the transfer-codings
2545   &MUST; be listed in the order in which they were applied.
2546   Additional information about the encoding parameters &MAY; be provided
2547   by other entity-header fields not defined by this specification.
2548</t>
2549<t>
2550   Many older HTTP/1.0 applications do not understand the Transfer-Encoding
2551   header.
2552</t>
2553</section>
2554
2555<section title="Upgrade" anchor="header.upgrade">
2556  <iref primary="true" item="Upgrade header" x:for-anchor=""/>
2557  <iref primary="true" item="Headers" subitem="Upgrade" x:for-anchor=""/>
2558  <x:anchor-alias value="Upgrade"/>
2559  <x:anchor-alias value="Upgrade-v"/>
2560<t>
2561   The general-header "Upgrade" allows the client to specify what
2562   additional communication protocols it supports and would like to use
2563   if the server finds it appropriate to switch protocols. The server
2564   &MUST; use the Upgrade header field within a 101 (Switching Protocols)
2565   response to indicate which protocol(s) are being switched.
2566</t>
2567<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Upgrade"/><iref primary="true" item="Grammar" subitem="Upgrade-v"/>
2568  <x:ref>Upgrade</x:ref>   = "Upgrade" ":" <x:ref>OWS</x:ref> <x:ref>Upgrade-v</x:ref>
2569  <x:ref>Upgrade-v</x:ref> = 1#<x:ref>product</x:ref>
2570</artwork></figure>
2571<t>
2572   For example,
2573</t>
2574<figure><artwork type="example">
2575  Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11
2576</artwork></figure>
2577<t>
2578   The Upgrade header field is intended to provide a simple mechanism
2579   for transition from HTTP/1.1 to some other, incompatible protocol. It
2580   does so by allowing the client to advertise its desire to use another
2581   protocol, such as a later version of HTTP with a higher major version
2582   number, even though the current request has been made using HTTP/1.1.
2583   This eases the difficult transition between incompatible protocols by
2584   allowing the client to initiate a request in the more commonly
2585   supported protocol while indicating to the server that it would like
2586   to use a "better" protocol if available (where "better" is determined
2587   by the server, possibly according to the nature of the method and/or
2588   resource being requested).
2589</t>
2590<t>
2591   The Upgrade header field only applies to switching application-layer
2592   protocols upon the existing transport-layer connection. Upgrade
2593   cannot be used to insist on a protocol change; its acceptance and use
2594   by the server is optional. The capabilities and nature of the
2595   application-layer communication after the protocol change is entirely
2596   dependent upon the new protocol chosen, although the first action
2597   after changing the protocol &MUST; be a response to the initial HTTP
2598   request containing the Upgrade header field.
2599</t>
2600<t>
2601   The Upgrade header field only applies to the immediate connection.
2602   Therefore, the upgrade keyword &MUST; be supplied within a Connection
2603   header field (<xref target="header.connection"/>) whenever Upgrade is present in an
2604   HTTP/1.1 message.
2605</t>
2606<t>
2607   The Upgrade header field cannot be used to indicate a switch to a
2608   protocol on a different connection. For that purpose, it is more
2609   appropriate to use a 301, 302, 303, or 305 redirection response.
2610</t>
2611<t>
2612   This specification only defines the protocol name "HTTP" for use by
2613   the family of Hypertext Transfer Protocols, as defined by the HTTP
2614   version rules of <xref target="http.version"/> and future updates to this
2615   specification. Any token can be used as a protocol name; however, it
2616   will only be useful if both the client and server associate the name
2617   with the same protocol.
2618</t>
2619</section>
2620
2621<section title="Via" anchor="header.via">
2622  <iref primary="true" item="Via header" x:for-anchor=""/>
2623  <iref primary="true" item="Headers" subitem="Via" x:for-anchor=""/>
2624  <x:anchor-alias value="protocol-name"/>
2625  <x:anchor-alias value="protocol-version"/>
2626  <x:anchor-alias value="pseudonym"/>
2627  <x:anchor-alias value="received-by"/>
2628  <x:anchor-alias value="received-protocol"/>
2629  <x:anchor-alias value="Via"/>
2630  <x:anchor-alias value="Via-v"/>
2631<t>
2632   The general-header field "Via" &MUST; be used by gateways and proxies to
2633   indicate the intermediate protocols and recipients between the user
2634   agent and the server on requests, and between the origin server and
2635   the client on responses. It is analogous to the "Received" field defined in
2636   <xref target="RFC5322" x:fmt="of" x:sec="3.6.7"/> and is intended to be used for tracking message forwards,
2637   avoiding request loops, and identifying the protocol capabilities of
2638   all senders along the request/response chain.
2639</t>
2640<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Via"/><iref primary="true" item="Grammar" subitem="Via-v"/><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"/>
2641  <x:ref>Via</x:ref>               = "Via" ":" <x:ref>OWS</x:ref> <x:ref>Via-v</x:ref>
2642  <x:ref>Via-v</x:ref>             = 1#( <x:ref>received-protocol</x:ref> <x:ref>RWS</x:ref> <x:ref>received-by</x:ref>
2643                          [ <x:ref>RWS</x:ref> <x:ref>comment</x:ref> ] )
2644  <x:ref>received-protocol</x:ref> = [ <x:ref>protocol-name</x:ref> "/" ] <x:ref>protocol-version</x:ref>
2645  <x:ref>protocol-name</x:ref>     = <x:ref>token</x:ref>
2646  <x:ref>protocol-version</x:ref>  = <x:ref>token</x:ref>
2647  <x:ref>received-by</x:ref>       = ( <x:ref>uri-host</x:ref> [ ":" <x:ref>port</x:ref> ] ) / <x:ref>pseudonym</x:ref>
2648  <x:ref>pseudonym</x:ref>         = <x:ref>token</x:ref>
2649</artwork></figure>
2650<t>
2651   The received-protocol indicates the protocol version of the message
2652   received by the server or client along each segment of the
2653   request/response chain. The received-protocol version is appended to
2654   the Via field value when the message is forwarded so that information
2655   about the protocol capabilities of upstream applications remains
2656   visible to all recipients.
2657</t>
2658<t>
2659   The protocol-name is optional if and only if it would be "HTTP". The
2660   received-by field is normally the host and optional port number of a
2661   recipient server or client that subsequently forwarded the message.
2662   However, if the real host is considered to be sensitive information,
2663   it &MAY; be replaced by a pseudonym. If the port is not given, it &MAY;
2664   be assumed to be the default port of the received-protocol.
2665</t>
2666<t>
2667   Multiple Via field values represents each proxy or gateway that has
2668   forwarded the message. Each recipient &MUST; append its information
2669   such that the end result is ordered according to the sequence of
2670   forwarding applications.
2671</t>
2672<t>
2673   Comments &MAY; be used in the Via header field to identify the software
2674   of the recipient proxy or gateway, analogous to the User-Agent and
2675   Server header fields. However, all comments in the Via field are
2676   optional and &MAY; be removed by any recipient prior to forwarding the
2677   message.
2678</t>
2679<t>
2680   For example, a request message could be sent from an HTTP/1.0 user
2681   agent to an internal proxy code-named "fred", which uses HTTP/1.1 to
2682   forward the request to a public proxy at p.example.net, which completes
2683   the request by forwarding it to the origin server at www.example.com.
2684   The request received by www.example.com would then have the following
2685   Via header field:
2686</t>
2687<figure><artwork type="example">
2688  Via: 1.0 fred, 1.1 p.example.net (Apache/1.1)
2689</artwork></figure>
2690<t>
2691   Proxies and gateways used as a portal through a network firewall
2692   &SHOULD-NOT;, by default, forward the names and ports of hosts within
2693   the firewall region. This information &SHOULD; only be propagated if
2694   explicitly enabled. If not enabled, the received-by host of any host
2695   behind the firewall &SHOULD; be replaced by an appropriate pseudonym
2696   for that host.
2697</t>
2698<t>
2699   For organizations that have strong privacy requirements for hiding
2700   internal structures, a proxy &MAY; combine an ordered subsequence of
2701   Via header field entries with identical received-protocol values into
2702   a single such entry. For example,
2703</t>
2704<figure><artwork type="example">
2705  Via: 1.0 ricky, 1.1 ethel, 1.1 fred, 1.0 lucy
2706</artwork></figure>
2707<t>
2708        could be collapsed to
2709</t>
2710<figure><artwork type="example">
2711  Via: 1.0 ricky, 1.1 mertz, 1.0 lucy
2712</artwork></figure>
2713<t>
2714   Applications &SHOULD-NOT;  combine multiple entries unless they are all
2715   under the same organizational control and the hosts have already been
2716   replaced by pseudonyms. Applications &MUST-NOT; combine entries which
2717   have different received-protocol values.
2718</t>
2719</section>
2720
2721</section>
2722
2723<section title="IANA Considerations" anchor="IANA.considerations">
2724<section title="Message Header Registration" anchor="message.header.registration">
2725<t>
2726   The Message Header Registry located at <eref target="http://www.iana.org/assignments/message-headers/message-header-index.html"/> should be updated
2727   with the permanent registrations below (see <xref target="RFC3864"/>):
2728</t>
2729<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
2730<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
2731   <ttcol>Header Field Name</ttcol>
2732   <ttcol>Protocol</ttcol>
2733   <ttcol>Status</ttcol>
2734   <ttcol>Reference</ttcol>
2735
2736   <c>Connection</c>
2737   <c>http</c>
2738   <c>standard</c>
2739   <c>
2740      <xref target="header.connection"/>
2741   </c>
2742   <c>Content-Length</c>
2743   <c>http</c>
2744   <c>standard</c>
2745   <c>
2746      <xref target="header.content-length"/>
2747   </c>
2748   <c>Date</c>
2749   <c>http</c>
2750   <c>standard</c>
2751   <c>
2752      <xref target="header.date"/>
2753   </c>
2754   <c>Host</c>
2755   <c>http</c>
2756   <c>standard</c>
2757   <c>
2758      <xref target="header.host"/>
2759   </c>
2760   <c>TE</c>
2761   <c>http</c>
2762   <c>standard</c>
2763   <c>
2764      <xref target="header.te"/>
2765   </c>
2766   <c>Trailer</c>
2767   <c>http</c>
2768   <c>standard</c>
2769   <c>
2770      <xref target="header.trailer"/>
2771   </c>
2772   <c>Transfer-Encoding</c>
2773   <c>http</c>
2774   <c>standard</c>
2775   <c>
2776      <xref target="header.transfer-encoding"/>
2777   </c>
2778   <c>Upgrade</c>
2779   <c>http</c>
2780   <c>standard</c>
2781   <c>
2782      <xref target="header.upgrade"/>
2783   </c>
2784   <c>Via</c>
2785   <c>http</c>
2786   <c>standard</c>
2787   <c>
2788      <xref target="header.via"/>
2789   </c>
2790</texttable>
2791<!--(END)-->
2792<t>
2793   The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".
2794</t>
2795</section>
2796
2797<section title="URI Scheme Registration" anchor="uri.scheme.registration">
2798<t>
2799   The entry for the "http" URI Scheme in the registry located at
2800   <eref target="http://www.iana.org/assignments/uri-schemes.html"/>
2801   should be updated to point to <xref target="http.uri"/> of this document
2802   (see <xref target="RFC4395"/>).
2803</t>
2804</section>
2805
2806<section title="Internet Media Type Registrations" anchor="internet.media.type.http">
2807<t>
2808   This document serves as the specification for the Internet media types
2809   "message/http" and "application/http". The following is to be registered with
2810   IANA (see <xref target="RFC4288"/>).
2811</t>
2812<section title="Internet Media Type message/http" anchor="internet.media.type.message.http">
2813<iref item="Media Type" subitem="message/http" primary="true"/>
2814<iref item="message/http Media Type" primary="true"/>
2815<t>
2816   The message/http type can be used to enclose a single HTTP request or
2817   response message, provided that it obeys the MIME restrictions for all
2818   "message" types regarding line length and encodings.
2819</t>
2820<t>
2821  <list style="hanging" x:indent="12em">
2822    <t hangText="Type name:">
2823      message
2824    </t>
2825    <t hangText="Subtype name:">
2826      http
2827    </t>
2828    <t hangText="Required parameters:">
2829      none
2830    </t>
2831    <t hangText="Optional parameters:">
2832      version, msgtype
2833      <list style="hanging">
2834        <t hangText="version:">
2835          The HTTP-Version number of the enclosed message
2836          (e.g., "1.1"). If not present, the version can be
2837          determined from the first line of the body.
2838        </t>
2839        <t hangText="msgtype:">
2840          The message type -- "request" or "response". If not
2841          present, the type can be determined from the first
2842          line of the body.
2843        </t>
2844      </list>
2845    </t>
2846    <t hangText="Encoding considerations:">
2847      only "7bit", "8bit", or "binary" are permitted
2848    </t>
2849    <t hangText="Security considerations:">
2850      none
2851    </t>
2852    <t hangText="Interoperability considerations:">
2853      none
2854    </t>
2855    <t hangText="Published specification:">
2856      This specification (see <xref target="internet.media.type.message.http"/>).
2857    </t>
2858    <t hangText="Applications that use this media type:">
2859    </t>
2860    <t hangText="Additional information:">
2861      <list style="hanging">
2862        <t hangText="Magic number(s):">none</t>
2863        <t hangText="File extension(s):">none</t>
2864        <t hangText="Macintosh file type code(s):">none</t>
2865      </list>
2866    </t>
2867    <t hangText="Person and email address to contact for further information:">
2868      See Authors Section.
2869    </t>
2870                <t hangText="Intended usage:">
2871                  COMMON
2872    </t>
2873                <t hangText="Restrictions on usage:">
2874                  none
2875    </t>
2876    <t hangText="Author/Change controller:">
2877      IESG
2878    </t>
2879  </list>
2880</t>
2881</section>
2882<section title="Internet Media Type application/http" anchor="internet.media.type.application.http">
2883<iref item="Media Type" subitem="application/http" primary="true"/>
2884<iref item="application/http Media Type" primary="true"/>
2885<t>
2886   The application/http type can be used to enclose a pipeline of one or more
2887   HTTP request or response messages (not intermixed).
2888</t>
2889<t>
2890  <list style="hanging" x:indent="12em">
2891    <t hangText="Type name:">
2892      application
2893    </t>
2894    <t hangText="Subtype name:">
2895      http
2896    </t>
2897    <t hangText="Required parameters:">
2898      none
2899    </t>
2900    <t hangText="Optional parameters:">
2901      version, msgtype
2902      <list style="hanging">
2903        <t hangText="version:">
2904          The HTTP-Version number of the enclosed messages
2905          (e.g., "1.1"). If not present, the version can be
2906          determined from the first line of the body.
2907        </t>
2908        <t hangText="msgtype:">
2909          The message type -- "request" or "response". If not
2910          present, the type can be determined from the first
2911          line of the body.
2912        </t>
2913      </list>
2914    </t>
2915    <t hangText="Encoding considerations:">
2916      HTTP messages enclosed by this type
2917      are in "binary" format; use of an appropriate
2918      Content-Transfer-Encoding is required when
2919      transmitted via E-mail.
2920    </t>
2921    <t hangText="Security considerations:">
2922      none
2923    </t>
2924    <t hangText="Interoperability considerations:">
2925      none
2926    </t>
2927    <t hangText="Published specification:">
2928      This specification (see <xref target="internet.media.type.application.http"/>).
2929    </t>
2930    <t hangText="Applications that use this media type:">
2931    </t>
2932    <t hangText="Additional information:">
2933      <list style="hanging">
2934        <t hangText="Magic number(s):">none</t>
2935        <t hangText="File extension(s):">none</t>
2936        <t hangText="Macintosh file type code(s):">none</t>
2937      </list>
2938    </t>
2939    <t hangText="Person and email address to contact for further information:">
2940      See Authors Section.
2941    </t>
2942                <t hangText="Intended usage:">
2943                  COMMON
2944    </t>
2945                <t hangText="Restrictions on usage:">
2946                  none
2947    </t>
2948    <t hangText="Author/Change controller:">
2949      IESG
2950    </t>
2951  </list>
2952</t>
2953</section>
2954</section>
2955
2956</section>
2957
2958<section title="Security Considerations" anchor="security.considerations">
2959<t>
2960   This section is meant to inform application developers, information
2961   providers, and users of the security limitations in HTTP/1.1 as
2962   described by this document. The discussion does not include
2963   definitive solutions to the problems revealed, though it does make
2964   some suggestions for reducing security risks.
2965</t>
2966
2967<section title="Personal Information" anchor="personal.information">
2968<t>
2969   HTTP clients are often privy to large amounts of personal information
2970   (e.g. the user's name, location, mail address, passwords, encryption
2971   keys, etc.), and &SHOULD; be very careful to prevent unintentional
2972   leakage of this information.
2973   We very strongly recommend that a convenient interface be provided
2974   for the user to control dissemination of such information, and that
2975   designers and implementors be particularly careful in this area.
2976   History shows that errors in this area often create serious security
2977   and/or privacy problems and generate highly adverse publicity for the
2978   implementor's company.
2979</t>
2980</section>
2981
2982<section title="Abuse of Server Log Information" anchor="abuse.of.server.log.information">
2983<t>
2984   A server is in the position to save personal data about a user's
2985   requests which might identify their reading patterns or subjects of
2986   interest. This information is clearly confidential in nature and its
2987   handling can be constrained by law in certain countries. People using
2988   HTTP to provide data are responsible for ensuring that
2989   such material is not distributed without the permission of any
2990   individuals that are identifiable by the published results.
2991</t>
2992</section>
2993
2994<section title="Attacks Based On File and Path Names" anchor="attack.pathname">
2995<t>
2996   Implementations of HTTP origin servers &SHOULD; be careful to restrict
2997   the documents returned by HTTP requests to be only those that were
2998   intended by the server administrators. If an HTTP server translates
2999   HTTP URIs directly into file system calls, the server &MUST; take
3000   special care not to serve files that were not intended to be
3001   delivered to HTTP clients. For example, UNIX, Microsoft Windows, and
3002   other operating systems use ".." as a path component to indicate a
3003   directory level above the current one. On such a system, an HTTP
3004   server &MUST; disallow any such construct in the request-target if it
3005   would otherwise allow access to a resource outside those intended to
3006   be accessible via the HTTP server. Similarly, files intended for
3007   reference only internally to the server (such as access control
3008   files, configuration files, and script code) &MUST; be protected from
3009   inappropriate retrieval, since they might contain sensitive
3010   information. Experience has shown that minor bugs in such HTTP server
3011   implementations have turned into security risks.
3012</t>
3013</section>
3014
3015<section title="DNS Spoofing" anchor="dns.spoofing">
3016<t>
3017   Clients using HTTP rely heavily on the Domain Name Service, and are
3018   thus generally prone to security attacks based on the deliberate
3019   mis-association of IP addresses and DNS names. Clients need to be
3020   cautious in assuming the continuing validity of an IP number/DNS name
3021   association.
3022</t>
3023<t>
3024   In particular, HTTP clients &SHOULD; rely on their name resolver for
3025   confirmation of an IP number/DNS name association, rather than
3026   caching the result of previous host name lookups. Many platforms
3027   already can cache host name lookups locally when appropriate, and
3028   they &SHOULD; be configured to do so. It is proper for these lookups to
3029   be cached, however, only when the TTL (Time To Live) information
3030   reported by the name server makes it likely that the cached
3031   information will remain useful.
3032</t>
3033<t>
3034   If HTTP clients cache the results of host name lookups in order to
3035   achieve a performance improvement, they &MUST; observe the TTL
3036   information reported by DNS.
3037</t>
3038<t>
3039   If HTTP clients do not observe this rule, they could be spoofed when
3040   a previously-accessed server's IP address changes. As network
3041   renumbering is expected to become increasingly common <xref target="RFC1900"/>, the
3042   possibility of this form of attack will grow. Observing this
3043   requirement thus reduces this potential security vulnerability.
3044</t>
3045<t>
3046   This requirement also improves the load-balancing behavior of clients
3047   for replicated servers using the same DNS name and reduces the
3048   likelihood of a user's experiencing failure in accessing sites which
3049   use that strategy.
3050</t>
3051</section>
3052
3053<section title="Proxies and Caching" anchor="attack.proxies">
3054<t>
3055   By their very nature, HTTP proxies are men-in-the-middle, and
3056   represent an opportunity for man-in-the-middle attacks. Compromise of
3057   the systems on which the proxies run can result in serious security
3058   and privacy problems. Proxies have access to security-related
3059   information, personal information about individual users and
3060   organizations, and proprietary information belonging to users and
3061   content providers. A compromised proxy, or a proxy implemented or
3062   configured without regard to security and privacy considerations,
3063   might be used in the commission of a wide range of potential attacks.
3064</t>
3065<t>
3066   Proxy operators should protect the systems on which proxies run as
3067   they would protect any system that contains or transports sensitive
3068   information. In particular, log information gathered at proxies often
3069   contains highly sensitive personal information, and/or information
3070   about organizations. Log information should be carefully guarded, and
3071   appropriate guidelines for use developed and followed. (<xref target="abuse.of.server.log.information"/>).
3072</t>
3073<t>
3074   Proxy implementors should consider the privacy and security
3075   implications of their design and coding decisions, and of the
3076   configuration options they provide to proxy operators (especially the
3077   default configuration).
3078</t>
3079<t>
3080   Users of a proxy need to be aware that they are no trustworthier than
3081   the people who run the proxy; HTTP itself cannot solve this problem.
3082</t>
3083<t>
3084   The judicious use of cryptography, when appropriate, may suffice to
3085   protect against a broad range of security and privacy attacks. Such
3086   cryptography is beyond the scope of the HTTP/1.1 specification.
3087</t>
3088</section>
3089
3090<section title="Denial of Service Attacks on Proxies" anchor="attack.DoS">
3091<t>
3092   They exist. They are hard to defend against. Research continues.
3093   Beware.
3094</t>
3095</section>
3096</section>
3097
3098<section title="Acknowledgments" anchor="ack">
3099<t>
3100   HTTP has evolved considerably over the years. It has
3101   benefited from a large and active developer community--the many
3102   people who have participated on the www-talk mailing list--and it is
3103   that community which has been most responsible for the success of
3104   HTTP and of the World-Wide Web in general. Marc Andreessen, Robert
3105   Cailliau, Daniel W. Connolly, Bob Denny, John Franks, Jean-Francois
3106   Groff, Phillip M. Hallam-Baker, Hakon W. Lie, Ari Luotonen, Rob
3107   McCool, Lou Montulli, Dave Raggett, Tony Sanders, and Marc
3108   VanHeyningen deserve special recognition for their efforts in
3109   defining early aspects of the protocol.
3110</t>
3111<t>
3112   This document has benefited greatly from the comments of all those
3113   participating in the HTTP-WG. In addition to those already mentioned,
3114   the following individuals have contributed to this specification:
3115</t>
3116<t>
3117   Gary Adams, Harald Tveit Alvestrand, Keith Ball, Brian Behlendorf,
3118   Paul Burchard, Maurizio Codogno, Mike Cowlishaw, Roman Czyborra,
3119   Michael A. Dolan, Daniel DuBois, David J. Fiander, Alan Freier, Marc Hedlund, Greg Herlihy,
3120   Koen Holtman, Alex Hopmann, Bob Jernigan, Shel Kaphan, Rohit Khare,
3121   John Klensin, Martijn Koster, Alexei Kosut, David M. Kristol,
3122   Daniel LaLiberte, Ben Laurie, Paul J. Leach, Albert Lunde,
3123   John C. Mallery, Jean-Philippe Martin-Flatin, Mitra, David Morris,
3124   Gavin Nicol, Ross Patterson, Bill Perry, Jeffrey Perry, Scott Powers, Owen Rees,
3125   Luigi Rizzo, David Robinson, Marc Salomon, Rich Salz,
3126   Allan M. Schiffman, Jim Seidman, Chuck Shotton, Eric W. Sink,
3127   Simon E. Spero, Richard N. Taylor, Robert S. Thau,
3128   Bill (BearHeart) Weinman, Francois Yergeau, Mary Ellen Zurko,
3129   Josh Cohen.
3130</t>
3131<t>
3132   Thanks to the "cave men" of Palo Alto. You know who you are.
3133</t>
3134<t>
3135   Jim Gettys (the editor of <xref target="RFC2616"/>) wishes particularly
3136   to thank Roy Fielding, the editor of <xref target="RFC2068"/>, along
3137   with John Klensin, Jeff Mogul, Paul Leach, Dave Kristol, Koen
3138   Holtman, John Franks, Josh Cohen, Alex Hopmann, Scott Lawrence, and
3139   Larry Masinter for their help. And thanks go particularly to Jeff
3140   Mogul and Scott Lawrence for performing the "MUST/MAY/SHOULD" audit.
3141</t>
3142<t>
3143   The Apache Group, Anselm Baird-Smith, author of Jigsaw, and Henrik
3144   Frystyk implemented RFC 2068 early, and we wish to thank them for the
3145   discovery of many of the problems that this document attempts to
3146   rectify.
3147</t>
3148<t>
3149   This specification makes heavy use of the augmented BNF and generic
3150   constructs defined by David H. Crocker for <xref target="RFC5234"/>. Similarly, it
3151   reuses many of the definitions provided by Nathaniel Borenstein and
3152   Ned Freed for MIME <xref target="RFC2045"/>. We hope that their inclusion in this
3153   specification will help reduce past confusion over the relationship
3154   between HTTP and Internet mail message formats.
3155</t>
3156</section>
3157
3158</middle>
3159<back>
3160
3161<references title="Normative References">
3162
3163<reference anchor="ISO-8859-1">
3164  <front>
3165    <title>
3166     Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1
3167    </title>
3168    <author>
3169      <organization>International Organization for Standardization</organization>
3170    </author>
3171    <date year="1998"/>
3172  </front>
3173  <seriesInfo name="ISO/IEC" value="8859-1:1998"/>
3174</reference>
3175
3176<reference anchor="Part2">
3177  <front>
3178    <title abbrev="HTTP/1.1">HTTP/1.1, part 2: Message Semantics</title>
3179    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
3180      <organization abbrev="Day Software">Day Software</organization>
3181      <address><email>fielding@gbiv.com</email></address>
3182    </author>
3183    <author initials="J." surname="Gettys" fullname="Jim Gettys">
3184      <organization>One Laptop per Child</organization>
3185      <address><email>jg@laptop.org</email></address>
3186    </author>
3187    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
3188      <organization abbrev="HP">Hewlett-Packard Company</organization>
3189      <address><email>JeffMogul@acm.org</email></address>
3190    </author>
3191    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
3192      <organization abbrev="Microsoft">Microsoft Corporation</organization>
3193      <address><email>henrikn@microsoft.com</email></address>
3194    </author>
3195    <author initials="L." surname="Masinter" fullname="Larry Masinter">
3196      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
3197      <address><email>LMM@acm.org</email></address>
3198    </author>
3199    <author initials="P." surname="Leach" fullname="Paul J. Leach">
3200      <organization abbrev="Microsoft">Microsoft Corporation</organization>
3201      <address><email>paulle@microsoft.com</email></address>
3202    </author>
3203    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
3204      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
3205      <address><email>timbl@w3.org</email></address>
3206    </author>
3207    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
3208      <organization abbrev="W3C">World Wide Web Consortium</organization>
3209      <address><email>ylafon@w3.org</email></address>
3210    </author>
3211    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
3212      <organization abbrev="greenbytes">greenbytes GmbH</organization>
3213      <address><email>julian.reschke@greenbytes.de</email></address>
3214    </author>
3215    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
3216  </front>
3217  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-&ID-VERSION;"/>
3218  <x:source href="p2-semantics.xml" basename="p2-semantics"/>
3219</reference>
3220
3221<reference anchor="Part3">
3222  <front>
3223    <title abbrev="HTTP/1.1">HTTP/1.1, part 3: Message Payload and Content Negotiation</title>
3224    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
3225      <organization abbrev="Day Software">Day Software</organization>
3226      <address><email>fielding@gbiv.com</email></address>
3227    </author>
3228    <author initials="J." surname="Gettys" fullname="Jim Gettys">
3229      <organization>One Laptop per Child</organization>
3230      <address><email>jg@laptop.org</email></address>
3231    </author>
3232    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
3233      <organization abbrev="HP">Hewlett-Packard Company</organization>
3234      <address><email>JeffMogul@acm.org</email></address>
3235    </author>
3236    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
3237      <organization abbrev="Microsoft">Microsoft Corporation</organization>
3238      <address><email>henrikn@microsoft.com</email></address>
3239    </author>
3240    <author initials="L." surname="Masinter" fullname="Larry Masinter">
3241      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
3242      <address><email>LMM@acm.org</email></address>
3243    </author>
3244    <author initials="P." surname="Leach" fullname="Paul J. Leach">
3245      <organization abbrev="Microsoft">Microsoft Corporation</organization>
3246      <address><email>paulle@microsoft.com</email></address>
3247    </author>
3248    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
3249      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
3250      <address><email>timbl@w3.org</email></address>
3251    </author>
3252    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
3253      <organization abbrev="W3C">World Wide Web Consortium</organization>
3254      <address><email>ylafon@w3.org</email></address>
3255    </author>
3256    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
3257      <organization abbrev="greenbytes">greenbytes GmbH</organization>
3258      <address><email>julian.reschke@greenbytes.de</email></address>
3259    </author>
3260    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
3261  </front>
3262  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p3-payload-&ID-VERSION;"/>
3263  <x:source href="p3-payload.xml" basename="p3-payload"/>
3264</reference>
3265
3266<reference anchor="Part5">
3267  <front>
3268    <title abbrev="HTTP/1.1">HTTP/1.1, part 5: Range Requests and Partial Responses</title>
3269    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
3270      <organization abbrev="Day Software">Day Software</organization>
3271      <address><email>fielding@gbiv.com</email></address>
3272    </author>
3273    <author initials="J." surname="Gettys" fullname="Jim Gettys">
3274      <organization>One Laptop per Child</organization>
3275      <address><email>jg@laptop.org</email></address>
3276    </author>
3277    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
3278      <organization abbrev="HP">Hewlett-Packard Company</organization>
3279      <address><email>JeffMogul@acm.org</email></address>
3280    </author>
3281    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
3282      <organization abbrev="Microsoft">Microsoft Corporation</organization>
3283      <address><email>henrikn@microsoft.com</email></address>
3284    </author>
3285    <author initials="L." surname="Masinter" fullname="Larry Masinter">
3286      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
3287      <address><email>LMM@acm.org</email></address>
3288    </author>
3289    <author initials="P." surname="Leach" fullname="Paul J. Leach">
3290      <organization abbrev="Microsoft">Microsoft Corporation</organization>
3291      <address><email>paulle@microsoft.com</email></address>
3292    </author>
3293    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
3294      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
3295      <address><email>timbl@w3.org</email></address>
3296    </author>
3297    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
3298      <organization abbrev="W3C">World Wide Web Consortium</organization>
3299      <address><email>ylafon@w3.org</email></address>
3300    </author>
3301    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
3302      <organization abbrev="greenbytes">greenbytes GmbH</organization>
3303      <address><email>julian.reschke@greenbytes.de</email></address>
3304    </author>
3305    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
3306  </front>
3307  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-&ID-VERSION;"/>
3308  <x:source href="p5-range.xml" basename="p5-range"/>
3309</reference>
3310
3311<reference anchor="Part6">
3312  <front>
3313    <title abbrev="HTTP/1.1">HTTP/1.1, part 6: Caching</title>
3314    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
3315      <organization abbrev="Day Software">Day Software</organization>
3316      <address><email>fielding@gbiv.com</email></address>
3317    </author>
3318    <author initials="J." surname="Gettys" fullname="Jim Gettys">
3319      <organization>One Laptop per Child</organization>
3320      <address><email>jg@laptop.org</email></address>
3321    </author>
3322    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
3323      <organization abbrev="HP">Hewlett-Packard Company</organization>
3324      <address><email>JeffMogul@acm.org</email></address>
3325    </author>
3326    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
3327      <organization abbrev="Microsoft">Microsoft Corporation</organization>
3328      <address><email>henrikn@microsoft.com</email></address>
3329    </author>
3330    <author initials="L." surname="Masinter" fullname="Larry Masinter">
3331      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
3332      <address><email>LMM@acm.org</email></address>
3333    </author>
3334    <author initials="P." surname="Leach" fullname="Paul J. Leach">
3335      <organization abbrev="Microsoft">Microsoft Corporation</organization>
3336      <address><email>paulle@microsoft.com</email></address>
3337    </author>
3338    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
3339      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
3340      <address><email>timbl@w3.org</email></address>
3341    </author>
3342    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
3343      <organization abbrev="W3C">World Wide Web Consortium</organization>
3344      <address><email>ylafon@w3.org</email></address>
3345    </author>
3346    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
3347      <organization abbrev="greenbytes">greenbytes GmbH</organization>
3348      <address><email>julian.reschke@greenbytes.de</email></address>
3349    </author>
3350    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
3351  </front>
3352  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-&ID-VERSION;"/>
3353  <x:source href="p6-cache.xml" basename="p6-cache"/>
3354</reference>
3355
3356<reference anchor="RFC5234">
3357  <front>
3358    <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
3359    <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
3360      <organization>Brandenburg InternetWorking</organization>
3361      <address>
3362      <postal>
3363      <street>675 Spruce Dr.</street>
3364      <city>Sunnyvale</city>
3365      <region>CA</region>
3366      <code>94086</code>
3367      <country>US</country></postal>
3368      <phone>+1.408.246.8253</phone>
3369      <email>dcrocker@bbiw.net</email></address> 
3370    </author>
3371    <author initials="P." surname="Overell" fullname="Paul Overell">
3372      <organization>THUS plc.</organization>
3373      <address>
3374      <postal>
3375      <street>1/2 Berkeley Square</street>
3376      <street>99 Berkely Street</street>
3377      <city>Glasgow</city>
3378      <code>G3 7HR</code>
3379      <country>UK</country></postal>
3380      <email>paul.overell@thus.net</email></address>
3381    </author>
3382    <date month="January" year="2008"/>
3383  </front>
3384  <seriesInfo name="STD" value="68"/>
3385  <seriesInfo name="RFC" value="5234"/>
3386</reference>
3387
3388<reference anchor="RFC2119">
3389  <front>
3390    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
3391    <author initials="S." surname="Bradner" fullname="Scott Bradner">
3392      <organization>Harvard University</organization>
3393      <address><email>sob@harvard.edu</email></address>
3394    </author>
3395    <date month="March" year="1997"/>
3396  </front>
3397  <seriesInfo name="BCP" value="14"/>
3398  <seriesInfo name="RFC" value="2119"/>
3399</reference>
3400
3401<reference anchor="RFC3986">
3402 <front>
3403  <title abbrev='URI Generic Syntax'>Uniform Resource Identifier (URI): Generic Syntax</title>
3404  <author initials='T.' surname='Berners-Lee' fullname='Tim Berners-Lee'>
3405    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
3406    <address>
3407       <email>timbl@w3.org</email>
3408       <uri>http://www.w3.org/People/Berners-Lee/</uri>
3409    </address>
3410  </author>
3411  <author initials='R.' surname='Fielding' fullname='Roy T. Fielding'>
3412    <organization abbrev="Day Software">Day Software</organization>
3413    <address>
3414      <email>fielding@gbiv.com</email>
3415      <uri>http://roy.gbiv.com/</uri>
3416    </address>
3417  </author>
3418  <author initials='L.' surname='Masinter' fullname='Larry Masinter'>
3419    <organization abbrev="Adobe Systems">Adobe Systems Incorporated</organization>
3420    <address>
3421      <email>LMM@acm.org</email>
3422      <uri>http://larry.masinter.net/</uri>
3423    </address>
3424  </author>
3425  <date month='January' year='2005'></date>
3426 </front>
3427 <seriesInfo name="RFC" value="3986"/>
3428 <seriesInfo name="STD" value="66"/>
3429</reference>
3430
3431<reference anchor="USASCII">
3432  <front>
3433    <title>Coded Character Set -- 7-bit American Standard Code for Information Interchange</title>
3434    <author>
3435      <organization>American National Standards Institute</organization>
3436    </author>
3437    <date year="1986"/>
3438  </front>
3439  <seriesInfo name="ANSI" value="X3.4"/>
3440</reference>
3441
3442</references>
3443
3444<references title="Informative References">
3445
3446<reference anchor="Nie1997" target="http://doi.acm.org/10.1145/263105.263157">
3447  <front>
3448    <title>Network Performance Effects of HTTP/1.1, CSS1, and PNG</title>
3449    <author initials="H.F.." surname="Nielsen" fullname="H.F. Nielsen">
3450      <organization/>
3451    </author>
3452    <author initials="J." surname="Gettys" fullname="J. Gettys">
3453      <organization/>
3454    </author>
3455    <author initials="E." surname="Prud'hommeaux" fullname="E. Prud'hommeaux">
3456      <organization/>
3457    </author>
3458    <author initials="H." surname="Lie" fullname="H. Lie">
3459      <organization/>
3460    </author>
3461    <author initials="C." surname="Lilley" fullname="C. Lilley">
3462      <organization/>
3463    </author>
3464    <date year="1997" month="September"/>
3465  </front>
3466  <seriesInfo name="ACM" value="Proceedings of the ACM SIGCOMM '97 conference on Applications, technologies, architectures, and protocols for computer communication SIGCOMM '97"/>
3467</reference>
3468
3469<reference anchor="Pad1995" target="http://portal.acm.org/citation.cfm?id=219094">
3470  <front>
3471    <title>Improving HTTP Latency</title>
3472    <author initials="V.N." surname="Padmanabhan" fullname="Venkata N. Padmanabhan">
3473      <organization/>
3474    </author>
3475    <author initials="J.C." surname="Mogul" fullname="Jeffrey C. Mogul">
3476      <organization/>
3477    </author>
3478    <date year="1995" month="December"/>
3479  </front>
3480  <seriesInfo name="Computer Networks and ISDN Systems" value="v. 28, pp. 25-35"/>
3481</reference>
3482
3483<reference anchor="RFC959">
3484  <front>
3485    <title abbrev="File Transfer Protocol">File Transfer Protocol</title>
3486    <author initials="J." surname="Postel" fullname="J. Postel">
3487      <organization>Information Sciences Institute (ISI)</organization>
3488    </author>
3489    <author initials="J." surname="Reynolds" fullname="J. Reynolds">
3490      <organization/>
3491    </author>
3492    <date month="October" year="1985"/>
3493  </front>
3494  <seriesInfo name="STD" value="9"/>
3495  <seriesInfo name="RFC" value="959"/>
3496</reference>
3497
3498<reference anchor="RFC1123">
3499  <front>
3500    <title>Requirements for Internet Hosts - Application and Support</title>
3501    <author initials="R." surname="Braden" fullname="Robert Braden">
3502      <organization>University of Southern California (USC), Information Sciences Institute</organization>
3503      <address><email>Braden@ISI.EDU</email></address>
3504    </author>
3505    <date month="October" year="1989"/>
3506  </front>
3507  <seriesInfo name="STD" value="3"/>
3508  <seriesInfo name="RFC" value="1123"/>
3509</reference>
3510
3511<reference anchor="RFC1305">
3512  <front>
3513    <title>Network Time Protocol (Version 3) Specification, Implementation</title>
3514    <author initials="D." surname="Mills" fullname="David L. Mills">
3515      <organization>University of Delaware, Electrical Engineering Department</organization>
3516      <address><email>mills@udel.edu</email></address>
3517    </author>
3518    <date month="March" year="1992"/>
3519  </front>
3520  <seriesInfo name="RFC" value="1305"/>
3521</reference>
3522
3523<reference anchor="RFC1436">
3524  <front>
3525    <title abbrev="Gopher">The Internet Gopher Protocol (a distributed document search and retrieval protocol)</title>
3526    <author initials="F." surname="Anklesaria" fullname="Farhad Anklesaria">
3527      <organization>University of Minnesota, Computer and Information Services</organization>
3528      <address><email>fxa@boombox.micro.umn.edu</email></address>
3529    </author>
3530    <author initials="M." surname="McCahill" fullname="Mark McCahill">
3531      <organization>University of Minnesota, Computer and Information Services</organization>
3532      <address><email>mpm@boombox.micro.umn.edu</email></address>
3533    </author>
3534    <author initials="P." surname="Lindner" fullname="Paul Lindner">
3535      <organization>University of Minnesota, Computer and Information Services</organization>
3536      <address><email>lindner@boombox.micro.umn.edu</email></address>
3537    </author>
3538    <author initials="D." surname="Johnson" fullname="David Johnson">
3539      <organization>University of Minnesota, Computer and Information Services</organization>
3540      <address><email>dmj@boombox.micro.umn.edu</email></address>
3541    </author>
3542    <author initials="D." surname="Torrey" fullname="Daniel Torrey">
3543      <organization>University of Minnesota, Computer and Information Services</organization>
3544      <address><email>daniel@boombox.micro.umn.edu</email></address>
3545    </author>
3546    <author initials="B." surname="Alberti" fullname="Bob Alberti">
3547      <organization>University of Minnesota, Computer and Information Services</organization>
3548      <address><email>alberti@boombox.micro.umn.edu</email></address>
3549    </author>
3550    <date month="March" year="1993"/>
3551  </front>
3552  <seriesInfo name="RFC" value="1436"/>
3553</reference>
3554
3555<reference anchor="RFC1900">
3556  <front>
3557    <title>Renumbering Needs Work</title>
3558    <author initials="B." surname="Carpenter" fullname="Brian E. Carpenter">
3559      <organization>CERN, Computing and Networks Division</organization>
3560      <address><email>brian@dxcoms.cern.ch</email></address>
3561    </author>
3562    <author initials="Y." surname="Rekhter" fullname="Yakov Rekhter">
3563      <organization>cisco Systems</organization>
3564      <address><email>yakov@cisco.com</email></address>
3565    </author>
3566    <date month="February" year="1996"/>
3567  </front>
3568  <seriesInfo name="RFC" value="1900"/>
3569</reference>
3570
3571<reference anchor="RFC1945">
3572  <front>
3573    <title abbrev="HTTP/1.0">Hypertext Transfer Protocol -- HTTP/1.0</title>
3574    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
3575      <organization>MIT, Laboratory for Computer Science</organization>
3576      <address><email>timbl@w3.org</email></address>
3577    </author>
3578    <author initials="R.T." surname="Fielding" fullname="Roy T. Fielding">
3579      <organization>University of California, Irvine, Department of Information and Computer Science</organization>
3580      <address><email>fielding@ics.uci.edu</email></address>
3581    </author>
3582    <author initials="H.F." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
3583      <organization>W3 Consortium, MIT Laboratory for Computer Science</organization>
3584      <address><email>frystyk@w3.org</email></address>
3585    </author>
3586    <date month="May" year="1996"/>
3587  </front>
3588  <seriesInfo name="RFC" value="1945"/>
3589</reference>
3590
3591<reference anchor="RFC2045">
3592  <front>
3593    <title abbrev="Internet Message Bodies">Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</title>
3594    <author initials="N." surname="Freed" fullname="Ned Freed">
3595      <organization>Innosoft International, Inc.</organization>
3596      <address><email>ned@innosoft.com</email></address>
3597    </author>
3598    <author initials="N.S." surname="Borenstein" fullname="Nathaniel S. Borenstein">
3599      <organization>First Virtual Holdings</organization>
3600      <address><email>nsb@nsb.fv.com</email></address>
3601    </author>
3602    <date month="November" year="1996"/>
3603  </front>
3604  <seriesInfo name="RFC" value="2045"/>
3605</reference>
3606
3607<reference anchor="RFC2047">
3608  <front>
3609    <title abbrev="Message Header Extensions">MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text</title>
3610    <author initials="K." surname="Moore" fullname="Keith Moore">
3611      <organization>University of Tennessee</organization>
3612      <address><email>moore@cs.utk.edu</email></address>
3613    </author>
3614    <date month="November" year="1996"/>
3615  </front>
3616  <seriesInfo name="RFC" value="2047"/>
3617</reference>
3618
3619<reference anchor="RFC2068">
3620  <front>
3621    <title abbrev="HTTP/1.1">Hypertext Transfer Protocol -- HTTP/1.1</title>
3622    <author initials="R." surname="Fielding" fullname="Roy T. Fielding">
3623      <organization>University of California, Irvine, Department of Information and Computer Science</organization>
3624      <address><email>fielding@ics.uci.edu</email></address>
3625    </author>
3626    <author initials="J." surname="Gettys" fullname="Jim Gettys">
3627      <organization>MIT Laboratory for Computer Science</organization>
3628      <address><email>jg@w3.org</email></address>
3629    </author>
3630    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
3631      <organization>Digital Equipment Corporation, Western Research Laboratory</organization>
3632      <address><email>mogul@wrl.dec.com</email></address>
3633    </author>
3634    <author initials="H." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
3635      <organization>MIT Laboratory for Computer Science</organization>
3636      <address><email>frystyk@w3.org</email></address>
3637    </author>
3638    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
3639      <organization>MIT Laboratory for Computer Science</organization>
3640      <address><email>timbl@w3.org</email></address>
3641    </author>
3642    <date month="January" year="1997"/>
3643  </front>
3644  <seriesInfo name="RFC" value="2068"/>
3645</reference>
3646
3647<reference anchor='RFC2109'>
3648  <front>
3649    <title>HTTP State Management Mechanism</title>
3650    <author initials='D.M.' surname='Kristol' fullname='David M. Kristol'>
3651      <organization>Bell Laboratories, Lucent Technologies</organization>
3652      <address><email>dmk@bell-labs.com</email></address>
3653    </author>
3654    <author initials='L.' surname='Montulli' fullname='Lou Montulli'>
3655      <organization>Netscape Communications Corp.</organization>
3656      <address><email>montulli@netscape.com</email></address>
3657    </author>
3658    <date year='1997' month='February' />
3659  </front>
3660  <seriesInfo name='RFC' value='2109' />
3661</reference>
3662
3663<reference anchor="RFC2145">
3664  <front>
3665    <title abbrev="HTTP Version Numbers">Use and Interpretation of HTTP Version Numbers</title>
3666    <author initials="J.C." surname="Mogul" fullname="Jeffrey C. Mogul">
3667      <organization>Western Research Laboratory</organization>
3668      <address><email>mogul@wrl.dec.com</email></address>
3669    </author>
3670    <author initials="R.T." surname="Fielding" fullname="Roy T. Fielding">
3671      <organization>Department of Information and Computer Science</organization>
3672      <address><email>fielding@ics.uci.edu</email></address>
3673    </author>
3674    <author initials="J." surname="Gettys" fullname="Jim Gettys">
3675      <organization>MIT Laboratory for Computer Science</organization>
3676      <address><email>jg@w3.org</email></address>
3677    </author>
3678    <author initials="H.F." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
3679      <organization>W3 Consortium</organization>
3680      <address><email>frystyk@w3.org</email></address>
3681    </author>
3682    <date month="May" year="1997"/>
3683  </front>
3684  <seriesInfo name="RFC" value="2145"/>
3685</reference>
3686
3687<reference anchor="RFC2616">
3688  <front>
3689    <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
3690    <author initials="R." surname="Fielding" fullname="R. Fielding">
3691      <organization>University of California, Irvine</organization>
3692      <address><email>fielding@ics.uci.edu</email></address>
3693    </author>
3694    <author initials="J." surname="Gettys" fullname="J. Gettys">
3695      <organization>W3C</organization>
3696      <address><email>jg@w3.org</email></address>
3697    </author>
3698    <author initials="J." surname="Mogul" fullname="J. Mogul">
3699      <organization>Compaq Computer Corporation</organization>
3700      <address><email>mogul@wrl.dec.com</email></address>
3701    </author>
3702    <author initials="H." surname="Frystyk" fullname="H. Frystyk">
3703      <organization>MIT Laboratory for Computer Science</organization>
3704      <address><email>frystyk@w3.org</email></address>
3705    </author>
3706    <author initials="L." surname="Masinter" fullname="L. Masinter">
3707      <organization>Xerox Corporation</organization>
3708      <address><email>masinter@parc.xerox.com</email></address>
3709    </author>
3710    <author initials="P." surname="Leach" fullname="P. Leach">
3711      <organization>Microsoft Corporation</organization>
3712      <address><email>paulle@microsoft.com</email></address>
3713    </author>
3714    <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
3715      <organization>W3C</organization>
3716      <address><email>timbl@w3.org</email></address>
3717    </author>
3718    <date month="June" year="1999"/>
3719  </front>
3720  <seriesInfo name="RFC" value="2616"/>
3721</reference>
3722
3723<reference anchor='RFC2818'>
3724  <front>
3725    <title>HTTP Over TLS</title>
3726    <author initials='E.' surname='Rescorla' fullname='Eric Rescorla'>
3727      <organization>RTFM, Inc.</organization>
3728      <address><email>ekr@rtfm.com</email></address>
3729    </author>
3730    <date year='2000' month='May' />
3731  </front>
3732  <seriesInfo name='RFC' value='2818' />
3733</reference>
3734
3735<reference anchor='RFC2965'>
3736  <front>
3737    <title>HTTP State Management Mechanism</title>
3738    <author initials='D. M.' surname='Kristol' fullname='David M. Kristol'>
3739      <organization>Bell Laboratories, Lucent Technologies</organization>
3740      <address><email>dmk@bell-labs.com</email></address>
3741    </author>
3742    <author initials='L.' surname='Montulli' fullname='Lou Montulli'>
3743      <organization>Epinions.com, Inc.</organization>
3744      <address><email>lou@montulli.org</email></address>
3745    </author>
3746    <date year='2000' month='October' />
3747  </front>
3748  <seriesInfo name='RFC' value='2965' />
3749</reference>
3750
3751<reference anchor='RFC3864'>
3752  <front>
3753    <title>Registration Procedures for Message Header Fields</title>
3754    <author initials='G.' surname='Klyne' fullname='G. Klyne'>
3755      <organization>Nine by Nine</organization>
3756      <address><email>GK-IETF@ninebynine.org</email></address>
3757    </author>
3758    <author initials='M.' surname='Nottingham' fullname='M. Nottingham'>
3759      <organization>BEA Systems</organization>
3760      <address><email>mnot@pobox.com</email></address>
3761    </author>
3762    <author initials='J.' surname='Mogul' fullname='J. Mogul'>
3763      <organization>HP Labs</organization>
3764      <address><email>JeffMogul@acm.org</email></address>
3765    </author>
3766    <date year='2004' month='September' />
3767  </front>
3768  <seriesInfo name='BCP' value='90' />
3769  <seriesInfo name='RFC' value='3864' />
3770</reference>
3771
3772<reference anchor='RFC3977'>
3773  <front>
3774    <title>Network News Transfer Protocol (NNTP)</title>
3775    <author initials='C.' surname='Feather' fullname='C. Feather'>
3776      <organization>THUS plc</organization>
3777      <address><email>clive@demon.net</email></address>
3778    </author>
3779    <date year='2006' month='October' />
3780  </front>
3781  <seriesInfo name="RFC" value="3977"/>
3782</reference>
3783
3784<reference anchor="RFC4288">
3785  <front>
3786    <title>Media Type Specifications and Registration Procedures</title>
3787    <author initials="N." surname="Freed" fullname="N. Freed">
3788      <organization>Sun Microsystems</organization>
3789      <address>
3790        <email>ned.freed@mrochek.com</email>
3791      </address>
3792    </author>
3793    <author initials="J." surname="Klensin" fullname="J. Klensin">
3794      <organization/>
3795      <address>
3796        <email>klensin+ietf@jck.com</email>
3797      </address>
3798    </author>
3799    <date year="2005" month="December"/>
3800  </front>
3801  <seriesInfo name="BCP" value="13"/>
3802  <seriesInfo name="RFC" value="4288"/>
3803</reference>
3804
3805<reference anchor='RFC4395'>
3806  <front>
3807    <title>Guidelines and Registration Procedures for New URI Schemes</title>
3808    <author initials='T.' surname='Hansen' fullname='T. Hansen'>
3809      <organization>AT&amp;T Laboratories</organization>
3810      <address>
3811        <email>tony+urireg@maillennium.att.com</email>
3812      </address>
3813    </author>
3814    <author initials='T.' surname='Hardie' fullname='T. Hardie'>
3815      <organization>Qualcomm, Inc.</organization>
3816      <address>
3817        <email>hardie@qualcomm.com</email>
3818      </address>
3819    </author>
3820    <author initials='L.' surname='Masinter' fullname='L. Masinter'>
3821      <organization>Adobe Systems</organization>
3822      <address>
3823        <email>LMM@acm.org</email>
3824      </address>
3825    </author>
3826    <date year='2006' month='February' />
3827  </front>
3828  <seriesInfo name='BCP' value='115' />
3829  <seriesInfo name='RFC' value='4395' />
3830</reference>
3831
3832<reference anchor="RFC5322">
3833  <front>
3834    <title>Internet Message Format</title>
3835    <author initials="P." surname="Resnick" fullname="P. Resnick">
3836      <organization>Qualcomm Incorporated</organization>
3837    </author>
3838    <date year="2008" month="October"/>
3839  </front> 
3840  <seriesInfo name="RFC" value="5322"/>
3841</reference>
3842
3843<reference anchor="Kri2001" target="http://arxiv.org/abs/cs.SE/0105018">
3844  <front>
3845    <title>HTTP Cookies: Standards, Privacy, and Politics</title>
3846    <author initials="D." surname="Kristol" fullname="David M. Kristol">
3847      <organization/>
3848    </author>
3849    <date year="2001" month="November"/>
3850  </front>
3851  <seriesInfo name="ACM Transactions on Internet Technology" value="Vol. 1, #2"/>
3852</reference>
3853
3854<reference anchor="Spe" target="http://sunsite.unc.edu/mdma-release/http-prob.html">
3855  <front>
3856  <title>Analysis of HTTP Performance Problems</title>
3857  <author initials="S." surname="Spero" fullname="Simon E. Spero">
3858    <organization/>
3859  </author>
3860  <date/>
3861  </front>
3862</reference>
3863
3864<reference anchor="Tou1998" target="http://www.isi.edu/touch/pubs/http-perf96/">
3865  <front>
3866  <title>Analysis of HTTP Performance</title>
3867  <author initials="J." surname="Touch" fullname="Joe Touch">
3868    <organization>USC/Information Sciences Institute</organization>
3869    <address><email>touch@isi.edu</email></address>
3870  </author>
3871  <author initials="J." surname="Heidemann" fullname="John Heidemann">
3872    <organization>USC/Information Sciences Institute</organization>
3873    <address><email>johnh@isi.edu</email></address>
3874  </author>
3875  <author initials="K." surname="Obraczka" fullname="Katia Obraczka">
3876    <organization>USC/Information Sciences Institute</organization>
3877    <address><email>katia@isi.edu</email></address>
3878  </author>
3879  <date year="1998" month="Aug"/>
3880  </front>
3881  <seriesInfo name="ISI Research Report" value="ISI/RR-98-463"/>
3882  <annotation>(original report dated Aug. 1996)</annotation>
3883</reference>
3884
3885<reference anchor="WAIS">
3886  <front>
3887    <title>WAIS Interface Protocol Prototype Functional Specification (v1.5)</title>
3888    <author initials="F." surname="Davis" fullname="F. Davis">
3889      <organization>Thinking Machines Corporation</organization>
3890    </author>
3891    <author initials="B." surname="Kahle" fullname="B. Kahle">
3892      <organization>Thinking Machines Corporation</organization>
3893    </author>
3894    <author initials="H." surname="Morris" fullname="H. Morris">
3895      <organization>Thinking Machines Corporation</organization>
3896    </author>
3897    <author initials="J." surname="Salem" fullname="J. Salem">
3898      <organization>Thinking Machines Corporation</organization>
3899    </author>
3900    <author initials="T." surname="Shen" fullname="T. Shen">
3901      <organization>Thinking Machines Corporation</organization>
3902    </author>
3903    <author initials="R." surname="Wang" fullname="R. Wang">
3904      <organization>Thinking Machines Corporation</organization>
3905    </author>
3906    <author initials="J." surname="Sui" fullname="J. Sui">
3907      <organization>Thinking Machines Corporation</organization>
3908    </author>
3909    <author initials="M." surname="Grinbaum" fullname="M. Grinbaum">
3910      <organization>Thinking Machines Corporation</organization>
3911    </author>
3912    <date month="April" year="1990"/>
3913  </front>
3914  <seriesInfo name="Thinking Machines Corporation" value=""/>
3915</reference>
3916
3917</references>
3918
3919
3920<section title="Tolerant Applications" anchor="tolerant.applications">
3921<t>
3922   Although this document specifies the requirements for the generation
3923   of HTTP/1.1 messages, not all applications will be correct in their
3924   implementation. We therefore recommend that operational applications
3925   be tolerant of deviations whenever those deviations can be
3926   interpreted unambiguously.
3927</t>
3928<t>
3929   Clients &SHOULD; be tolerant in parsing the Status-Line and servers
3930   tolerant when parsing the Request-Line. In particular, they &SHOULD;
3931   accept any amount of WSP characters between fields, even though
3932   only a single SP is required.
3933</t>
3934<t>
3935   The line terminator for message-header fields is the sequence CRLF.
3936   However, we recommend that applications, when parsing such headers,
3937   recognize a single LF as a line terminator and ignore the leading CR.
3938</t>
3939<t>
3940   The character set of an entity-body &SHOULD; be labeled as the lowest
3941   common denominator of the character codes used within that body, with
3942   the exception that not labeling the entity is preferred over labeling
3943   the entity with the labels US-ASCII or ISO-8859-1. See &payload;.
3944</t>
3945<t>
3946   Additional rules for requirements on parsing and encoding of dates
3947   and other potential problems with date encodings include:
3948</t>
3949<t>
3950  <list style="symbols">
3951     <t>HTTP/1.1 clients and caches &SHOULD; assume that an RFC-850 date
3952        which appears to be more than 50 years in the future is in fact
3953        in the past (this helps solve the "year 2000" problem).</t>
3954
3955     <t>An HTTP/1.1 implementation &MAY; internally represent a parsed
3956        Expires date as earlier than the proper value, but &MUST-NOT;
3957        internally represent a parsed Expires date as later than the
3958        proper value.</t>
3959
3960     <t>All expiration-related calculations &MUST; be done in GMT. The
3961        local time zone &MUST-NOT; influence the calculation or comparison
3962        of an age or expiration time.</t>
3963
3964     <t>If an HTTP header incorrectly carries a date value with a time
3965        zone other than GMT, it &MUST; be converted into GMT using the
3966        most conservative possible conversion.</t>
3967  </list>
3968</t>
3969</section>
3970
3971<section title="Compatibility with Previous Versions" anchor="compatibility">
3972<t>
3973   HTTP has been in use by the World-Wide Web global information initiative
3974   since 1990. The first version of HTTP, later referred to as HTTP/0.9,
3975   was a simple protocol for hypertext data transfer across the Internet
3976   with only a single method and no metadata.
3977   HTTP/1.0, as defined by <xref target="RFC1945"/>, added a range of request
3978   methods and MIME-like messaging that could include metadata about the data
3979   transferred and modifiers on the request/response semantics. However,
3980   HTTP/1.0 did not sufficiently take into consideration the effects of
3981   hierarchical proxies, caching, the need for persistent connections, or
3982   name-based virtual hosts. The proliferation of incompletely-implemented
3983   applications calling themselves "HTTP/1.0" further necessitated a
3984   protocol version change in order for two communicating applications
3985   to determine each other's true capabilities.
3986</t>
3987<t>
3988   HTTP/1.1 remains compatible with HTTP/1.0 by including more stringent
3989   requirements that enable reliable implementations, adding only
3990   those new features that will either be safely ignored by an HTTP/1.0
3991   recipient or only sent when communicating with a party advertising
3992   compliance with HTTP/1.1.
3993</t>
3994<t>
3995   It is beyond the scope of a protocol specification to mandate
3996   compliance with previous versions. HTTP/1.1 was deliberately
3997   designed, however, to make supporting previous versions easy. It is
3998   worth noting that, at the time of composing this specification
3999   (1996), we would expect commercial HTTP/1.1 servers to:
4000  <list style="symbols">
4001     <t>recognize the format of the Request-Line for HTTP/0.9, 1.0, and
4002        1.1 requests;</t>
4003
4004     <t>understand any valid request in the format of HTTP/0.9, 1.0, or
4005        1.1;</t>
4006
4007     <t>respond appropriately with a message in the same major version
4008        used by the client.</t>
4009  </list>
4010</t>
4011<t>
4012   And we would expect HTTP/1.1 clients to:
4013  <list style="symbols">
4014     <t>recognize the format of the Status-Line for HTTP/1.0 and 1.1
4015        responses;</t>
4016
4017     <t>understand any valid response in the format of HTTP/0.9, 1.0, or
4018        1.1.</t>
4019  </list>
4020</t>
4021<t>
4022   For most implementations of HTTP/1.0, each connection is established
4023   by the client prior to the request and closed by the server after
4024   sending the response. Some implementations implement the Keep-Alive
4025   version of persistent connections described in <xref x:sec="19.7.1" x:fmt="of" target="RFC2068"/>.
4026</t>
4027
4028<section title="Changes from HTTP/1.0" anchor="changes.from.1.0">
4029<t>
4030   This section summarizes major differences between versions HTTP/1.0
4031   and HTTP/1.1.
4032</t>
4033
4034<section title="Changes to Simplify Multi-homed Web Servers and Conserve IP Addresses" anchor="changes.to.simplify.multi-homed.web.servers.and.conserve.ip.addresses">
4035<t>
4036   The requirements that clients and servers support the Host request-header,
4037   report an error if the Host request-header (<xref target="header.host"/>) is
4038   missing from an HTTP/1.1 request, and accept absolute URIs (<xref target="request-target"/>)
4039   are among the most important changes defined by this
4040   specification.
4041</t>
4042<t>
4043   Older HTTP/1.0 clients assumed a one-to-one relationship of IP
4044   addresses and servers; there was no other established mechanism for
4045   distinguishing the intended server of a request than the IP address
4046   to which that request was directed. The changes outlined above will
4047   allow the Internet, once older HTTP clients are no longer common, to
4048   support multiple Web sites from a single IP address, greatly
4049   simplifying large operational Web servers, where allocation of many
4050   IP addresses to a single host has created serious problems. The
4051   Internet will also be able to recover the IP addresses that have been
4052   allocated for the sole purpose of allowing special-purpose domain
4053   names to be used in root-level HTTP URLs. Given the rate of growth of
4054   the Web, and the number of servers already deployed, it is extremely
4055   important that all implementations of HTTP (including updates to
4056   existing HTTP/1.0 applications) correctly implement these
4057   requirements:
4058  <list style="symbols">
4059     <t>Both clients and servers &MUST; support the Host request-header.</t>
4060
4061     <t>A client that sends an HTTP/1.1 request &MUST; send a Host header.</t>
4062
4063     <t>Servers &MUST; report a 400 (Bad Request) error if an HTTP/1.1
4064        request does not include a Host request-header.</t>
4065
4066     <t>Servers &MUST; accept absolute URIs.</t>
4067  </list>
4068</t>
4069</section>
4070</section>
4071
4072<section title="Compatibility with HTTP/1.0 Persistent Connections" anchor="compatibility.with.http.1.0.persistent.connections">
4073<t>
4074   Some clients and servers might wish to be compatible with some
4075   previous implementations of persistent connections in HTTP/1.0
4076   clients and servers. Persistent connections in HTTP/1.0 are
4077   explicitly negotiated as they are not the default behavior. HTTP/1.0
4078   experimental implementations of persistent connections are faulty,
4079   and the new facilities in HTTP/1.1 are designed to rectify these
4080   problems. The problem was that some existing 1.0 clients may be
4081   sending Keep-Alive to a proxy server that doesn't understand
4082   Connection, which would then erroneously forward it to the next
4083   inbound server, which would establish the Keep-Alive connection and
4084   result in a hung HTTP/1.0 proxy waiting for the close on the
4085   response. The result is that HTTP/1.0 clients must be prevented from
4086   using Keep-Alive when talking to proxies.
4087</t>
4088<t>
4089   However, talking to proxies is the most important use of persistent
4090   connections, so that prohibition is clearly unacceptable. Therefore,
4091   we need some other mechanism for indicating a persistent connection
4092   is desired, which is safe to use even when talking to an old proxy
4093   that ignores Connection. Persistent connections are the default for
4094   HTTP/1.1 messages; we introduce a new keyword (Connection: close) for
4095   declaring non-persistence. See <xref target="header.connection"/>.
4096</t>
4097<t>
4098   The original HTTP/1.0 form of persistent connections (the Connection:
4099   Keep-Alive and Keep-Alive header) is documented in <xref target="RFC2068"/>.
4100</t>
4101</section>
4102
4103<section title="Changes from RFC 2068" anchor="changes.from.rfc.2068">
4104<t>
4105   This specification has been carefully audited to correct and
4106   disambiguate key word usage; RFC 2068 had many problems in respect to
4107   the conventions laid out in <xref target="RFC2119"/>.
4108</t>
4109<t>
4110   Transfer-coding and message lengths all interact in ways that
4111   required fixing exactly when chunked encoding is used (to allow for
4112   transfer encoding that may not be self delimiting); it was important
4113   to straighten out exactly how message lengths are computed. (Sections
4114   <xref target="transfer.codings" format="counter"/>, <xref target="message.length" format="counter"/>,
4115   <xref target="header.content-length" format="counter"/>,
4116   see also <xref target="Part3"/>, <xref target="Part5"/> and <xref target="Part6"/>)
4117</t>
4118<t>
4119   The use and interpretation of HTTP version numbers has been clarified
4120   by <xref target="RFC2145"/>. Require proxies to upgrade requests to highest protocol
4121   version they support to deal with problems discovered in HTTP/1.0
4122   implementations (<xref target="http.version"/>)
4123</t>
4124<t>
4125   Quality Values of zero should indicate that "I don't want something"
4126   to allow clients to refuse a representation. (<xref target="quality.values"/>)
4127</t>
4128<t>
4129   Transfer-coding had significant problems, particularly with
4130   interactions with chunked encoding. The solution is that transfer-codings
4131   become as full fledged as content-codings. This involves
4132   adding an IANA registry for transfer-codings (separate from content
4133   codings), a new header field (TE) and enabling trailer headers in the
4134   future. Transfer encoding is a major performance benefit, so it was
4135   worth fixing <xref target="Nie1997"/>. TE also solves another, obscure, downward
4136   interoperability problem that could have occurred due to interactions
4137   between authentication trailers, chunked encoding and HTTP/1.0
4138   clients.(Section <xref target="transfer.codings" format="counter"/>, <xref target="chunked.transfer.encoding" format="counter"/>,
4139   and <xref target="header.te" format="counter"/>)
4140</t>
4141</section>
4142
4143<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
4144<t>
4145  Empty list elements in list productions have been deprecated.
4146  (<xref target="notation.abnf"/>)
4147</t>
4148<t>
4149  Rules about implicit linear whitespace between certain grammar productions
4150  have been removed; now it's only allowed when specifically pointed out
4151  in the ABNF. The NUL character is no longer allowed in comment and quoted-string
4152  text. The quoted-pair rule no longer allows escaping NUL, CR or LF.
4153  Non-ASCII content in header fields and reason phrase has been obsoleted and
4154  made opaque (the TEXT rule was removed)
4155  (<xref target="basic.rules"/>)
4156</t>
4157<t>
4158  Clarify that HTTP-Version is case sensitive.
4159  (<xref target="http.version"/>)
4160</t>
4161<t>
4162  Remove reference to non-existant identity transfer-coding value tokens.
4163  (Sections <xref format="counter" target="transfer.codings"/> and
4164  <xref format="counter" target="message.length"/>)
4165</t>
4166<t>
4167  Clarification that the chunk length does not include
4168  the count of the octets in the chunk header and trailer.
4169  (<xref target="chunked.transfer.encoding"/>)
4170</t>
4171<t>
4172  Require that invalid whitespace around field-names be rejected.
4173  (<xref target="message.headers"/>)
4174</t>
4175<t>
4176  Update use of abs_path production from RFC1808 to the path-absolute + query
4177  components of RFC3986.
4178  (<xref target="request-target"/>)
4179</t>
4180<t>
4181  Clarify exactly when close connection options must be sent.
4182  (<xref target="header.connection"/>)
4183</t>
4184</section>
4185</section>
4186
4187<section title="Terminology" anchor="terminology">
4188<t>
4189   This specification uses a number of terms to refer to the roles
4190   played by participants in, and objects of, the HTTP communication.
4191</t>
4192<t>
4193  <iref item="cache"/>
4194  <x:dfn>cache</x:dfn>
4195  <list>
4196    <t>
4197      A program's local store of response messages and the subsystem
4198      that controls its message storage, retrieval, and deletion. A
4199      cache stores cacheable responses in order to reduce the response
4200      time and network bandwidth consumption on future, equivalent
4201      requests. Any client or server may include a cache, though a cache
4202      cannot be used by a server that is acting as a tunnel.
4203    </t>
4204  </list>
4205</t>
4206<t>
4207  <iref item="cacheable"/>
4208  <x:dfn>cacheable</x:dfn>
4209  <list>
4210    <t>
4211      A response is cacheable if a cache is allowed to store a copy of
4212      the response message for use in answering subsequent requests. The
4213      rules for determining the cacheability of HTTP responses are
4214      defined in &caching;. Even if a resource is cacheable, there may
4215      be additional constraints on whether a cache can use the cached
4216      copy for a particular request.
4217    </t>
4218  </list>
4219</t>
4220<t>
4221  <iref item="client"/>
4222  <x:dfn>client</x:dfn>
4223  <list>
4224    <t>
4225      A program that establishes connections for the purpose of sending
4226      requests.
4227    </t>
4228  </list>
4229</t>
4230<t>
4231  <iref item="connection"/>
4232  <x:dfn>connection</x:dfn>
4233  <list>
4234    <t>
4235      A transport layer virtual circuit established between two programs
4236      for the purpose of communication.
4237    </t>
4238  </list>
4239</t>
4240<t>
4241  <iref item="content negotiation"/>
4242  <x:dfn>content negotiation</x:dfn>
4243  <list>
4244    <t>
4245      The mechanism for selecting the appropriate representation when
4246      servicing a request, as described in &content.negotiation;. The
4247      representation of entities in any response can be negotiated
4248      (including error responses).
4249    </t>
4250  </list>
4251</t>
4252<t>
4253  <iref item="entity"/>
4254  <x:dfn>entity</x:dfn>
4255  <list>
4256    <t>
4257      The information transferred as the payload of a request or
4258      response. An entity consists of metainformation in the form of
4259      entity-header fields and content in the form of an entity-body, as
4260      described in &entity;.
4261    </t>
4262  </list>
4263</t>
4264<t>
4265  <iref item="gateway"/>
4266  <x:dfn>gateway</x:dfn>
4267  <list>
4268    <t>
4269      A server which acts as an intermediary for some other server.
4270      Unlike a proxy, a gateway receives requests as if it were the
4271      origin server for the requested resource; the requesting client
4272      may not be aware that it is communicating with a gateway.
4273    </t>
4274  </list>
4275</t>
4276<t>
4277  <iref item="inbound"/>
4278  <iref item="outbound"/>
4279  <x:dfn>inbound</x:dfn>/<x:dfn>outbound</x:dfn>
4280  <list>
4281    <t>
4282      Inbound and outbound refer to the request and response paths for
4283      messages: "inbound" means "traveling toward the origin server",
4284      and "outbound" means "traveling toward the user agent"
4285    </t>
4286  </list>
4287</t>
4288<t>
4289  <iref item="message"/>
4290  <x:dfn>message</x:dfn>
4291  <list>
4292    <t>
4293      The basic unit of HTTP communication, consisting of a structured
4294      sequence of octets matching the syntax defined in <xref target="http.message"/> and
4295      transmitted via the connection.
4296    </t>
4297  </list>
4298</t>
4299<t>
4300  <iref item="origin server"/>
4301  <x:dfn>origin server</x:dfn>
4302  <list>
4303    <t>
4304      The server on which a given resource resides or is to be created.
4305    </t>
4306  </list>
4307</t>
4308<t>
4309  <iref item="proxy"/>
4310  <x:dfn>proxy</x:dfn>
4311  <list>
4312    <t>
4313      An intermediary program which acts as both a server and a client
4314      for the purpose of making requests on behalf of other clients.
4315      Requests are serviced internally or by passing them on, with
4316      possible translation, to other servers. A proxy &MUST; implement
4317      both the client and server requirements of this specification. A
4318      "transparent proxy" is a proxy that does not modify the request or
4319      response beyond what is required for proxy authentication and
4320      identification. A "non-transparent proxy" is a proxy that modifies
4321      the request or response in order to provide some added service to
4322      the user agent, such as group annotation services, media type
4323      transformation, protocol reduction, or anonymity filtering. Except
4324      where either transparent or non-transparent behavior is explicitly
4325      stated, the HTTP proxy requirements apply to both types of
4326      proxies.
4327    </t>
4328  </list>
4329</t>
4330<t>
4331  <iref item="request"/>
4332  <x:dfn>request</x:dfn>
4333  <list>
4334    <t>
4335      An HTTP request message, as defined in <xref target="request"/>.
4336    </t>
4337  </list>
4338</t>
4339<t>
4340  <iref item="resource"/>
4341  <x:dfn>resource</x:dfn>
4342  <list>
4343    <t>
4344      A network data object or service that can be identified by a URI,
4345      as defined in <xref target="uri"/>. Resources may be available in multiple
4346      representations (e.g. multiple languages, data formats, size, and
4347      resolutions) or vary in other ways.
4348    </t>
4349  </list>
4350</t>
4351<t>
4352  <iref item="response"/>
4353  <x:dfn>response</x:dfn>
4354  <list>
4355    <t>
4356      An HTTP response message, as defined in <xref target="response"/>.
4357    </t>
4358  </list>
4359</t>
4360<t>
4361  <iref item="representation"/>
4362  <x:dfn>representation</x:dfn>
4363  <list>
4364    <t>
4365      An entity included with a response that is subject to content
4366      negotiation, as described in &content.negotiation;. There may exist multiple
4367      representations associated with a particular response status.
4368    </t>
4369  </list>
4370</t>
4371<t>
4372  <iref item="server"/>
4373  <x:dfn>server</x:dfn>
4374  <list>
4375    <t>
4376      An application program that accepts connections in order to
4377      service requests by sending back responses. Any given program may
4378      be capable of being both a client and a server; our use of these
4379      terms refers only to the role being performed by the program for a
4380      particular connection, rather than to the program's capabilities
4381      in general. Likewise, any server may act as an origin server,
4382      proxy, gateway, or tunnel, switching behavior based on the nature
4383      of each request.
4384    </t>
4385  </list>
4386</t>
4387<t>
4388  <iref item="tunnel"/>
4389  <x:dfn>tunnel</x:dfn>
4390  <list>
4391    <t>
4392      An intermediary program which is acting as a blind relay between
4393      two connections. Once active, a tunnel is not considered a party
4394      to the HTTP communication, though the tunnel may have been
4395      initiated by an HTTP request. The tunnel ceases to exist when both
4396      ends of the relayed connections are closed.
4397    </t>
4398  </list>
4399</t>
4400<t>
4401  <iref item="upstream"/>
4402  <iref item="downstream"/>
4403  <x:dfn>upstream</x:dfn>/<x:dfn>downstream</x:dfn>
4404  <list>
4405    <t>
4406      Upstream and downstream describe the flow of a message: all
4407      messages flow from upstream to downstream.
4408    </t>
4409  </list>
4410</t>
4411<t>
4412  <iref item="user agent"/>
4413  <x:dfn>user agent</x:dfn>
4414  <list>
4415    <t>
4416      The client which initiates a request. These are often browsers,
4417      editors, spiders (web-traversing robots), or other end user tools.
4418    </t>
4419  </list>
4420</t>
4421<t>
4422  <iref item="variant"/>
4423  <x:dfn>variant</x:dfn>
4424  <list>
4425    <t>
4426      A resource may have one, or more than one, representation(s)
4427      associated with it at any given instant. Each of these
4428      representations is termed a `variant'.  Use of the term `variant'
4429      does not necessarily imply that the resource is subject to content
4430      negotiation.
4431    </t>
4432  </list>
4433</t>
4434</section>
4435
4436<section xmlns:x="http://purl.org/net/xml2rfc/ext" title="Collected ABNF" anchor="collected.abnf">
4437<figure>
4438<artwork type="abnf" name="p1-messaging.parsed-abnf">
4439<x:ref>BWS</x:ref> = OWS
4440
4441<x:ref>Cache-Control</x:ref> = &lt;Cache-Control, defined in [Part6], Section 3.4&gt;
4442<x:ref>Chunked-Body</x:ref> = *chunk last-chunk trailer-part CRLF
4443<x:ref>Connection</x:ref> = "Connection:" OWS Connection-v
4444<x:ref>Connection-v</x:ref> = *( "," OWS ) connection-token *( OWS "," [ OWS
4445 connection-token ] )
4446<x:ref>Content-Length</x:ref> = "Content-Length:" OWS 1*Content-Length-v
4447<x:ref>Content-Length-v</x:ref> = 1*DIGIT
4448
4449<x:ref>Date</x:ref> = "Date:" OWS Date-v
4450<x:ref>Date-v</x:ref> = HTTP-date
4451
4452GMT = %x47.4D.54
4453
4454<x:ref>HTTP-Prot-Name</x:ref> = %x48.54.54.50
4455<x:ref>HTTP-Version</x:ref> = HTTP-Prot-Name "/" 1*DIGIT "." 1*DIGIT
4456<x:ref>HTTP-date</x:ref> = rfc1123-date / obsolete-date
4457<x:ref>HTTP-message</x:ref> = Request / Response
4458<x:ref>Host</x:ref> = "Host:" OWS Host-v
4459<x:ref>Host-v</x:ref> = uri-host [ ":" port ]
4460
4461<x:ref>Method</x:ref> = token
4462
4463<x:ref>OWS</x:ref> = *( [ obs-fold ] WSP )
4464
4465<x:ref>Pragma</x:ref> = &lt;Pragma, defined in [Part6], Section 3.4&gt;
4466
4467<x:ref>RWS</x:ref> = 1*( [ obs-fold ] WSP )
4468<x:ref>Reason-Phrase</x:ref> = *( WSP / VCHAR / obs-text )
4469<x:ref>Request</x:ref> = Request-Line *( ( general-header / request-header /
4470 entity-header ) CRLF ) CRLF [ message-body ]
4471<x:ref>Request-Line</x:ref> = Method SP request-target SP HTTP-Version CRLF
4472<x:ref>Response</x:ref> = Status-Line *( ( general-header / response-header /
4473 entity-header ) CRLF ) CRLF [ message-body ]
4474
4475<x:ref>Status-Code</x:ref> = 3DIGIT
4476<x:ref>Status-Line</x:ref> = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
4477
4478<x:ref>TE</x:ref> = "TE:" OWS TE-v
4479<x:ref>TE-v</x:ref> = [ ( "," / t-codings ) *( OWS "," [ OWS t-codings ] ) ]
4480<x:ref>Trailer</x:ref> = "Trailer:" OWS Trailer-v
4481<x:ref>Trailer-v</x:ref> = *( "," OWS ) field-name *( OWS "," [ OWS field-name ] )
4482<x:ref>Transfer-Encoding</x:ref> = "Transfer-Encoding:" OWS Transfer-Encoding-v
4483<x:ref>Transfer-Encoding-v</x:ref> = *( "," OWS ) transfer-coding *( OWS "," [ OWS
4484 transfer-coding ] )
4485
4486<x:ref>URI</x:ref> = &lt;URI, defined in [RFC3986], Section 3&gt;
4487<x:ref>URI-reference</x:ref> = &lt;URI-reference, defined in [RFC3986], Section 4.1&gt;
4488<x:ref>Upgrade</x:ref> = "Upgrade:" OWS Upgrade-v
4489<x:ref>Upgrade-v</x:ref> = *( "," OWS ) product *( OWS "," [ OWS product ] )
4490
4491<x:ref>Via</x:ref> = "Via:" OWS Via-v
4492<x:ref>Via-v</x:ref> = *( "," OWS ) received-protocol RWS received-by [ RWS comment
4493 ] *( OWS "," [ OWS received-protocol RWS received-by [ RWS comment ]
4494 ] )
4495
4496<x:ref>Warning</x:ref> = &lt;Warning, defined in [Part6], Section 3.6&gt;
4497
4498<x:ref>absolute-URI</x:ref> = &lt;absolute-URI, defined in [RFC3986], Section 4.3&gt;
4499<x:ref>asctime-date</x:ref> = wkday SP date3 SP time SP 4DIGIT
4500<x:ref>attribute</x:ref> = token
4501<x:ref>authority</x:ref> = &lt;authority, defined in [RFC3986], Section 3.2&gt;
4502
4503<x:ref>chunk</x:ref> = chunk-size *WSP [ chunk-ext ] CRLF chunk-data CRLF
4504<x:ref>chunk-data</x:ref> = 1*OCTET
4505<x:ref>chunk-ext</x:ref> = *( ";" *WSP chunk-ext-name [ "=" chunk-ext-val ] *WSP )
4506<x:ref>chunk-ext-name</x:ref> = token
4507<x:ref>chunk-ext-val</x:ref> = token / quoted-string
4508<x:ref>chunk-size</x:ref> = 1*HEXDIG
4509<x:ref>comment</x:ref> = "(" *( ctext / quoted-pair / comment ) ")"
4510<x:ref>connection-token</x:ref> = token
4511<x:ref>ctext</x:ref> = *( OWS / %x21-27 / %x2A-7E / obs-text )
4512
4513<x:ref>date1</x:ref> = 2DIGIT SP month SP 4DIGIT
4514<x:ref>date2</x:ref> = 2DIGIT "-" month "-" 2DIGIT
4515<x:ref>date3</x:ref> = month SP ( 2DIGIT / ( SP DIGIT ) )
4516
4517<x:ref>entity-body</x:ref> = &lt;entity-body, defined in [Part3], Section 3.2&gt;
4518<x:ref>entity-header</x:ref> = &lt;entity-header, defined in [Part3], Section 3.1&gt;
4519
4520<x:ref>field-content</x:ref> = *( WSP / VCHAR / obs-text )
4521<x:ref>field-name</x:ref> = token
4522<x:ref>field-value</x:ref> = *( field-content / OWS )
4523<x:ref>fragment</x:ref> = &lt;fragment, defined in [RFC3986], Section 3.5&gt;
4524
4525<x:ref>general-header</x:ref> = Cache-Control / Connection / Date / Pragma / Trailer
4526 / Transfer-Encoding / Upgrade / Via / Warning
4527<x:ref>generic-message</x:ref> = start-line *( message-header CRLF ) CRLF [
4528 message-body ]
4529
4530<x:ref>http-URI</x:ref> = "http://" authority path-abempty [ "?" query ]
4531
4532l-Fri = %x46.72.69.64.61.79
4533l-Mon = %x4D.6F.6E.64.61.79
4534l-Sat = %x53.61.74.75.72.64.61.79
4535l-Sun = %x53.75.6E.64.61.79
4536l-Thu = %x54.68.75.72.73.64.61.79
4537l-Tue = %x54.75.65.73.64.61.79
4538l-Wed = %x57.65.64.6E.65.73.64.61.79
4539<x:ref>last-chunk</x:ref> = 1*"0" *WSP [ chunk-ext ] CRLF
4540
4541<x:ref>message-body</x:ref> = entity-body /
4542 &lt;entity-body encoded as per Transfer-Encoding&gt;
4543<x:ref>message-header</x:ref> = field-name ":" OWS [ field-value ] OWS
4544<x:ref>month</x:ref> = s-Jan / s-Feb / s-Mar / s-Apr / s-May / s-Jun / s-Jul / s-Aug
4545 / s-Sep / s-Oct / s-Nov / s-Dec
4546
4547<x:ref>obs-fold</x:ref> = CRLF
4548<x:ref>obs-text</x:ref> = %x80-FF
4549<x:ref>obsolete-date</x:ref> = rfc850-date / asctime-date
4550
4551<x:ref>parameter</x:ref> = attribute BWS "=" BWS value
4552<x:ref>partial-URI</x:ref> = relative-part [ "?" query ]
4553<x:ref>path-abempty</x:ref> = &lt;path-abempty, defined in [RFC3986], Section 3.3&gt;
4554<x:ref>path-absolute</x:ref> = &lt;path-absolute, defined in [RFC3986], Section 3.3&gt;
4555<x:ref>port</x:ref> = &lt;port, defined in [RFC3986], Section 3.2.3&gt;
4556<x:ref>product</x:ref> = token [ "/" product-version ]
4557<x:ref>product-version</x:ref> = token
4558<x:ref>protocol-name</x:ref> = token
4559<x:ref>protocol-version</x:ref> = token
4560<x:ref>pseudonym</x:ref> = token
4561
4562<x:ref>qdtext</x:ref> = *( OWS / "!" / %x23-5B / %x5D-7E / obs-text )
4563<x:ref>query</x:ref> = &lt;query, defined in [RFC3986], Section 3.4&gt;
4564<x:ref>quoted-pair</x:ref> = "\" quoted-text
4565<x:ref>quoted-string</x:ref> = DQUOTE *( qdtext / quoted-pair ) DQUOTE
4566<x:ref>quoted-text</x:ref> = %x01-09 / %x0B-0C / %x0E-FF
4567<x:ref>qvalue</x:ref> = ( "0" [ "." *3DIGIT ] ) / ( "1" [ "." *3"0" ] )
4568
4569<x:ref>received-by</x:ref> = ( uri-host [ ":" port ] ) / pseudonym
4570<x:ref>received-protocol</x:ref> = [ protocol-name "/" ] protocol-version
4571<x:ref>relative-part</x:ref> = &lt;relative-part, defined in [RFC3986], Section 4.2&gt;
4572<x:ref>request-header</x:ref> = &lt;request-header, defined in [Part2], Section 3&gt;
4573<x:ref>request-target</x:ref> = "*" / absolute-URI / ( path-absolute [ "?" query ] )
4574 / authority
4575<x:ref>response-header</x:ref> = &lt;response-header, defined in [Part2], Section 5&gt;
4576<x:ref>rfc1123-date</x:ref> = wkday "," SP date1 SP time SP GMT
4577<x:ref>rfc850-date</x:ref> = weekday "," SP date2 SP time SP GMT
4578
4579s-Apr = %x41.70.72
4580s-Aug = %x41.75.67
4581s-Dec = %x44.65.63
4582s-Feb = %x46.65.62
4583s-Fri = %x46.72.69
4584s-Jan = %x4A.61.6E
4585s-Jul = %x4A.75.6C
4586s-Jun = %x4A.75.6E
4587s-Mar = %x4D.61.72
4588s-May = %x4D.61.79
4589s-Mon = %x4D.6F.6E
4590s-Nov = %x4E.6F.76
4591s-Oct = %x4F.63.74
4592s-Sat = %x53.61.74
4593s-Sep = %x53.65.70
4594s-Sun = %x53.75.6E
4595s-Thu = %x54.68.75
4596s-Tue = %x54.75.65
4597s-Wed = %x57.65.64
4598<x:ref>start-line</x:ref> = Request-Line / Status-Line
4599
4600<x:ref>t-codings</x:ref> = "trailers" / ( transfer-extension [ te-params ] )
4601<x:ref>tchar</x:ref> = "!" / "#" / "$" / "%" / "&amp;" / "'" / "*" / "+" / "-" / "." /
4602 "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA
4603<x:ref>te-ext</x:ref> = OWS ";" OWS token [ "=" ( token / quoted-string ) ]
4604<x:ref>te-params</x:ref> = OWS ";" OWS "q=" qvalue *te-ext
4605<x:ref>time</x:ref> = 2DIGIT ":" 2DIGIT ":" 2DIGIT
4606<x:ref>token</x:ref> = 1*tchar
4607<x:ref>trailer-part</x:ref> = *( entity-header CRLF )
4608<x:ref>transfer-coding</x:ref> = "chunked" / transfer-extension
4609<x:ref>transfer-extension</x:ref> = token *( OWS ";" OWS parameter )
4610
4611<x:ref>uri-host</x:ref> = &lt;host, defined in [RFC3986], Section 3.2.2&gt;
4612
4613<x:ref>value</x:ref> = token / quoted-string
4614
4615<x:ref>weekday</x:ref> = l-Mon / l-Tue / l-Wed / l-Thu / l-Fri / l-Sat / l-Sun
4616<x:ref>wkday</x:ref> = s-Mon / s-Tue / s-Wed / s-Thu / s-Fri / s-Sat / s-Sun
4617
4618
4619</artwork>
4620</figure>
4621<figure><preamble>ABNF diagnostics:</preamble><artwork type="inline">
4622; Chunked-Body defined but not used
4623; Content-Length defined but not used
4624; HTTP-message defined but not used
4625; Host defined but not used
4626; TE defined but not used
4627; URI defined but not used
4628; URI-reference defined but not used
4629; fragment defined but not used
4630; generic-message defined but not used
4631; http-URI defined but not used
4632; partial-URI defined but not used
4633</artwork></figure></section>
4634
4635<section title="Change Log (to be removed by RFC Editor before publication)" anchor="change.log">
4636
4637<section title="Since RFC2616">
4638<t>
4639  Extracted relevant partitions from <xref target="RFC2616"/>.
4640</t>
4641</section>
4642
4643<section title="Since draft-ietf-httpbis-p1-messaging-00">
4644<t>
4645  Closed issues:
4646  <list style="symbols"> 
4647    <t>
4648      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/1"/>:
4649      "HTTP Version should be case sensitive"
4650      (<eref target="http://purl.org/NET/http-errata#verscase"/>)
4651    </t>
4652    <t>
4653      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/2"/>:
4654      "'unsafe' characters"
4655      (<eref target="http://purl.org/NET/http-errata#unsafe-uri"/>)
4656    </t>
4657    <t>
4658      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/3"/>:
4659      "Chunk Size Definition"
4660      (<eref target="http://purl.org/NET/http-errata#chunk-size"/>)
4661    </t>
4662    <t>
4663      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/4"/>:
4664      "Message Length"
4665      (<eref target="http://purl.org/NET/http-errata#msg-len-chars"/>)
4666    </t>
4667    <t>
4668      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/8"/>:
4669      "Media Type Registrations"
4670      (<eref target="http://purl.org/NET/http-errata#media-reg"/>)
4671    </t>
4672    <t>
4673      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/11"/>:
4674      "URI includes query"
4675      (<eref target="http://purl.org/NET/http-errata#uriquery"/>)
4676    </t>
4677    <t>
4678      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/15"/>:
4679      "No close on 1xx responses"
4680      (<eref target="http://purl.org/NET/http-errata#noclose1xx"/>)
4681    </t>
4682    <t>
4683      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/16"/>:
4684      "Remove 'identity' token references"
4685      (<eref target="http://purl.org/NET/http-errata#identity"/>)
4686    </t>
4687    <t>
4688      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/26"/>:
4689      "Import query BNF"
4690    </t>
4691    <t>
4692      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/31"/>:
4693      "qdtext BNF"
4694    </t>
4695    <t>
4696      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/35"/>:
4697      "Normative and Informative references"
4698    </t>
4699    <t>
4700      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/42"/>:
4701      "RFC2606 Compliance"
4702    </t>
4703    <t>
4704      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/45"/>:
4705      "RFC977 reference"
4706    </t>
4707    <t>
4708      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/46"/>:
4709      "RFC1700 references"
4710    </t>
4711    <t>
4712      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/47"/>:
4713      "inconsistency in date format explanation"
4714    </t>
4715    <t>
4716      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/48"/>:
4717      "Date reference typo"
4718    </t>
4719    <t>
4720      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/65"/>:
4721      "Informative references"
4722    </t>
4723    <t>
4724      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/66"/>:
4725      "ISO-8859-1 Reference"
4726    </t>
4727    <t>
4728      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/86"/>:
4729      "Normative up-to-date references"
4730    </t>
4731  </list>
4732</t>
4733<t>
4734  Other changes:
4735  <list style="symbols"> 
4736    <t>
4737      Update media type registrations to use RFC4288 template.
4738    </t>
4739    <t>
4740      Use names of RFC4234 core rules DQUOTE and WSP,
4741      fix broken ABNF for chunk-data
4742      (work in progress on <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>)
4743    </t>
4744  </list>
4745</t>
4746</section>
4747
4748<section title="Since draft-ietf-httpbis-p1-messaging-01">
4749<t>
4750  Closed issues:
4751  <list style="symbols"> 
4752    <t>
4753      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/19"/>:
4754      "Bodies on GET (and other) requests"
4755    </t>
4756    <t>
4757      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/55"/>:
4758      "Updating to RFC4288"
4759    </t>
4760    <t>
4761      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/57"/>:
4762      "Status Code and Reason Phrase"
4763    </t>
4764    <t>
4765      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/82"/>:
4766      "rel_path not used"
4767    </t>
4768  </list>
4769</t>
4770<t>
4771  Ongoing work on ABNF conversion (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>):
4772  <list style="symbols"> 
4773    <t>
4774      Get rid of duplicate BNF rule names ("host" -> "uri-host", "trailer" ->
4775      "trailer-part").
4776    </t>
4777    <t>
4778      Avoid underscore character in rule names ("http_URL" ->
4779      "http-URL", "abs_path" -> "path-absolute").
4780    </t>
4781    <t>
4782      Add rules for terms imported from URI spec ("absoluteURI", "authority",
4783      "path-absolute", "port", "query", "relativeURI", "host) -- these will
4784      have to be updated when switching over to RFC3986.
4785    </t>
4786    <t>
4787      Synchronize core rules with RFC5234.
4788    </t>
4789    <t>
4790      Get rid of prose rules that span multiple lines.
4791    </t>
4792    <t>
4793      Get rid of unused rules LOALPHA and UPALPHA.
4794    </t>
4795    <t>
4796      Move "Product Tokens" section (back) into Part 1, as "token" is used
4797      in the definition of the Upgrade header.
4798    </t>
4799    <t>
4800      Add explicit references to BNF syntax and rules imported from other parts of the specification.
4801    </t>
4802    <t>
4803      Rewrite prose rule "token" in terms of "tchar", rewrite prose rule "TEXT".
4804    </t>
4805  </list>
4806</t>
4807</section>
4808
4809<section title="Since draft-ietf-httpbis-p1-messaging-02" anchor="changes.since.02">
4810<t>
4811  Closed issues:
4812  <list style="symbols"> 
4813    <t>
4814      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/51"/>:
4815      "HTTP-date vs. rfc1123-date"
4816    </t>
4817    <t>
4818      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/64"/>:
4819      "WS in quoted-pair"
4820    </t>
4821  </list>
4822</t>
4823<t>
4824  Ongoing work on IANA Message Header Registration (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/40"/>):
4825  <list style="symbols"> 
4826    <t>
4827      Reference RFC 3984, and update header registrations for headers defined
4828      in this document.
4829    </t>
4830  </list>
4831</t>
4832<t>
4833  Ongoing work on ABNF conversion (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>):
4834  <list style="symbols"> 
4835    <t>
4836      Replace string literals when the string really is case-sensitive (HTTP-Version).
4837    </t>
4838  </list>
4839</t>
4840</section>
4841
4842<section title="Since draft-ietf-httpbis-p1-messaging-03" anchor="changes.since.03">
4843<t>
4844  Closed issues:
4845  <list style="symbols"> 
4846    <t>
4847      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/28"/>:
4848      "Connection closing"
4849    </t>
4850    <t>
4851      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/97"/>:
4852      "Move registrations and registry information to IANA Considerations"
4853    </t>
4854    <t>
4855      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/120"/>:
4856      "need new URL for PAD1995 reference"
4857    </t>
4858    <t>
4859      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/127"/>:
4860      "IANA Considerations: update HTTP URI scheme registration"
4861    </t>
4862    <t>
4863      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/128"/>:
4864      "Cite HTTPS URI scheme definition"
4865    </t>
4866    <t>
4867      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/129"/>:
4868      "List-type headers vs Set-Cookie"
4869    </t>
4870  </list>
4871</t>
4872<t>
4873  Ongoing work on ABNF conversion (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>):
4874  <list style="symbols"> 
4875    <t>
4876      Replace string literals when the string really is case-sensitive (HTTP-Date).
4877    </t>
4878    <t>
4879      Replace HEX by HEXDIG for future consistence with RFC 5234's core rules.
4880    </t>
4881  </list>
4882</t>
4883</section>
4884
4885<section title="Since draft-ietf-httpbis-p1-messaging-04" anchor="changes.since.04">
4886<t>
4887  Closed issues:
4888  <list style="symbols"> 
4889    <t>
4890      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/34"/>:
4891      "Out-of-date reference for URIs"
4892    </t>
4893    <t>
4894      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/132"/>:
4895      "RFC 2822 is updated by RFC 5322"
4896    </t>
4897  </list>
4898</t>
4899<t>
4900  Ongoing work on ABNF conversion (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>):
4901  <list style="symbols"> 
4902    <t>
4903      Use "/" instead of "|" for alternatives.
4904    </t>
4905    <t>
4906      Get rid of RFC822 dependency; use RFC5234 plus extensions instead.
4907    </t>
4908    <t>
4909      Only reference RFC 5234's core rules.
4910    </t>
4911    <t>
4912      Introduce new ABNF rules for "bad" whitespace ("BWS"), optional
4913      whitespace ("OWS") and required whitespace ("RWS").
4914    </t>
4915    <t>
4916      Rewrite ABNFs to spell out whitespace rules, factor out
4917      header value format definitions.
4918    </t>
4919  </list>
4920</t>
4921</section>
4922
4923<section title="Since draft-ietf-httpbis-p1-messaging-05" anchor="changes.since.05">
4924<t>
4925  Closed issues:
4926  <list style="symbols"> 
4927    <t>
4928      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/30"/>:
4929      "Header LWS"
4930    </t>
4931    <t>
4932      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/52"/>:
4933      "Sort 1.3 Terminology"
4934    </t>
4935    <t>
4936      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/63"/>:
4937      "RFC2047 encoded words"
4938    </t>
4939    <t>
4940      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/74"/>:
4941      "Character Encodings in TEXT"
4942    </t>
4943    <t>
4944      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/77"/>:
4945      "Line Folding"
4946    </t>
4947    <t>
4948      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/83"/>:
4949      "OPTIONS * and proxies"
4950    </t>
4951    <t>
4952      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/94"/>:
4953      "Reason-Phrase BNF"
4954    </t>
4955    <t>
4956      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/111"/>:
4957      "Use of TEXT"
4958    </t>
4959    <t>
4960      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/118"/>:
4961      "Join "Differences Between HTTP Entities and RFC 2045 Entities"?"
4962    </t>
4963    <t>
4964      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/134"/>:
4965      "RFC822 reference left in discussion of date formats"
4966    </t>
4967  </list>
4968</t>
4969<t>
4970  Final work on ABNF conversion (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>):
4971  <list style="symbols"> 
4972    <t>
4973      Rewrite definition of list rules, deprecate empty list elements.
4974    </t>
4975    <t>
4976      Add appendix containing collected and expanded ABNF.
4977    </t>
4978  </list>
4979</t>
4980<t>
4981  Other changes:
4982  <list style="symbols"> 
4983    <t>
4984      Rewrite introduction; add mostly new Architecture Section.
4985    </t>
4986    <t>
4987      Move definition of quality values from Part 3 into Part 1;
4988      make TE request header grammar independent of accept-params (defined in Part 3).
4989    </t>
4990  </list>
4991</t>
4992</section>
4993
4994</section>
4995
4996</back>
4997</rfc>
Note: See TracBrowser for help on using the repository browser.