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

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

Cleanup references after switch to symbolic references (removing duplicated RFC numbers), clean up some of the references XML code.

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