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

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

clean up the URI section; s/Request-URI/request-target/g

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