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

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

No content changes. Move ABNF up to intro. Move URIs up to when to use HTTP.

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