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

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

move ABNF section up

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