source: draft-ietf-httpbis/01/draft-ietf-httpbis-p2-semantics-01.xml @ 2762

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

fix mime types

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/xml
File size: 111.4 KB
1<?xml version="1.0" encoding="UTF-8"?>
3    This XML document is the output of clean-for-DTD.xslt; a tool that strips
4    extensions to RFC2629(bis) from documents for processing with xml2rfc.
6<?xml-stylesheet type='text/xsl' href='../myxml2rfc.xslt'?>
7<?rfc toc="yes" ?>
8<?rfc symrefs="yes" ?>
9<?rfc sortrefs="yes" ?>
10<?rfc compact="yes"?>
11<?rfc subcompact="no" ?>
12<?rfc linkmailto="no" ?>
13<?rfc editing="no" ?>
14<!DOCTYPE rfc
15  PUBLIC "" "rfc2629.dtd">
16<rfc obsoletes="2616" category="std" ipr="full3978" docName="draft-ietf-httpbis-p2-semantics-01">
19  <title abbrev="HTTP/1.1, Part 2">HTTP/1.1, part 2: Message Semantics</title>
21  <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
22    <organization abbrev="Day Software">Day Software</organization>
23    <address>
24      <postal>
25        <street>23 Corporate Plaza DR, Suite 280</street>
26        <city>Newport Beach</city>
27        <region>CA</region>
28        <code>92660</code>
29        <country>USA</country>
30      </postal>
31      <phone>+1-949-706-5300</phone>
32      <facsimile>+1-949-706-5305</facsimile>
33      <email></email>
34      <uri></uri>
35    </address>
36  </author>
38  <author initials="J." surname="Gettys" fullname="Jim Gettys">
39    <organization>One Laptop per Child</organization>
40    <address>
41      <postal>
42        <street>21 Oak Knoll Road</street>
43        <city>Carlisle</city>
44        <region>MA</region>
45        <code>01741</code>
46        <country>USA</country>
47      </postal>
48      <email></email>
49      <uri></uri>
50    </address>
51  </author>
53  <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
54    <organization abbrev="HP">Hewlett-Packard Company</organization>
55    <address>
56      <postal>
57        <street>HP Labs, Large Scale Systems Group</street>
58        <street>1501 Page Mill Road, MS 1177</street>
59        <city>Palo Alto</city>
60        <region>CA</region>
61        <code>94304</code>
62        <country>USA</country>
63      </postal>
64      <email></email>
65    </address>
66  </author>
68  <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
69    <organization abbrev="Microsoft">Microsoft Corporation</organization>
70    <address>
71      <postal>
72        <street>1 Microsoft Way</street>
73        <city>Redmond</city>
74        <region>WA</region>
75        <code>98052</code>
76        <country>USA</country>
77      </postal>
78      <email></email>
79    </address>
80  </author>
82  <author initials="L." surname="Masinter" fullname="Larry Masinter">
83    <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
84    <address>
85      <postal>
86        <street>345 Park Ave</street>
87        <city>San Jose</city>
88        <region>CA</region>
89        <code>95110</code>
90        <country>USA</country>
91      </postal>
92      <email></email>
93      <uri></uri>
94    </address>
95  </author>
97  <author initials="P." surname="Leach" fullname="Paul J. Leach">
98    <organization abbrev="Microsoft">Microsoft Corporation</organization>
99    <address>
100      <postal>
101        <street>1 Microsoft Way</street>
102        <city>Redmond</city>
103        <region>WA</region>
104        <code>98052</code>
105      </postal>
106      <email></email>
107    </address>
108  </author>
110  <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
111    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
112    <address>
113      <postal>
114        <street>MIT Computer Science and Artificial Intelligence Laboratory</street>
115        <street>The Stata Center, Building 32</street>
116        <street>32 Vassar Street</street>
117        <city>Cambridge</city>
118        <region>MA</region>
119        <code>02139</code>
120        <country>USA</country>
121      </postal>
122      <email></email>
123      <uri></uri>
124    </address>
125  </author>
127  <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
128    <organization abbrev="W3C">World Wide Web Consortium</organization>
129    <address>
130      <postal>
131        <street>W3C / ERCIM</street>
132        <street>2004, rte des Lucioles</street>
133        <city>Sophia-Antipolis</city>
134        <region>AM</region>
135        <code>06902</code>
136        <country>France</country>
137      </postal>
138      <email></email>
139      <uri></uri>
140    </address>
141  </author>
143  <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
144    <organization abbrev="greenbytes">greenbytes GmbH</organization>
145    <address>
146      <postal>
147        <street>Hafenweg 16</street>
148        <city>Muenster</city><region>NW</region><code>48155</code>
149        <country>Germany</country>
150      </postal>
151      <phone>+49 251 2807760</phone>   
152      <facsimile>+49 251 2807761</facsimile>   
153      <email></email>       
154      <uri></uri>     
155    </address>
156  </author>
158  <date month="January" year="2008" day="12"/>
162   The Hypertext Transfer Protocol (HTTP) is an application-level
163   protocol for distributed, collaborative, hypermedia information
164   systems. HTTP has been in use by the World Wide Web global information
165   initiative since 1990. This document is Part 2 of the seven-part specification
166   that defines the protocol referred to as "HTTP/1.1" and, taken together,
167   obsoletes RFC 2616.  Part 2 defines the semantics of HTTP messages
168   as expressed by request methods, request-header fields, response status codes,
169   and response-header fields.
173<note title="Editorial Note (To be removed by RFC Editor)">
174  <t>
175    Discussion of this draft should take place on the HTTPBIS working group
176    mailing list ( The current issues list is
177    at <eref target=""/>
178    and related documents (including fancy diffs) can be found at
179    <eref target=""/>.
180  </t>
181  <t>
182    This draft incorporates those issue resolutions that were either
183    collected in the original RFC2616 errata list (<eref target=""/>),
184    or which were agreed upon on the mailing list between October 2006 and
185    November 2007 (as published in "draft-lafon-rfc2616bis-03").
186  </t>
190<section title="Introduction" anchor="introduction">
192   This document defines HTTP/1.1 request and response semantics.  Each HTTP
193   message, as defined in <xref target="Part1"/>, is in the form of either a request or
194   a response.  An HTTP server listens on a connection for HTTP requests and
195   responds to each request, in the order received on that connection, with
196   one or more HTTP response messages.  This document defines the commonly
197   agreed upon semantics of the HTTP uniform interface, the intentions defined
198   by each request method, and the various response messages that might be
199   expected as a result of applying that method for the requested resource.
202   This document is currently disorganized in order to minimize the changes
203   between drafts and enable reviewers to see the smaller errata changes.
204   The next draft will reorganize the sections to better reflect the content.
205   In particular, the sections will be ordered according to the typical
206   processing of an HTTP request message (after message parsing): resource
207   mapping, general header fields, methods, request modifiers, response
208   status, and resource metadata.  The current mess reflects how widely
209   dispersed these topics and associated requirements had become in
210   <xref target="RFC2616"/>.
213<section title="Requirements" anchor="intro.requirements">
215   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
216   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
217   document are to be interpreted as described in <xref target="RFC2119"/>.
220   An implementation is not compliant if it fails to satisfy one or more
221   of the MUST or REQUIRED level requirements for the protocols it
222   implements. An implementation that satisfies all the MUST or REQUIRED
223   level and all the SHOULD level requirements for its protocols is said
224   to be "unconditionally compliant"; one that satisfies all the MUST
225   level requirements but not all the SHOULD level requirements for its
226   protocols is said to be "conditionally compliant."
231<section title="Product Tokens" anchor="product.tokens">
233   Product tokens are used to allow communicating applications to
234   identify themselves by software name and version. Most fields using
235   product tokens also allow sub-products which form a significant part
236   of the application to be listed, separated by white space. By
237   convention, the products are listed in order of their significance
238   for identifying the application.
240<figure><iref primary="true" item="Grammar" subitem="product"/><iref primary="true" item="Grammar" subitem="product-version"/><artwork type="abnf2616"><![CDATA[
241  product         = token ["/" product-version]
242  product-version = token
245   Examples:
247<figure><artwork type="example"><![CDATA[
248    User-Agent: CERN-LineMode/2.15 libwww/2.17b3
249    Server: Apache/0.8.4
252   Product tokens SHOULD be short and to the point. They MUST NOT be
253   used for advertising or other non-essential information. Although any
254   token character MAY appear in a product-version, this token SHOULD
255   only be used for a version identifier (i.e., successive versions of
256   the same product SHOULD only differ in the product-version portion of
257   the product value).
261<section title="Method" anchor="method">
263   The Method  token indicates the method to be performed on the
264   resource identified by the Request-URI. The method is case-sensitive.
266<figure><iref primary="true" item="Grammar" subitem="Method"/><iref primary="true" item="Grammar" subitem="extension-method"/><artwork type="abnf2616"><![CDATA[
267  Method         = "OPTIONS"                ; Section 8.2
268                 | "GET"                    ; Section 8.3
269                 | "HEAD"                   ; Section 8.4
270                 | "POST"                   ; Section 8.5
271                 | "PUT"                    ; Section 8.6
272                 | "DELETE"                 ; Section 8.7
273                 | "TRACE"                  ; Section 8.8
274                 | "CONNECT"                ; Section 8.9
275                 | extension-method
276  extension-method = token
279   The list of methods allowed by a resource can be specified in an
280   Allow header field (<xref target="header.allow"/>). The return code of the response
281   always notifies the client whether a method is currently allowed on a
282   resource, since the set of allowed methods can change dynamically. An
283   origin server SHOULD return the status code 405 (Method Not Allowed)
284   if the method is known by the origin server but not allowed for the
285   requested resource, and 501 (Not Implemented) if the method is
286   unrecognized or not implemented by the origin server. The methods GET
287   and HEAD MUST be supported by all general-purpose servers. All other
288   methods are OPTIONAL; however, if the above methods are implemented,
289   they MUST be implemented with the same semantics as those specified
290   in <xref target="method.definitions"/>.
294<section title="Request Header Fields" anchor="request.header.fields">
296   The request-header fields allow the client to pass additional
297   information about the request, and about the client itself, to the
298   server. These fields act as request modifiers, with semantics
299   equivalent to the parameters on a programming language method
300   invocation.
302<figure><iref primary="true" item="Grammar" subitem="request-header"/><artwork type="abnf2616"><![CDATA[
303  request-header = Accept                   ; [Part3], Section 5.1
304                 | Accept-Charset           ; [Part3], Section 5.2
305                 | Accept-Encoding          ; [Part3], Section 5.3
306                 | Accept-Language          ; [Part3], Section 5.4
307                 | Authorization            ; [Part7], Section 3.1
308                 | Expect                   ; Section 10.2
309                 | From                     ; Section 10.3
310                 | Host                     ; [Part1], Section 8.4
311                 | If-Match                 ; [Part4], Section 6.2
312                 | If-Modified-Since        ; [Part4], Section 6.3
313                 | If-None-Match            ; [Part4], Section 6.4
314                 | If-Range                 ; [Part5], Section 5.3
315                 | If-Unmodified-Since      ; [Part4], Section 6.5
316                 | Max-Forwards             ; Section 10.5
317                 | Proxy-Authorization      ; [Part7], Section 3.3
318                 | Range                    ; [Part5], Section 5.4
319                 | Referer                  ; Section 10.6
320                 | TE                       ; [Part1], Section 8.8
321                 | User-Agent               ; Section 10.9
324   Request-header field names can be extended reliably only in
325   combination with a change in the protocol version. However, new or
326   experimental header fields MAY be given the semantics of request-header
327   fields if all parties in the communication recognize them to
328   be request-header fields. Unrecognized header fields are treated as
329   entity-header fields.
333<section title="Status Code and Reason Phrase" anchor="status.code.and.reason.phrase">
335   The Status-Code element is a 3-digit integer result code of the
336   attempt to understand and satisfy the request. The status codes listed
337   below are defined in <xref target=""/>.
338   The Reason-Phrase is intended to give a short
339   textual description of the Status-Code. The Status-Code is intended
340   for use by automata and the Reason-Phrase is intended for the human
341   user. The client is not required to examine or display the Reason-Phrase.
344   The individual values of the numeric status codes defined for
345   HTTP/1.1, and an example set of corresponding Reason-Phrase's, are
346   presented below. The reason phrases listed here are only
347   recommendations -- they MAY be replaced by local equivalents without
348   affecting the protocol.
350<figure><iref primary="true" item="Grammar" subitem="Status-Code"/><iref primary="true" item="Grammar" subitem="extension-code"/><iref primary="true" item="Grammar" subitem="Reason-Phrase"/><artwork type="abnf2616"><![CDATA[
351  Status-Code    =
352         "100"  ; Section 9.1.1: Continue
353       | "101"  ; Section 9.1.2: Switching Protocols
354       | "200"  ; Section 9.2.1: OK
355       | "201"  ; Section 9.2.2: Created
356       | "202"  ; Section 9.2.3: Accepted
357       | "203"  ; Section 9.2.4: Non-Authoritative Information
358       | "204"  ; Section 9.2.5: No Content
359       | "205"  ; Section 9.2.6: Reset Content
360       | "206"  ; Section 9.2.7: Partial Content
361       | "300"  ; Section 9.3.1: Multiple Choices
362       | "301"  ; Section 9.3.2: Moved Permanently
363       | "302"  ; Section 9.3.3: Found
364       | "303"  ; Section 9.3.4: See Other
365       | "304"  ; Section 9.3.5: Not Modified
366       | "305"  ; Section 9.3.6: Use Proxy
367       | "307"  ; Section 9.3.8: Temporary Redirect
368       | "400"  ; Section 9.4.1: Bad Request
369       | "401"  ; Section 9.4.2: Unauthorized
370       | "402"  ; Section 9.4.3: Payment Required
371       | "403"  ; Section 9.4.4: Forbidden
372       | "404"  ; Section 9.4.5: Not Found
373       | "405"  ; Section 9.4.6: Method Not Allowed
374       | "406"  ; Section 9.4.7: Not Acceptable
375       | "407"  ; Section 9.4.8: Proxy Authentication Required
376       | "408"  ; Section 9.4.9: Request Time-out
377       | "409"  ; Section 9.4.10: Conflict
378       | "410"  ; Section 9.4.11: Gone
379       | "411"  ; Section 9.4.12: Length Required
380       | "412"  ; Section 9.4.13: Precondition Failed
381       | "413"  ; Section 9.4.14: Request Entity Too Large
382       | "414"  ; Section 9.4.15: Request-URI Too Large
383       | "415"  ; Section 9.4.16: Unsupported Media Type
384       | "416"  ; Section 9.4.17: Requested range not satisfiable
385       | "417"  ; Section 9.4.18: Expectation Failed
386       | "500"  ; Section 9.5.1: Internal Server Error
387       | "501"  ; Section 9.5.2: Not Implemented
388       | "502"  ; Section 9.5.3: Bad Gateway
389       | "503"  ; Section 9.5.4: Service Unavailable
390       | "504"  ; Section 9.5.5: Gateway Time-out
391       | "505"  ; Section 9.5.6: HTTP Version not supported
392       | extension-code
394  extension-code = 3DIGIT
395  Reason-Phrase  = *<TEXT, excluding CR, LF>
398   HTTP status codes are extensible. HTTP applications are not required
399   to understand the meaning of all registered status codes, though such
400   understanding is obviously desirable. However, applications MUST
401   understand the class of any status code, as indicated by the first
402   digit, and treat any unrecognized response as being equivalent to the
403   x00 status code of that class, with the exception that an
404   unrecognized response MUST NOT be cached. For example, if an
405   unrecognized status code of 431 is received by the client, it can
406   safely assume that there was something wrong with its request and
407   treat the response as if it had received a 400 status code. In such
408   cases, user agents SHOULD present to the user the entity returned
409   with the response, since that entity is likely to include human-readable
410   information which will explain the unusual status.
414<section title="Response Header Fields" anchor="response.header.fields">
416   The response-header fields allow the server to pass additional
417   information about the response which cannot be placed in the Status-Line.
418   These header fields give information about the server and about
419   further access to the resource identified by the Request-URI.
421<figure><iref primary="true" item="Grammar" subitem="response-header"/><artwork type="abnf2616"><![CDATA[
422  response-header = Accept-Ranges           ; [Part5], Section 5.1
423                  | Age                     ; [Part6], Section 15.1
424                  | ETag                    ; [Part4], Section 6.1
425                  | Location                ; Section 10.4
426                  | Proxy-Authenticate      ; [Part7], Section 3.2
427                  | Retry-After             ; Section 10.7
428                  | Server                  ; Section 10.8
429                  | Vary                    ; [Part6], Section 15.5
430                  | WWW-Authenticate        ; [Part7], Section 3.4
433   Response-header field names can be extended reliably only in
434   combination with a change in the protocol version. However, new or
435   experimental header fields MAY be given the semantics of response-header
436   fields if all parties in the communication recognize them to
437   be response-header fields. Unrecognized header fields are treated as
438   entity-header fields.
442<section title="Entity" anchor="entity">
444   Request and Response messages MAY transfer an entity if not otherwise
445   restricted by the request method or response status code. An entity
446   consists of entity-header fields and an entity-body, although some
447   responses will only include the entity-headers. HTTP entity-body and
448   entity-header fields are defined in <xref target="Part3"/>.
451   An entity-body is only present in a message when a message-body is
452   present, as described in Section 4.3 of <xref target="Part1"/>. The entity-body is obtained
453   from the message-body by decoding any Transfer-Encoding that might
454   have been applied to ensure safe and proper transfer of the message.
459<section title="Method Definitions" anchor="method.definitions">
461   The set of common methods for HTTP/1.1 is defined below. Although
462   this set can be expanded, additional methods cannot be assumed to
463   share the same semantics for separately extended clients and servers.
465   The Host request-header field (Section 8.4 of <xref target="Part1"/>) MUST accompany all
466   HTTP/1.1 requests.
469<section title="Safe and Idempotent Methods" anchor="safe.and.idempotent">
471<section title="Safe Methods" anchor="safe.methods">
473   Implementors should be aware that the software represents the user in
474   their interactions over the Internet, and should be careful to allow
475   the user to be aware of any actions they might take which may have an
476   unexpected significance to themselves or others.
479   In particular, the convention has been established that the GET and
480   HEAD methods SHOULD NOT  have the significance of taking an action
481   other than retrieval. These methods ought to be considered "safe".
482   This allows user agents to represent other methods, such as POST, PUT
483   and DELETE, in a special way, so that the user is made aware of the
484   fact that a possibly unsafe action is being requested.
487   Naturally, it is not possible to ensure that the server does not
488   generate side-effects as a result of performing a GET request; in
489   fact, some dynamic resources consider that a feature. The important
490   distinction here is that the user did not request the side-effects,
491   so therefore cannot be held accountable for them.
495<section title="Idempotent Methods" anchor="idempotent.methods">
497   Methods can also have the property of "idempotence" in that (aside
498   from error or expiration issues) the side-effects of N &gt; 0 identical
499   requests is the same as for a single request. The methods GET, HEAD,
500   PUT and DELETE share this property. Also, the methods OPTIONS and
501   TRACE SHOULD NOT  have side effects, and so are inherently idempotent.
504   However, it is possible that a sequence of several requests is non-idempotent,
505   even if all of the methods executed in that sequence are
506   idempotent. (A sequence is idempotent if a single execution of the
507   entire sequence always yields a result that is not changed by a
508   reexecution of all, or part, of that sequence.) For example, a
509   sequence is non-idempotent if its result depends on a value that is
510   later modified in the same sequence.
513   A sequence that never has side effects is idempotent, by definition
514   (provided that no concurrent operations are being executed on the
515   same set of resources).
520<section title="OPTIONS" anchor="OPTIONS">
521  <iref primary="true" item="OPTIONS method"/>
522  <iref primary="true" item="Methods" subitem="OPTIONS"/>
524   The OPTIONS method represents a request for information about the
525   communication options available on the request/response chain
526   identified by the Request-URI. This method allows the client to
527   determine the options and/or requirements associated with a resource,
528   or the capabilities of a server, without implying a resource action
529   or initiating a resource retrieval.
532   Responses to this method are not cacheable.
535   If the OPTIONS request includes an entity-body (as indicated by the
536   presence of Content-Length or Transfer-Encoding), then the media type
537   MUST be indicated by a Content-Type field. Although this
538   specification does not define any use for such a body, future
539   extensions to HTTP might use the OPTIONS body to make more detailed
540   queries on the server. A server that does not support such an
541   extension MAY discard the request body.
544   If the Request-URI is an asterisk ("*"), the OPTIONS request is
545   intended to apply to the server in general rather than to a specific
546   resource. Since a server's communication options typically depend on
547   the resource, the "*" request is only useful as a "ping" or "no-op"
548   type of method; it does nothing beyond allowing the client to test
549   the capabilities of the server. For example, this can be used to test
550   a proxy for HTTP/1.1 compliance (or lack thereof).
553   If the Request-URI is not an asterisk, the OPTIONS request applies
554   only to the options that are available when communicating with that
555   resource.
558   A 200 response SHOULD include any header fields that indicate
559   optional features implemented by the server and applicable to that
560   resource (e.g., Allow), possibly including extensions not defined by
561   this specification. The response body, if any, SHOULD also include
562   information about the communication options. The format for such a
563   body is not defined by this specification, but might be defined by
564   future extensions to HTTP. Content negotiation MAY be used to select
565   the appropriate response format. If no response body is included, the
566   response MUST include a Content-Length field with a field-value of
567   "0".
570   The Max-Forwards request-header field MAY be used to target a
571   specific proxy in the request chain. When a proxy receives an OPTIONS
572   request on an absoluteURI for which request forwarding is permitted,
573   the proxy MUST check for a Max-Forwards field. If the Max-Forwards
574   field-value is zero ("0"), the proxy MUST NOT forward the message;
575   instead, the proxy SHOULD respond with its own communication options.
576   If the Max-Forwards field-value is an integer greater than zero, the
577   proxy MUST decrement the field-value when it forwards the request. If
578   no Max-Forwards field is present in the request, then the forwarded
579   request MUST NOT include a Max-Forwards field.
583<section title="GET" anchor="GET">
584  <iref primary="true" item="GET method"/>
585  <iref primary="true" item="Methods" subitem="GET"/>
587   The GET method means retrieve whatever information (in the form of an
588   entity) is identified by the Request-URI. If the Request-URI refers
589   to a data-producing process, it is the produced data which shall be
590   returned as the entity in the response and not the source text of the
591   process, unless that text happens to be the output of the process.
594   The semantics of the GET method change to a "conditional GET" if the
595   request message includes an If-Modified-Since, If-Unmodified-Since,
596   If-Match, If-None-Match, or If-Range header field. A conditional GET
597   method requests that the entity be transferred only under the
598   circumstances described by the conditional header field(s). The
599   conditional GET method is intended to reduce unnecessary network
600   usage by allowing cached entities to be refreshed without requiring
601   multiple requests or transferring data already held by the client.
604   The semantics of the GET method change to a "partial GET" if the
605   request message includes a Range header field. A partial GET requests
606   that only part of the entity be transferred, as described in Section 5.4 of <xref target="Part5"/>.
607   The partial GET method is intended to reduce unnecessary
608   network usage by allowing partially-retrieved entities to be
609   completed without transferring data already held by the client.
612   The response to a GET request is cacheable if and only if it meets
613   the requirements for HTTP caching described in <xref target="Part6"/>.
616   See <xref target=""/> for security considerations when used for forms.
620<section title="HEAD" anchor="HEAD">
621  <iref primary="true" item="HEAD method"/>
622  <iref primary="true" item="Methods" subitem="HEAD"/>
624   The HEAD method is identical to GET except that the server MUST NOT
625   return a message-body in the response. The metainformation contained
626   in the HTTP headers in response to a HEAD request SHOULD be identical
627   to the information sent in response to a GET request. This method can
628   be used for obtaining metainformation about the entity implied by the
629   request without transferring the entity-body itself. This method is
630   often used for testing hypertext links for validity, accessibility,
631   and recent modification.
634   The response to a HEAD request MAY be cacheable in the sense that the
635   information contained in the response MAY be used to update a
636   previously cached entity from that resource. If the new field values
637   indicate that the cached entity differs from the current entity (as
638   would be indicated by a change in Content-Length, Content-MD5, ETag
639   or Last-Modified), then the cache MUST treat the cache entry as
640   stale.
644<section title="POST" anchor="POST">
645  <iref primary="true" item="POST method"/>
646  <iref primary="true" item="Methods" subitem="POST"/>
648   The POST method is used to request that the origin server accept the
649   entity enclosed in the request as data to be processed by the resource
650   identified by the Request-URI in the Request-Line. POST is designed
651   to allow a uniform method to cover the following functions:
652  <list style="symbols">
653    <t>
654      Annotation of existing resources;
655    </t>
656    <t>
657        Posting a message to a bulletin board, newsgroup, mailing list,
658        or similar group of articles;
659    </t>
660    <t>
661        Providing a block of data, such as the result of submitting a
662        form, to a data-handling process;
663    </t>
664    <t>
665        Extending a database through an append operation.
666    </t>
667  </list>
670   The actual function performed by the POST method is determined by the
671   server and is usually dependent on the Request-URI.
674   The action performed by the POST method might not result in a
675   resource that can be identified by a URI. In this case, either 200
676   (OK) or 204 (No Content) is the appropriate response status,
677   depending on whether or not the response includes an entity that
678   describes the result.
681   If a resource has been created on the origin server, the response
682   SHOULD be 201 (Created) and contain an entity which describes the
683   status of the request and refers to the new resource, and a Location
684   header (see <xref target="header.location"/>).
687   Responses to this method are not cacheable, unless the response
688   includes appropriate Cache-Control or Expires header fields. However,
689   the 303 (See Other) response can be used to direct the user agent to
690   retrieve a cacheable resource.
694<section title="PUT" anchor="PUT">
695  <iref primary="true" item="PUT method"/>
696  <iref primary="true" item="Methods" subitem="PUT"/>
698   The PUT method requests that the enclosed entity be stored under the
699   supplied Request-URI. If the Request-URI refers to an already
700   existing resource, the enclosed entity SHOULD be considered as a
701   modified version of the one residing on the origin server. If the
702   Request-URI does not point to an existing resource, and that URI is
703   capable of being defined as a new resource by the requesting user
704   agent, the origin server can create the resource with that URI. If a
705   new resource is created, the origin server MUST inform the user agent
706   via the 201 (Created) response. If an existing resource is modified,
707   either the 200 (OK) or 204 (No Content) response codes SHOULD be sent
708   to indicate successful completion of the request. If the resource
709   could not be created or modified with the Request-URI, an appropriate
710   error response SHOULD be given that reflects the nature of the
711   problem. The recipient of the entity MUST NOT ignore any Content-*
712   (e.g. Content-Range) headers that it does not understand or implement
713   and MUST return a 501 (Not Implemented) response in such cases.
716   If the request passes through a cache and the Request-URI identifies
717   one or more currently cached entities, those entries SHOULD be
718   treated as stale. Responses to this method are not cacheable.
721   The fundamental difference between the POST and PUT requests is
722   reflected in the different meaning of the Request-URI. The URI in a
723   POST request identifies the resource that will handle the enclosed
724   entity. That resource might be a data-accepting process, a gateway to
725   some other protocol, or a separate entity that accepts annotations.
726   In contrast, the URI in a PUT request identifies the entity enclosed
727   with the request -- the user agent knows what URI is intended and the
728   server MUST NOT attempt to apply the request to some other resource.
729   If the server desires that the request be applied to a different URI,
730   it MUST send a 301 (Moved Permanently) response; the user agent MAY
731   then make its own decision regarding whether or not to redirect the
732   request.
735   A single resource MAY be identified by many different URIs. For
736   example, an article might have a URI for identifying "the current
737   version" which is separate from the URI identifying each particular
738   version. In this case, a PUT request on a general URI might result in
739   several other URIs being defined by the origin server.
742   HTTP/1.1 does not define how a PUT method affects the state of an
743   origin server.
746   Unless otherwise specified for a particular entity-header, the
747   entity-headers in the PUT request SHOULD be applied to the resource
748   created or modified by the PUT.
752<section title="DELETE" anchor="DELETE">
753  <iref primary="true" item="DELETE method"/>
754  <iref primary="true" item="Methods" subitem="DELETE"/>
756   The DELETE method requests that the origin server delete the resource
757   identified by the Request-URI. This method MAY be overridden by human
758   intervention (or other means) on the origin server. The client cannot
759   be guaranteed that the operation has been carried out, even if the
760   status code returned from the origin server indicates that the action
761   has been completed successfully. However, the server SHOULD NOT
762   indicate success unless, at the time the response is given, it
763   intends to delete the resource or move it to an inaccessible
764   location.
767   A successful response SHOULD be 200 (OK) if the response includes an
768   entity describing the status, 202 (Accepted) if the action has not
769   yet been enacted, or 204 (No Content) if the action has been enacted
770   but the response does not include an entity.
773   If the request passes through a cache and the Request-URI identifies
774   one or more currently cached entities, those entries SHOULD be
775   treated as stale. Responses to this method are not cacheable.
779<section title="TRACE" anchor="TRACE">
780  <iref primary="true" item="TRACE method"/>
781  <iref primary="true" item="Methods" subitem="TRACE"/>
783   The TRACE method is used to invoke a remote, application-layer loop-back
784   of the request message. The final recipient of the request
785   SHOULD reflect the message received back to the client as the
786   entity-body of a 200 (OK) response. The final recipient is either the
787   origin server or the first proxy or gateway to receive a Max-Forwards
788   value of zero (0) in the request (see <xref target="header.max-forwards"/>). A TRACE request
789   MUST NOT include an entity.
792   TRACE allows the client to see what is being received at the other
793   end of the request chain and use that data for testing or diagnostic
794   information. The value of the Via header field (Section 8.9 of <xref target="Part1"/>) is of
795   particular interest, since it acts as a trace of the request chain.
796   Use of the Max-Forwards header field allows the client to limit the
797   length of the request chain, which is useful for testing a chain of
798   proxies forwarding messages in an infinite loop.
801   If the request is valid, the response SHOULD contain the entire
802   request message in the entity-body, with a Content-Type of
803   "message/http". Responses to this method MUST NOT be cached.
807<section title="CONNECT" anchor="CONNECT">
808  <iref primary="true" item="CONNECT method"/>
809  <iref primary="true" item="Methods" subitem="CONNECT"/>
811   This specification reserves the method name CONNECT for use with a
812   proxy that can dynamically switch to being a tunnel (e.g. SSL
813   tunneling <xref target="Luo1998"/>).
819<section title="Status Code Definitions" anchor="">
821   Each Status-Code is described below, including a description of which
822   method(s) it can follow and any metainformation required in the
823   response.
826<section title="Informational 1xx" anchor="status.1xx">
828   This class of status code indicates a provisional response,
829   consisting only of the Status-Line and optional headers, and is
830   terminated by an empty line. There are no required headers for this
831   class of status code. Since HTTP/1.0 did not define any 1xx status
832   codes, servers MUST NOT send a 1xx response to an HTTP/1.0 client
833   except under experimental conditions.
836   A client MUST be prepared to accept one or more 1xx status responses
837   prior to a regular response, even if the client does not expect a 100
838   (Continue) status message. Unexpected 1xx status responses MAY be
839   ignored by a user agent.
842   Proxies MUST forward 1xx responses, unless the connection between the
843   proxy and its client has been closed, or unless the proxy itself
844   requested the generation of the 1xx response. (For example, if a
845   proxy adds a "Expect: 100-continue" field when it forwards a request,
846   then it need not forward the corresponding 100 (Continue)
847   response(s).)
850<section title="100 Continue" anchor="status.100">
851  <iref primary="true" item="100 Continue (status code)"/>
852  <iref primary="true" item="Status Codes" subitem="100 Continue"/>
854   The client SHOULD continue with its request. This interim response is
855   used to inform the client that the initial part of the request has
856   been received and has not yet been rejected by the server. The client
857   SHOULD continue by sending the remainder of the request or, if the
858   request has already been completed, ignore this response. The server
859   MUST send a final response after the request has been completed. See
860   Section 7.2.3 of <xref target="Part1"/> for detailed discussion of the use and handling of this
861   status code.
865<section title="101 Switching Protocols" anchor="status.101">
866  <iref primary="true" item="101 Switching Protocols (status code)"/>
867  <iref primary="true" item="Status Codes" subitem="101 Switching Protocols"/>
869   The server understands and is willing to comply with the client's
870   request, via the Upgrade message header field (Section 5.4 of <xref target="Part5"/>), for a
871   change in the application protocol being used on this connection. The
872   server will switch protocols to those defined by the response's
873   Upgrade header field immediately after the empty line which
874   terminates the 101 response.
877   The protocol SHOULD be switched only when it is advantageous to do
878   so. For example, switching to a newer version of HTTP is advantageous
879   over older versions, and switching to a real-time, synchronous
880   protocol might be advantageous when delivering resources that use
881   such features.
886<section title="Successful 2xx" anchor="status.2xx">
888   This class of status code indicates that the client's request was
889   successfully received, understood, and accepted.
892<section title="200 OK" anchor="status.200">
893  <iref primary="true" item="200 OK (status code)"/>
894  <iref primary="true" item="Status Codes" subitem="200 OK"/>
896   The request has succeeded. The information returned with the response
897   is dependent on the method used in the request, for example:
898  <list style="hanging">
899    <t hangText="GET">
900          an entity corresponding to the requested resource is sent in
901          the response;
902    </t>
903    <t hangText="HEAD">
904          the entity-header fields corresponding to the requested
905          resource are sent in the response without any message-body;
906    </t>
907    <t hangText="POST">
908      an entity describing or containing the result of the action;
909    </t>
910    <t hangText="TRACE">
911      an entity containing the request message as received by the
912      end server.
913    </t>
914  </list>
918<section title="201 Created" anchor="status.201">
919  <iref primary="true" item="201 Created (status code)"/>
920  <iref primary="true" item="Status Codes" subitem="201 Created"/>
922   The request has been fulfilled and resulted in a new resource being
923   created. The newly created resource can be referenced by the URI(s)
924   returned in the entity of the response, with the most specific URI
925   for the resource given by a Location header field. The response
926   SHOULD include an entity containing a list of resource
927   characteristics and location(s) from which the user or user agent can
928   choose the one most appropriate. The entity format is specified by
929   the media type given in the Content-Type header field. The origin
930   server MUST create the resource before returning the 201 status code.
931   If the action cannot be carried out immediately, the server SHOULD
932   respond with 202 (Accepted) response instead.
935   A 201 response MAY contain an ETag response header field indicating
936   the current value of the entity tag for the requested variant just
937   created, see Section 6.1 of <xref target="Part4"/>.
941<section title="202 Accepted" anchor="status.202">
942  <iref primary="true" item="202 Accepted (status code)"/>
943  <iref primary="true" item="Status Codes" subitem="202 Accepted"/>
945   The request has been accepted for processing, but the processing has
946   not been completed.  The request might or might not eventually be
947   acted upon, as it might be disallowed when processing actually takes
948   place. There is no facility for re-sending a status code from an
949   asynchronous operation such as this.
952   The 202 response is intentionally non-committal. Its purpose is to
953   allow a server to accept a request for some other process (perhaps a
954   batch-oriented process that is only run once per day) without
955   requiring that the user agent's connection to the server persist
956   until the process is completed. The entity returned with this
957   response SHOULD include an indication of the request's current status
958   and either a pointer to a status monitor or some estimate of when the
959   user can expect the request to be fulfilled.
963<section title="203 Non-Authoritative Information" anchor="status.203">
964  <iref primary="true" item="203 Non-Authoritative Information (status code)"/>
965  <iref primary="true" item="Status Codes" subitem="203 Non-Authoritative Information"/>
967   The returned metainformation in the entity-header is not the
968   definitive set as available from the origin server, but is gathered
969   from a local or a third-party copy. The set presented MAY be a subset
970   or superset of the original version. For example, including local
971   annotation information about the resource might result in a superset
972   of the metainformation known by the origin server. Use of this
973   response code is not required and is only appropriate when the
974   response would otherwise be 200 (OK).
978<section title="204 No Content" anchor="status.204">
979  <iref primary="true" item="204 No Content (status code)"/>
980  <iref primary="true" item="Status Codes" subitem="204 No Content"/>
982   The server has fulfilled the request but does not need to return an
983   entity-body, and might want to return updated metainformation. The
984   response MAY include new or updated metainformation in the form of
985   entity-headers, which if present SHOULD be associated with the
986   requested variant.
989   If the client is a user agent, it SHOULD NOT  change its document view
990   from that which caused the request to be sent. This response is
991   primarily intended to allow input for actions to take place without
992   causing a change to the user agent's active document view, although
993   any new or updated metainformation SHOULD be applied to the document
994   currently in the user agent's active view.
997   The 204 response MUST NOT include a message-body, and thus is always
998   terminated by the first empty line after the header fields.
1002<section title="205 Reset Content" anchor="status.205">
1003  <iref primary="true" item="205 Reset Content (status code)"/>
1004  <iref primary="true" item="Status Codes" subitem="205 Reset Content"/>
1006   The server has fulfilled the request and the user agent SHOULD reset
1007   the document view which caused the request to be sent. This response
1008   is primarily intended to allow input for actions to take place via
1009   user input, followed by a clearing of the form in which the input is
1010   given so that the user can easily initiate another input action. The
1011   response MUST NOT include an entity.
1015<section title="206 Partial Content" anchor="status.206">
1016  <iref primary="true" item="206 Partial Content (status code)"/>
1017  <iref primary="true" item="Status Codes" subitem="206 Partial Content"/>
1019   The server has fulfilled the partial GET request for the resource
1020   and the enclosed entity is a partial representation as defined in <xref target="Part5"/>.
1025<section title="Redirection 3xx" anchor="status.3xx">
1027   This class of status code indicates that further action needs to be
1028   taken by the user agent in order to fulfill the request.  The action
1029   required MAY be carried out by the user agent without interaction
1030   with the user if and only if the method used in the second request is
1031   GET or HEAD. A client SHOULD detect infinite redirection loops, since
1032   such loops generate network traffic for each redirection.
1033  <list><t>
1034      Note: previous versions of this specification recommended a
1035      maximum of five redirections. Content developers should be aware
1036      that there might be clients that implement such a fixed
1037      limitation.
1038  </t></list>
1041<section title="300 Multiple Choices" anchor="status.300">
1042  <iref primary="true" item="300 Multiple Choices (status code)"/>
1043  <iref primary="true" item="Status Codes" subitem="300 Multiple Choices"/>
1045   The requested resource corresponds to any one of a set of
1046   representations, each with its own specific location, and agent-driven
1047   negotiation information (Section 4 of <xref target="Part3"/>) is being provided so that
1048   the user (or user agent) can select a preferred representation and
1049   redirect its request to that location.
1052   Unless it was a HEAD request, the response SHOULD include an entity
1053   containing a list of resource characteristics and location(s) from
1054   which the user or user agent can choose the one most appropriate. The
1055   entity format is specified by the media type given in the Content-Type
1056   header field. Depending upon the format and the capabilities of
1057   the user agent, selection of the most appropriate choice MAY be
1058   performed automatically. However, this specification does not define
1059   any standard for such automatic selection.
1062   If the server has a preferred choice of representation, it SHOULD
1063   include the specific URI for that representation in the Location
1064   field; user agents MAY use the Location field value for automatic
1065   redirection. This response is cacheable unless indicated otherwise.
1069<section title="301 Moved Permanently" anchor="status.301">
1070  <iref primary="true" item="301 Moved Permanently (status code)"/>
1071  <iref primary="true" item="Status Codes" subitem="301 Moved Permanently"/>
1073   The requested resource has been assigned a new permanent URI and any
1074   future references to this resource SHOULD use one of the returned
1075   URIs.  Clients with link editing capabilities ought to automatically
1076   re-link references to the Request-URI to one or more of the new
1077   references returned by the server, where possible. This response is
1078   cacheable unless indicated otherwise.
1081   The new permanent URI SHOULD be given by the Location field in the
1082   response. Unless the request method was HEAD, the entity of the
1083   response SHOULD contain a short hypertext note with a hyperlink to
1084   the new URI(s).
1087   If the 301 status code is received in response to a request method
1088   that is known to be "safe", as defined in <xref target="safe.methods"/>,
1089   then the request MAY be automatically redirected by the user agent without
1090   confirmation.  Otherwise, the user agent MUST NOT automatically redirect the
1091   request unless it can be confirmed by the user, since this might
1092   change the conditions under which the request was issued.
1093  <list><t>
1094      Note: When automatically redirecting a POST request after
1095      receiving a 301 status code, some existing HTTP/1.0 user agents
1096      will erroneously change it into a GET request.
1097  </t></list>
1101<section title="302 Found" anchor="status.302">
1102  <iref primary="true" item="302 Found (status code)"/>
1103  <iref primary="true" item="Status Codes" subitem="302 Found"/>
1105   The requested resource resides temporarily under a different URI.
1106   Since the redirection might be altered on occasion, the client SHOULD
1107   continue to use the Request-URI for future requests.  This response
1108   is only cacheable if indicated by a Cache-Control or Expires header
1109   field.
1112   The temporary URI SHOULD be given by the Location field in the
1113   response. Unless the request method was HEAD, the entity of the
1114   response SHOULD contain a short hypertext note with a hyperlink to
1115   the new URI(s).
1118   If the 302 status code is received in response to a request method
1119   that is known to be "safe", as defined in <xref target="safe.methods"/>,
1120   then the request MAY be automatically redirected by the user agent without
1121   confirmation.  Otherwise, the user agent MUST NOT automatically redirect the
1122   request unless it can be confirmed by the user, since this might
1123   change the conditions under which the request was issued.
1124  <list><t>
1125      Note: <xref target="RFC1945"/> and <xref target="RFC2068"/> specify that the client is not allowed
1126      to change the method on the redirected request.  However, most
1127      existing user agent implementations treat 302 as if it were a 303
1128      response, performing a GET on the Location field-value regardless
1129      of the original request method. The status codes 303 and 307 have
1130      been added for servers that wish to make unambiguously clear which
1131      kind of reaction is expected of the client.
1132  </t></list>
1136<section title="303 See Other" anchor="status.303">
1137  <iref primary="true" item="303 See Other (status code)"/>
1138  <iref primary="true" item="Status Codes" subitem="303 See Other"/>
1140   The response to the request can be found under a different URI and
1141   SHOULD be retrieved using a GET method on that resource. This method
1142   exists primarily to allow the output of a POST-activated script to
1143   redirect the user agent to a selected resource. The new URI is not a
1144   substitute reference for the originally requested resource. The 303
1145   response MUST NOT be cached, but the response to the second
1146   (redirected) request might be cacheable.
1149   The different URI SHOULD be given by the Location field in the
1150   response. Unless the request method was HEAD, the entity of the
1151   response SHOULD contain a short hypertext note with a hyperlink to
1152   the new URI(s).
1153  <list><t>
1154      Note: Many pre-HTTP/1.1 user agents do not understand the 303
1155      status. When interoperability with such clients is a concern, the
1156      302 status code may be used instead, since most user agents react
1157      to a 302 response as described here for 303.
1158  </t></list>
1162<section title="304 Not Modified" anchor="status.304">
1163  <iref primary="true" item="304 Not Modified (status code)"/>
1164  <iref primary="true" item="Status Codes" subitem="304 Not Modified"/>
1166   The response to the request has not been modified since the conditions
1167   indicated by the client's conditional GET request, as defined in <xref target="Part4"/>.
1171<section title="305 Use Proxy" anchor="status.305">
1172  <iref primary="true" item="305 Use Proxy (status code)"/>
1173  <iref primary="true" item="Status Codes" subitem="305 Use Proxy"/>
1175   The requested resource MUST be accessed through the proxy given by
1176   the Location field. The Location field gives the URI of the proxy.
1177   The recipient is expected to repeat this single request via the
1178   proxy. 305 responses MUST only be generated by origin servers.
1179  <list><t>
1180      Note: <xref target="RFC2068"/> was not clear that 305 was intended to redirect a
1181      single request, and to be generated by origin servers only.  Not
1182      observing these limitations has significant security consequences.
1183  </t></list>
1187<section title="306 (Unused)" anchor="status.306">
1188  <iref primary="true" item="306 (Unused) (status code)"/>
1189  <iref primary="true" item="Status Codes" subitem="306 (Unused)"/>
1191   The 306 status code was used in a previous version of the
1192   specification, is no longer used, and the code is reserved.
1196<section title="307 Temporary Redirect" anchor="status.307">
1197  <iref primary="true" item="307 Temporary Redirect (status code)"/>
1198  <iref primary="true" item="Status Codes" subitem="307 Temporary Redirect"/>
1200   The requested resource resides temporarily under a different URI.
1201   Since the redirection MAY be altered on occasion, the client SHOULD
1202   continue to use the Request-URI for future requests.  This response
1203   is only cacheable if indicated by a Cache-Control or Expires header
1204   field.
1207   The temporary URI SHOULD be given by the Location field in the
1208   response. Unless the request method was HEAD, the entity of the
1209   response SHOULD contain a short hypertext note with a hyperlink to
1210   the new URI(s) , since many pre-HTTP/1.1 user agents do not
1211   understand the 307 status. Therefore, the note SHOULD contain the
1212   information necessary for a user to repeat the original request on
1213   the new URI.
1216   If the 307 status code is received in response to a request method
1217   that is known to be "safe", as defined in <xref target="safe.methods"/>,
1218   then the request MAY be automatically redirected by the user agent without
1219   confirmation.  Otherwise, the user agent MUST NOT automatically redirect the
1220   request unless it can be confirmed by the user, since this might
1221   change the conditions under which the request was issued.
1226<section title="Client Error 4xx" anchor="status.4xx">
1228   The 4xx class of status code is intended for cases in which the
1229   client seems to have erred. Except when responding to a HEAD request,
1230   the server SHOULD include an entity containing an explanation of the
1231   error situation, and whether it is a temporary or permanent
1232   condition. These status codes are applicable to any request method.
1233   User agents SHOULD display any included entity to the user.
1236   If the client is sending data, a server implementation using TCP
1237   SHOULD be careful to ensure that the client acknowledges receipt of
1238   the packet(s) containing the response, before the server closes the
1239   input connection. If the client continues sending data to the server
1240   after the close, the server's TCP stack will send a reset packet to
1241   the client, which may erase the client's unacknowledged input buffers
1242   before they can be read and interpreted by the HTTP application.
1245<section title="400 Bad Request" anchor="status.400">
1246  <iref primary="true" item="400 Bad Request (status code)"/>
1247  <iref primary="true" item="Status Codes" subitem="400 Bad Request"/>
1249   The request could not be understood by the server due to malformed
1250   syntax. The client SHOULD NOT  repeat the request without
1251   modifications.
1255<section title="401 Unauthorized" anchor="status.401">
1256  <iref primary="true" item="401 Unauthorized (status code)"/>
1257  <iref primary="true" item="Status Codes" subitem="401 Unauthorized"/>
1259   The request requires user authentication (see <xref target="Part7"/>).
1263<section title="402 Payment Required" anchor="status.402">
1264  <iref primary="true" item="402 Payment Required (status code)"/>
1265  <iref primary="true" item="Status Codes" subitem="402 Payment Required"/>
1267   This code is reserved for future use.
1271<section title="403 Forbidden" anchor="status.403">
1272  <iref primary="true" item="403 Forbidden (status code)"/>
1273  <iref primary="true" item="Status Codes" subitem="403 Forbidden"/>
1275   The server understood the request, but is refusing to fulfill it.
1276   Authorization will not help and the request SHOULD NOT  be repeated.
1277   If the request method was not HEAD and the server wishes to make
1278   public why the request has not been fulfilled, it SHOULD describe the
1279   reason for the refusal in the entity.  If the server does not wish to
1280   make this information available to the client, the status code 404
1281   (Not Found) can be used instead.
1285<section title="404 Not Found" anchor="status.404">
1286  <iref primary="true" item="404 Not Found (status code)"/>
1287  <iref primary="true" item="Status Codes" subitem="404 Not Found"/>
1289   The server has not found anything matching the Request-URI. No
1290   indication is given of whether the condition is temporary or
1291   permanent. The 410 (Gone) status code SHOULD be used if the server
1292   knows, through some internally configurable mechanism, that an old
1293   resource is permanently unavailable and has no forwarding address.
1294   This status code is commonly used when the server does not wish to
1295   reveal exactly why the request has been refused, or when no other
1296   response is applicable.
1300<section title="405 Method Not Allowed" anchor="status.405">
1301  <iref primary="true" item="405 Method Not Allowed (status code)"/>
1302  <iref primary="true" item="Status Codes" subitem="405 Method Not Allowed"/>
1304   The method specified in the Request-Line is not allowed for the
1305   resource identified by the Request-URI. The response MUST include an
1306   Allow header containing a list of valid methods for the requested
1307   resource.
1311<section title="406 Not Acceptable" anchor="status.406">
1312  <iref primary="true" item="406 Not Acceptable (status code)"/>
1313  <iref primary="true" item="Status Codes" subitem="406 Not Acceptable"/>
1315   The resource identified by the request is only capable of generating
1316   response entities which have content characteristics not acceptable
1317   according to the accept headers sent in the request.
1320   Unless it was a HEAD request, the response SHOULD include an entity
1321   containing a list of available entity characteristics and location(s)
1322   from which the user or user agent can choose the one most
1323   appropriate. The entity format is specified by the media type given
1324   in the Content-Type header field. Depending upon the format and the
1325   capabilities of the user agent, selection of the most appropriate
1326   choice MAY be performed automatically. However, this specification
1327   does not define any standard for such automatic selection.
1328  <list><t>
1329      Note: HTTP/1.1 servers are allowed to return responses which are
1330      not acceptable according to the accept headers sent in the
1331      request. In some cases, this may even be preferable to sending a
1332      406 response. User agents are encouraged to inspect the headers of
1333      an incoming response to determine if it is acceptable.
1334  </t></list>
1337   If the response could be unacceptable, a user agent SHOULD
1338   temporarily stop receipt of more data and query the user for a
1339   decision on further actions.
1343<section title="407 Proxy Authentication Required" anchor="status.407">
1344  <iref primary="true" item="407 Proxy Authentication Required (status code)"/>
1345  <iref primary="true" item="Status Codes" subitem="407 Proxy Authentication Required"/>
1347   This code is similar to 401 (Unauthorized), but indicates that the
1348   client must first authenticate itself with the proxy (see <xref target="Part7"/>).
1352<section title="408 Request Timeout" anchor="status.408">
1353  <iref primary="true" item="408 Request Timeout (status code)"/>
1354  <iref primary="true" item="Status Codes" subitem="408 Request Timeout"/>
1356   The client did not produce a request within the time that the server
1357   was prepared to wait. The client MAY repeat the request without
1358   modifications at any later time.
1362<section title="409 Conflict" anchor="status.409">
1363  <iref primary="true" item="409 Conflict (status code)"/>
1364  <iref primary="true" item="Status Codes" subitem="409 Conflict"/>
1366   The request could not be completed due to a conflict with the current
1367   state of the resource. This code is only allowed in situations where
1368   it is expected that the user might be able to resolve the conflict
1369   and resubmit the request. The response body SHOULD include enough
1370   information for the user to recognize the source of the conflict.
1371   Ideally, the response entity would include enough information for the
1372   user or user agent to fix the problem; however, that might not be
1373   possible and is not required.
1376   Conflicts are most likely to occur in response to a PUT request. For
1377   example, if versioning were being used and the entity being PUT
1378   included changes to a resource which conflict with those made by an
1379   earlier (third-party) request, the server might use the 409 response
1380   to indicate that it can't complete the request. In this case, the
1381   response entity would likely contain a list of the differences
1382   between the two versions in a format defined by the response
1383   Content-Type.
1387<section title="410 Gone" anchor="status.410">
1388  <iref primary="true" item="410 Gone (status code)"/>
1389  <iref primary="true" item="Status Codes" subitem="410 Gone"/>
1391   The requested resource is no longer available at the server and no
1392   forwarding address is known. This condition is expected to be
1393   considered permanent. Clients with link editing capabilities SHOULD
1394   delete references to the Request-URI after user approval. If the
1395   server does not know, or has no facility to determine, whether or not
1396   the condition is permanent, the status code 404 (Not Found) SHOULD be
1397   used instead. This response is cacheable unless indicated otherwise.
1400   The 410 response is primarily intended to assist the task of web
1401   maintenance by notifying the recipient that the resource is
1402   intentionally unavailable and that the server owners desire that
1403   remote links to that resource be removed. Such an event is common for
1404   limited-time, promotional services and for resources belonging to
1405   individuals no longer working at the server's site. It is not
1406   necessary to mark all permanently unavailable resources as "gone" or
1407   to keep the mark for any length of time -- that is left to the
1408   discretion of the server owner.
1412<section title="411 Length Required" anchor="status.411">
1413  <iref primary="true" item="411 Length Required (status code)"/>
1414  <iref primary="true" item="Status Codes" subitem="411 Length Required"/>
1416   The server refuses to accept the request without a defined Content-Length.
1417   The client MAY repeat the request if it adds a valid
1418   Content-Length header field containing the length of the message-body
1419   in the request message.
1423<section title="412 Precondition Failed" anchor="status.412">
1424  <iref primary="true" item="412 Precondition Failed (status code)"/>
1425  <iref primary="true" item="Status Codes" subitem="412 Precondition Failed"/>
1427   The precondition given in one or more of the request-header fields
1428   evaluated to false when it was tested on the server, as defined in
1429   <xref target="Part4"/>.
1433<section title="413 Request Entity Too Large" anchor="status.413">
1434  <iref primary="true" item="413 Request Entity Too Large (status code)"/>
1435  <iref primary="true" item="Status Codes" subitem="413 Request Entity Too Large"/>
1437   The server is refusing to process a request because the request
1438   entity is larger than the server is willing or able to process. The
1439   server MAY close the connection to prevent the client from continuing
1440   the request.
1443   If the condition is temporary, the server SHOULD include a Retry-After
1444   header field to indicate that it is temporary and after what
1445   time the client MAY try again.
1449<section title="414 Request-URI Too Long" anchor="status.414">
1450  <iref primary="true" item="414 Request-URI Too Long (status code)"/>
1451  <iref primary="true" item="Status Codes" subitem="414 Request-URI Too Long"/>
1453   The server is refusing to service the request because the Request-URI
1454   is longer than the server is willing to interpret. This rare
1455   condition is only likely to occur when a client has improperly
1456   converted a POST request to a GET request with long query
1457   information, when the client has descended into a URI "black hole" of
1458   redirection (e.g., a redirected URI prefix that points to a suffix of
1459   itself), or when the server is under attack by a client attempting to
1460   exploit security holes present in some servers using fixed-length
1461   buffers for reading or manipulating the Request-URI.
1465<section title="415 Unsupported Media Type" anchor="status.415">
1466  <iref primary="true" item="415 Unsupported Media Type (status code)"/>
1467  <iref primary="true" item="Status Codes" subitem="415 Unsupported Media Type"/>
1469   The server is refusing to service the request because the entity of
1470   the request is in a format not supported by the requested resource
1471   for the requested method.
1475<section title="416 Requested Range Not Satisfiable" anchor="status.416">
1476  <iref primary="true" item="416 Requested Range Not Satisfiable (status code)"/>
1477  <iref primary="true" item="Status Codes" subitem="416 Requested Range Not Satisfiable"/>
1479   The request included a Range request-header field (Section 5.4 of <xref target="Part5"/>) and none of
1480   the range-specifier values in this field overlap the current extent
1481   of the selected resource.
1485<section title="417 Expectation Failed" anchor="status.417">
1486  <iref primary="true" item="417 Expectation Failed (status code)"/>
1487  <iref primary="true" item="Status Codes" subitem="417 Expectation Failed"/>
1489   The expectation given in an Expect request-header field (see <xref target="header.expect"/>)
1490   could not be met by this server, or, if the server is a proxy,
1491   the server has unambiguous evidence that the request could not be met
1492   by the next-hop server.
1497<section title="Server Error 5xx" anchor="status.5xx">
1499   Response status codes beginning with the digit "5" indicate cases in
1500   which the server is aware that it has erred or is incapable of
1501   performing the request. Except when responding to a HEAD request, the
1502   server SHOULD include an entity containing an explanation of the
1503   error situation, and whether it is a temporary or permanent
1504   condition. User agents SHOULD display any included entity to the
1505   user. These response codes are applicable to any request method.
1508<section title="500 Internal Server Error" anchor="status.500">
1509  <iref primary="true" item="500 Internal Server Error (status code)"/>
1510  <iref primary="true" item="Status Codes" subitem="500 Internal Server Error"/>
1512   The server encountered an unexpected condition which prevented it
1513   from fulfilling the request.
1517<section title="501 Not Implemented" anchor="status.501">
1518  <iref primary="true" item="501 Not Implemented (status code)"/>
1519  <iref primary="true" item="Status Codes" subitem="501 Not Implemented"/>
1521   The server does not support the functionality required to fulfill the
1522   request. This is the appropriate response when the server does not
1523   recognize the request method and is not capable of supporting it for
1524   any resource.
1528<section title="502 Bad Gateway" anchor="status.502">
1529  <iref primary="true" item="502 Bad Gateway (status code)"/>
1530  <iref primary="true" item="Status Codes" subitem="502 Bad Gateway"/>
1532   The server, while acting as a gateway or proxy, received an invalid
1533   response from the upstream server it accessed in attempting to
1534   fulfill the request.
1538<section title="503 Service Unavailable" anchor="status.503">
1539  <iref primary="true" item="503 Service Unavailable (status code)"/>
1540  <iref primary="true" item="Status Codes" subitem="503 Service Unavailable"/>
1542   The server is currently unable to handle the request due to a
1543   temporary overloading or maintenance of the server. The implication
1544   is that this is a temporary condition which will be alleviated after
1545   some delay. If known, the length of the delay MAY be indicated in a
1546   Retry-After header. If no Retry-After is given, the client SHOULD
1547   handle the response as it would for a 500 response.
1548  <list><t>
1549      Note: The existence of the 503 status code does not imply that a
1550      server must use it when becoming overloaded. Some servers may wish
1551      to simply refuse the connection.
1552  </t></list>
1556<section title="504 Gateway Timeout" anchor="status.504">
1557  <iref primary="true" item="504 Gateway Timeout (status code)"/>
1558  <iref primary="true" item="Status Codes" subitem="504 Gateway Timeout"/>
1560   The server, while acting as a gateway or proxy, did not receive a
1561   timely response from the upstream server specified by the URI (e.g.
1562   HTTP, FTP, LDAP) or some other auxiliary server (e.g. DNS) it needed
1563   to access in attempting to complete the request.
1564  <list><t>
1565      Note: Note to implementors: some deployed proxies are known to
1566      return 400 or 500 when DNS lookups time out.
1567  </t></list>
1571<section title="505 HTTP Version Not Supported" anchor="status.505">
1572  <iref primary="true" item="505 HTTP Version Not Supported (status code)"/>
1573  <iref primary="true" item="Status Codes" subitem="505 HTTP Version Not Supported"/>
1575   The server does not support, or refuses to support, the HTTP protocol
1576   version that was used in the request message. The server is
1577   indicating that it is unable or unwilling to complete the request
1578   using the same major version as the client, as described in Section 3.1 of <xref target="Part1"/>,
1579   other than with this error message. The response SHOULD contain
1580   an entity describing why that version is not supported and what other
1581   protocols are supported by that server.
1589<section title="Header Field Definitions" anchor="header.fields">
1591   This section defines the syntax and semantics of HTTP/1.1 header fields
1592   related to request and response semantics.
1595   For entity-header fields, both sender and recipient refer to either the
1596   client or the server, depending on who sends and who receives the entity.
1599<section title="Allow" anchor="header.allow">
1600  <iref primary="true" item="Allow header"/>
1601  <iref primary="true" item="Headers" subitem="Allow"/>
1603      The Allow entity-header field lists the set of methods supported
1604      by the resource identified by the Request-URI. The purpose of this
1605      field is strictly to inform the recipient of valid methods
1606      associated with the resource. An Allow header field MUST be
1607      present in a 405 (Method Not Allowed) response.
1609<figure><iref primary="true" item="Grammar" subitem="Allow"/><artwork type="abnf2616"><![CDATA[
1610  Allow   = "Allow" ":" #Method
1613      Example of use:
1615<figure><artwork type="example"><![CDATA[
1616       Allow: GET, HEAD, PUT
1619      This field cannot prevent a client from trying other methods.
1620      However, the indications given by the Allow header field value
1621      SHOULD be followed. The actual set of allowed methods is defined
1622      by the origin server at the time of each request.
1625      The Allow header field MAY be provided with a PUT request to
1626      recommend the methods to be supported by the new or modified
1627      resource. The server is not required to support these methods and
1628      SHOULD include an Allow header in the response giving the actual
1629      supported methods.
1632      A proxy MUST NOT modify the Allow header field even if it does not
1633      understand all the methods specified, since the user agent might
1634      have other means of communicating with the origin server.
1638<section title="Expect" anchor="header.expect">
1639  <iref primary="true" item="Expect header"/>
1640  <iref primary="true" item="Headers" subitem="Expect"/>
1642   The Expect request-header field is used to indicate that particular
1643   server behaviors are required by the client.
1645<figure><iref primary="true" item="Grammar" subitem="Expect"/><iref primary="true" item="Grammar" subitem="expectation"/><iref primary="true" item="Grammar" subitem="expectation-extension"/><iref primary="true" item="Grammar" subitem="expect-params"/><artwork type="abnf2616"><![CDATA[
1646  Expect       =  "Expect" ":" 1#expectation
1648  expectation  =  "100-continue" | expectation-extension
1649  expectation-extension =  token [ "=" ( token | quoted-string )
1650                           *expect-params ]
1651  expect-params =  ";" token [ "=" ( token | quoted-string ) ]
1654   A server that does not understand or is unable to comply with any of
1655   the expectation values in the Expect field of a request MUST respond
1656   with appropriate error status. The server MUST respond with a 417
1657   (Expectation Failed) status if any of the expectations cannot be met
1658   or, if there are other problems with the request, some other 4xx
1659   status.
1662   This header field is defined with extensible syntax to allow for
1663   future extensions. If a server receives a request containing an
1664   Expect field that includes an expectation-extension that it does not
1665   support, it MUST respond with a 417 (Expectation Failed) status.
1668   Comparison of expectation values is case-insensitive for unquoted
1669   tokens (including the 100-continue token), and is case-sensitive for
1670   quoted-string expectation-extensions.
1673   The Expect mechanism is hop-by-hop: that is, an HTTP/1.1 proxy MUST
1674   return a 417 (Expectation Failed) status if it receives a request
1675   with an expectation that it cannot meet. However, the Expect
1676   request-header itself is end-to-end; it MUST be forwarded if the
1677   request is forwarded.
1680   Many older HTTP/1.0 and HTTP/1.1 applications do not understand the
1681   Expect header.
1684   See Section 7.2.3 of <xref target="Part1"/> for the use of the 100 (Continue) status.
1688<section title="From" anchor="header.from">
1689  <iref primary="true" item="From header"/>
1690  <iref primary="true" item="Headers" subitem="From"/>
1692   The From request-header field, if given, SHOULD contain an Internet
1693   e-mail address for the human user who controls the requesting user
1694   agent. The address SHOULD be machine-usable, as defined by "mailbox"
1695   in Section 3.4 of <xref target="RFC2822"/>:
1697<figure><iref primary="true" item="Grammar" subitem="From"/><artwork type="abnf2616"><![CDATA[
1698  From   = "From" ":" mailbox
1701   An example is:
1703<figure><artwork type="example"><![CDATA[
1704    From:
1707   This header field MAY be used for logging purposes and as a means for
1708   identifying the source of invalid or unwanted requests. It SHOULD NOT
1709   be used as an insecure form of access protection. The interpretation
1710   of this field is that the request is being performed on behalf of the
1711   person given, who accepts responsibility for the method performed. In
1712   particular, robot agents SHOULD include this header so that the
1713   person responsible for running the robot can be contacted if problems
1714   occur on the receiving end.
1717   The Internet e-mail address in this field MAY be separate from the
1718   Internet host which issued the request. For example, when a request
1719   is passed through a proxy the original issuer's address SHOULD be
1720   used.
1723   The client SHOULD NOT  send the From header field without the user's
1724   approval, as it might conflict with the user's privacy interests or
1725   their site's security policy. It is strongly recommended that the
1726   user be able to disable, enable, and modify the value of this field
1727   at any time prior to a request.
1731<section title="Location" anchor="header.location">
1732  <iref primary="true" item="Location header"/>
1733  <iref primary="true" item="Headers" subitem="Location"/>
1735   The Location response-header field is used to redirect the recipient
1736   to a location other than the Request-URI for completion of the
1737   request or identification of a new resource. For 201 (Created)
1738   responses, the Location is that of the new resource which was created
1739   by the request. For 3xx responses, the location SHOULD indicate the
1740   server's preferred URI for automatic redirection to the resource. The
1741   field value consists of a single absolute URI.
1743<figure><iref primary="true" item="Grammar" subitem="Location"/><artwork type="abnf2616"><![CDATA[
1744  Location       = "Location" ":" absoluteURI [ "#" fragment ]
1747   An example is:
1749<figure><artwork type="example"><![CDATA[
1750    Location:
1753  <list><t>
1754      Note: The Content-Location header field (Section 5.7 of <xref target="Part3"/>) differs
1755      from Location in that the Content-Location identifies the original
1756      location of the entity enclosed in the request. It is therefore
1757      possible for a response to contain header fields for both Location
1758      and Content-Location.
1759  </t></list>
1762   There are circumstances in which a fragment identifier in a Location URL would not be appropriate:
1763   <list style="symbols">
1764      <t>With a 201 Created response, because in this usage the Location header specifies the URL for the entire created resource.</t>
1765      <t>With a 300 Multiple Choices, since the choice decision is intended to be made on resource characteristics and not fragment characteristics.</t>
1766      <t>With 305 Use Proxy.</t>
1767   </list>
1771<section title="Max-Forwards" anchor="header.max-forwards">
1772  <iref primary="true" item="Max-Forwards header"/>
1773  <iref primary="true" item="Headers" subitem="Max-Forwards"/>
1775   The Max-Forwards request-header field provides a mechanism with the
1776   TRACE (<xref target="TRACE"/>) and OPTIONS (<xref target="OPTIONS"/>) methods to limit the
1777   number of proxies or gateways that can forward the request to the
1778   next inbound server. This can be useful when the client is attempting
1779   to trace a request chain which appears to be failing or looping in
1780   mid-chain.
1782<figure><iref primary="true" item="Grammar" subitem="Max-Forwards"/><artwork type="abnf2616"><![CDATA[
1783  Max-Forwards   = "Max-Forwards" ":" 1*DIGIT
1786   The Max-Forwards value is a decimal integer indicating the remaining
1787   number of times this request message may be forwarded.
1790   Each proxy or gateway recipient of a TRACE or OPTIONS request
1791   containing a Max-Forwards header field MUST check and update its
1792   value prior to forwarding the request. If the received value is zero
1793   (0), the recipient MUST NOT forward the request; instead, it MUST
1794   respond as the final recipient. If the received Max-Forwards value is
1795   greater than zero, then the forwarded message MUST contain an updated
1796   Max-Forwards field with a value decremented by one (1).
1799   The Max-Forwards header field MAY be ignored for all other methods
1800   defined by this specification and for any extension methods for which
1801   it is not explicitly referred to as part of that method definition.
1805<section title="Referer" anchor="header.referer">
1806  <iref primary="true" item="Referer header"/>
1807  <iref primary="true" item="Headers" subitem="Referer"/>
1809   The Referer[sic] request-header field allows the client to specify,
1810   for the server's benefit, the address (URI) of the resource from
1811   which the Request-URI was obtained (the "referrer", although the
1812   header field is misspelled.) The Referer request-header allows a
1813   server to generate lists of back-links to resources for interest,
1814   logging, optimized caching, etc. It also allows obsolete or mistyped
1815   links to be traced for maintenance. The Referer field MUST NOT be
1816   sent if the Request-URI was obtained from a source that does not have
1817   its own URI, such as input from the user keyboard.
1819<figure><iref primary="true" item="Grammar" subitem="Referer"/><artwork type="abnf2616"><![CDATA[
1820  Referer        = "Referer" ":" ( absoluteURI | relativeURI )
1823   Example:
1825<figure><artwork type="example"><![CDATA[
1826    Referer:
1829   If the field value is a relative URI, it SHOULD be interpreted
1830   relative to the Request-URI. The URI MUST NOT include a fragment. See
1831   <xref target=""/> for security considerations.
1835<section title="Retry-After" anchor="header.retry-after">
1836  <iref primary="true" item="Retry-After header"/>
1837  <iref primary="true" item="Headers" subitem="Retry-After"/>
1839   The Retry-After response-header field can be used with a 503 (Service
1840   Unavailable) response to indicate how long the service is expected to
1841   be unavailable to the requesting client. This field MAY also be used
1842   with any 3xx (Redirection) response to indicate the minimum time the
1843   user-agent is asked wait before issuing the redirected request. The
1844   value of this field can be either an HTTP-date or an integer number
1845   of seconds (in decimal) after the time of the response.
1847<figure><iref primary="true" item="Grammar" subitem="Retry-After"/><artwork type="abnf2616"><![CDATA[
1848  Retry-After  = "Retry-After" ":" ( HTTP-date | delta-seconds )
1851   Two examples of its use are
1853<figure><artwork type="example"><![CDATA[
1854    Retry-After: Fri, 31 Dec 1999 23:59:59 GMT
1855    Retry-After: 120
1858   In the latter example, the delay is 2 minutes.
1862<section title="Server" anchor="header.server">
1863  <iref primary="true" item="Server header"/>
1864  <iref primary="true" item="Headers" subitem="Server"/>
1866   The Server response-header field contains information about the
1867   software used by the origin server to handle the request. The field
1868   can contain multiple product tokens (<xref target="product.tokens"/>) and comments
1869   identifying the server and any significant subproducts. The product
1870   tokens are listed in order of their significance for identifying the
1871   application.
1873<figure><iref primary="true" item="Grammar" subitem="Server"/><artwork type="abnf2616"><![CDATA[
1874  Server         = "Server" ":" 1*( product | comment )
1877   Example:
1879<figure><artwork type="example"><![CDATA[
1880    Server: CERN/3.0 libwww/2.17
1883   If the response is being forwarded through a proxy, the proxy
1884   application MUST NOT modify the Server response-header. Instead, it
1885   MUST include a Via field (as described in Section 8.9 of <xref target="Part1"/>).
1886  <list><t>
1887      Note: Revealing the specific software version of the server might
1888      allow the server machine to become more vulnerable to attacks
1889      against software that is known to contain security holes. Server
1890      implementors are encouraged to make this field a configurable
1891      option.
1892  </t></list>
1896<section title="User-Agent" anchor="header.user-agent">
1897  <iref primary="true" item="User-Agent header"/>
1898  <iref primary="true" item="Headers" subitem="User-Agent"/>
1900   The User-Agent request-header field contains information about the
1901   user agent originating the request. This is for statistical purposes,
1902   the tracing of protocol violations, and automated recognition of user
1903   agents for the sake of tailoring responses to avoid particular user
1904   agent limitations. User agents SHOULD include this field with
1905   requests. The field can contain multiple product tokens (<xref target="product.tokens"/>)
1906   and comments identifying the agent and any subproducts which form a
1907   significant part of the user agent. By convention, the product tokens
1908   are listed in order of their significance for identifying the
1909   application.
1911<figure><iref primary="true" item="Grammar" subitem="User-Agent"/><artwork type="abnf2616"><![CDATA[
1912  User-Agent     = "User-Agent" ":" 1*( product | comment )
1915   Example:
1917<figure><artwork type="example"><![CDATA[
1918    User-Agent: CERN-LineMode/2.15 libwww/2.17b3
1924<section title="IANA Considerations" anchor="IANA.considerations">
1926   TBD.
1930<section title="Security Considerations" anchor="security.considerations">
1932   This section is meant to inform application developers, information
1933   providers, and users of the security limitations in HTTP/1.1 as
1934   described by this document. The discussion does not include
1935   definitive solutions to the problems revealed, though it does make
1936   some suggestions for reducing security risks.
1939<section title="Transfer of Sensitive Information" anchor="security.sensitive">
1941   Like any generic data transfer protocol, HTTP cannot regulate the
1942   content of the data that is transferred, nor is there any a priori
1943   method of determining the sensitivity of any particular piece of
1944   information within the context of any given request. Therefore,
1945   applications SHOULD supply as much control over this information as
1946   possible to the provider of that information. Four header fields are
1947   worth special mention in this context: Server, Via, Referer and From.
1950   Revealing the specific software version of the server might allow the
1951   server machine to become more vulnerable to attacks against software
1952   that is known to contain security holes. Implementors SHOULD make the
1953   Server header field a configurable option.
1956   Proxies which serve as a portal through a network firewall SHOULD
1957   take special precautions regarding the transfer of header information
1958   that identifies the hosts behind the firewall. In particular, they
1959   SHOULD remove, or replace with sanitized versions, any Via fields
1960   generated behind the firewall.
1963   The Referer header allows reading patterns to be studied and reverse
1964   links drawn. Although it can be very useful, its power can be abused
1965   if user details are not separated from the information contained in
1966   the Referer. Even when the personal information has been removed, the
1967   Referer header might indicate a private document's URI whose
1968   publication would be inappropriate.
1971   The information sent in the From field might conflict with the user's
1972   privacy interests or their site's security policy, and hence it
1973   SHOULD NOT  be transmitted without the user being able to disable,
1974   enable, and modify the contents of the field. The user MUST be able
1975   to set the contents of this field within a user preference or
1976   application defaults configuration.
1979   We suggest, though do not require, that a convenient toggle interface
1980   be provided for the user to enable or disable the sending of From and
1981   Referer information.
1984   The User-Agent (<xref target="header.user-agent"/>) or Server (<xref target="header.server"/>) header
1985   fields can sometimes be used to determine that a specific client or
1986   server have a particular security hole which might be exploited.
1987   Unfortunately, this same information is often used for other valuable
1988   purposes for which HTTP currently has no better mechanism.
1992<section title="Encoding Sensitive Information in URI's" anchor="">
1994   Because the source of a link might be private information or might
1995   reveal an otherwise private information source, it is strongly
1996   recommended that the user be able to select whether or not the
1997   Referer field is sent. For example, a browser client could have a
1998   toggle switch for browsing openly/anonymously, which would
1999   respectively enable/disable the sending of Referer and From
2000   information.
2003   Clients SHOULD NOT  include a Referer header field in a (non-secure)
2004   HTTP request if the referring page was transferred with a secure
2005   protocol.
2008   Authors of services which use the HTTP protocol SHOULD NOT  use GET
2009   based forms for the submission of sensitive data, because this will
2010   cause this data to be encoded in the Request-URI. Many existing
2011   servers, proxies, and user agents will log the request URI in some
2012   place where it might be visible to third parties. Servers can use
2013   POST-based form submission instead
2017<section title="Location Headers and Spoofing" anchor="location.spoofing">
2019   If a single server supports multiple organizations that do not trust
2020   one another, then it MUST check the values of Location and Content-Location
2021   headers in responses that are generated under control of
2022   said organizations to make sure that they do not attempt to
2023   invalidate resources over which they have no authority.
2029<section title="Acknowledgments" anchor="ack">
2034<references title="Normative References">
2036<reference anchor="Part1">
2037  <front>
2038    <title abbrev="HTTP/1.1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title>
2039    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2040      <organization abbrev="Day Software">Day Software</organization>
2041      <address><email></email></address>
2042    </author>
2043    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2044      <organization>One Laptop per Child</organization>
2045      <address><email></email></address>
2046    </author>
2047    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2048      <organization abbrev="HP">Hewlett-Packard Company</organization>
2049      <address><email></email></address>
2050    </author>
2051    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2052      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2053      <address><email></email></address>
2054    </author>
2055    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2056      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2057      <address><email></email></address>
2058    </author>
2059    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2060      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2061      <address><email></email></address>
2062    </author>
2063    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2064      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2065      <address><email></email></address>
2066    </author>
2067    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2068      <organization abbrev="W3C">World Wide Web Consortium</organization>
2069      <address><email></email></address>
2070    </author>
2071    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2072      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2073      <address><email></email></address>
2074    </author>
2075    <date month="January" year="2008"/>
2076  </front>
2077  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-01"/>
2081<reference anchor="Part3">
2082  <front>
2083    <title abbrev="HTTP/1.1">HTTP/1.1, part 3: Message Payload and Content Negotiation</title>
2084    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2085      <organization abbrev="Day Software">Day Software</organization>
2086      <address><email></email></address>
2087    </author>
2088    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2089      <organization>One Laptop per Child</organization>
2090      <address><email></email></address>
2091    </author>
2092    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2093      <organization abbrev="HP">Hewlett-Packard Company</organization>
2094      <address><email></email></address>
2095    </author>
2096    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2097      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2098      <address><email></email></address>
2099    </author>
2100    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2101      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2102      <address><email></email></address>
2103    </author>
2104    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2105      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2106      <address><email></email></address>
2107    </author>
2108    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2109      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2110      <address><email></email></address>
2111    </author>
2112    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2113      <organization abbrev="W3C">World Wide Web Consortium</organization>
2114      <address><email></email></address>
2115    </author>
2116    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2117      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2118      <address><email></email></address>
2119    </author>
2120    <date month="January" year="2008"/>
2121  </front>
2122  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p3-payload-01"/>
2126<reference anchor="Part4">
2127  <front>
2128    <title abbrev="HTTP/1.1">HTTP/1.1, part 4: Conditional Requests</title>
2129    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2130      <organization abbrev="Day Software">Day Software</organization>
2131      <address><email></email></address>
2132    </author>
2133    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2134      <organization>One Laptop per Child</organization>
2135      <address><email></email></address>
2136    </author>
2137    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2138      <organization abbrev="HP">Hewlett-Packard Company</organization>
2139      <address><email></email></address>
2140    </author>
2141    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2142      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2143      <address><email></email></address>
2144    </author>
2145    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2146      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2147      <address><email></email></address>
2148    </author>
2149    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2150      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2151      <address><email></email></address>
2152    </author>
2153    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2154      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2155      <address><email></email></address>
2156    </author>
2157    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2158      <organization abbrev="W3C">World Wide Web Consortium</organization>
2159      <address><email></email></address>
2160    </author>
2161    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2162      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2163      <address><email></email></address>
2164    </author>
2165    <date month="January" year="2008"/>
2166  </front>
2167  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p4-conditional-01"/>
2171<reference anchor="Part5">
2172  <front>
2173    <title abbrev="HTTP/1.1">HTTP/1.1, part 5: Range Requests and Partial Responses</title>
2174    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2175      <organization abbrev="Day Software">Day Software</organization>
2176      <address><email></email></address>
2177    </author>
2178    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2179      <organization>One Laptop per Child</organization>
2180      <address><email></email></address>
2181    </author>
2182    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2183      <organization abbrev="HP">Hewlett-Packard Company</organization>
2184      <address><email></email></address>
2185    </author>
2186    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2187      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2188      <address><email></email></address>
2189    </author>
2190    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2191      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2192      <address><email></email></address>
2193    </author>
2194    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2195      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2196      <address><email></email></address>
2197    </author>
2198    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2199      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2200      <address><email></email></address>
2201    </author>
2202    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2203      <organization abbrev="W3C">World Wide Web Consortium</organization>
2204      <address><email></email></address>
2205    </author>
2206    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2207      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2208      <address><email></email></address>
2209    </author>
2210    <date month="January" year="2008"/>
2211  </front>
2212  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-01"/>
2216<reference anchor="Part6">
2217  <front>
2218    <title abbrev="HTTP/1.1">HTTP/1.1, part 6: Caching</title>
2219    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2220      <organization abbrev="Day Software">Day Software</organization>
2221      <address><email></email></address>
2222    </author>
2223    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2224      <organization>One Laptop per Child</organization>
2225      <address><email></email></address>
2226    </author>
2227    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2228      <organization abbrev="HP">Hewlett-Packard Company</organization>
2229      <address><email></email></address>
2230    </author>
2231    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2232      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2233      <address><email></email></address>
2234    </author>
2235    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2236      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2237      <address><email></email></address>
2238    </author>
2239    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2240      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2241      <address><email></email></address>
2242    </author>
2243    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2244      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2245      <address><email></email></address>
2246    </author>
2247    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2248      <organization abbrev="W3C">World Wide Web Consortium</organization>
2249      <address><email></email></address>
2250    </author>
2251    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2252      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2253      <address><email></email></address>
2254    </author>
2255    <date month="January" year="2008"/>
2256  </front>
2257  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-01"/>
2261<reference anchor="Part7">
2262  <front>
2263    <title abbrev="HTTP/1.1">HTTP/1.1, part 7: Authentication</title>
2264    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2265      <organization abbrev="Day Software">Day Software</organization>
2266      <address><email></email></address>
2267    </author>
2268    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2269      <organization>One Laptop per Child</organization>
2270      <address><email></email></address>
2271    </author>
2272    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2273      <organization abbrev="HP">Hewlett-Packard Company</organization>
2274      <address><email></email></address>
2275    </author>
2276    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2277      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2278      <address><email></email></address>
2279    </author>
2280    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2281      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2282      <address><email></email></address>
2283    </author>
2284    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2285      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2286      <address><email></email></address>
2287    </author>
2288    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2289      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2290      <address><email></email></address>
2291    </author>
2292    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2293      <organization abbrev="W3C">World Wide Web Consortium</organization>
2294      <address><email></email></address>
2295    </author>
2296    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2297      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2298      <address><email></email></address>
2299    </author>
2300    <date month="January" year="2008"/>
2301  </front>
2302  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p7-auth-01"/>
2306<reference anchor="RFC2119">
2307  <front>
2308    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
2309    <author initials="S." surname="Bradner" fullname="Scott Bradner">
2310      <organization>Harvard University</organization>
2311      <address><email></email></address>
2312    </author>
2313    <date month="March" year="1997"/>
2314  </front>
2315  <seriesInfo name="BCP" value="14"/>
2316  <seriesInfo name="RFC" value="2119"/>
2321<references title="Informative References">
2323<reference anchor="Luo1998">
2324  <front>
2325    <title>Tunneling TCP based protocols through Web proxy servers</title>
2326    <author initials="A." surname="Luotonen" fullname="A. Luotonen">
2327      <organization/>
2328    </author>
2329    <date year="1998" month="August"/>
2330  </front>
2331  <seriesInfo name="Internet-Draft" value="draft-luotonen-web-proxy-tunneling-01"/>
2334<reference anchor="RFC1945">
2335  <front>
2336    <title abbrev="HTTP/1.0">Hypertext Transfer Protocol -- HTTP/1.0</title>
2337    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2338      <organization>MIT, Laboratory for Computer Science</organization>
2339      <address><email></email></address>
2340    </author>
2341    <author initials="R.T." surname="Fielding" fullname="Roy T. Fielding">
2342      <organization>University of California, Irvine, Department of Information and Computer Science</organization>
2343      <address><email></email></address>
2344    </author>
2345    <author initials="H.F." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
2346      <organization>W3 Consortium, MIT Laboratory for Computer Science</organization>
2347      <address><email></email></address>
2348    </author>
2349    <date month="May" year="1996"/>
2350  </front>
2351  <seriesInfo name="RFC" value="1945"/>
2354<reference anchor="RFC2068">
2355  <front>
2356    <title abbrev="HTTP/1.1">Hypertext Transfer Protocol -- HTTP/1.1</title>
2357    <author initials="R." surname="Fielding" fullname="Roy T. Fielding">
2358      <organization>University of California, Irvine, Department of Information and Computer Science</organization>
2359      <address><email></email></address>
2360    </author>
2361    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2362      <organization>MIT Laboratory for Computer Science</organization>
2363      <address><email></email></address>
2364    </author>
2365    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2366      <organization>Digital Equipment Corporation, Western Research Laboratory</organization>
2367      <address><email></email></address>
2368    </author>
2369    <author initials="H." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
2370      <organization>MIT Laboratory for Computer Science</organization>
2371      <address><email></email></address>
2372    </author>
2373    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2374      <organization>MIT Laboratory for Computer Science</organization>
2375      <address><email></email></address>
2376    </author>
2377    <date month="January" year="1997"/>
2378  </front>
2379  <seriesInfo name="RFC" value="2068"/>
2382<reference anchor="RFC2616">
2383  <front>
2384    <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
2385    <author initials="R." surname="Fielding" fullname="R. Fielding">
2386      <organization>University of California, Irvine</organization>
2387      <address><email></email></address>
2388    </author>
2389    <author initials="J." surname="Gettys" fullname="J. Gettys">
2390      <organization>W3C</organization>
2391      <address><email></email></address>
2392    </author>
2393    <author initials="J." surname="Mogul" fullname="J. Mogul">
2394      <organization>Compaq Computer Corporation</organization>
2395      <address><email></email></address>
2396    </author>
2397    <author initials="H." surname="Frystyk" fullname="H. Frystyk">
2398      <organization>MIT Laboratory for Computer Science</organization>
2399      <address><email></email></address>
2400    </author>
2401    <author initials="L." surname="Masinter" fullname="L. Masinter">
2402      <organization>Xerox Corporation</organization>
2403      <address><email></email></address>
2404    </author>
2405    <author initials="P." surname="Leach" fullname="P. Leach">
2406      <organization>Microsoft Corporation</organization>
2407      <address><email></email></address>
2408    </author>
2409    <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
2410      <organization>W3C</organization>
2411      <address><email></email></address>
2412    </author>
2413    <date month="June" year="1999"/>
2414  </front>
2415  <seriesInfo name="RFC" value="2616"/>
2418<reference anchor="RFC2822">
2419  <front>
2420    <title>Internet Message Format</title>
2421    <author initials="P." surname="Resnick" fullname="P. Resnick">
2422      <organization>QUALCOMM Incorporated</organization>
2423    </author>
2424    <date year="2001" month="April"/>
2425  </front>
2426  <seriesInfo name="RFC" value="2822"/>
2431<section title="Compatibility with Previous Versions" anchor="compatibility">
2432<section title="Changes from RFC 2068" anchor="changes.from.rfc.2068">
2434   Clarified which error code should be used for inbound server failures
2435   (e.g. DNS failures). (<xref target="status.504"/>).
2438   201 (Created) had a race that required an Etag be sent when a resource is
2439   first created. (<xref target="status.201"/>).
2442   Rewrite of message transmission requirements to make it much harder
2443   for implementors to get it wrong, as the consequences of errors here
2444   can have significant impact on the Internet, and to deal with the
2445   following problems:
2446  <list style="numbers">
2447      <t>Changing "HTTP/1.1 or later" to "HTTP/1.1", in contexts where
2448         this was incorrectly placing a requirement on the behavior of
2449         an implementation of a future version of HTTP/1.x</t>
2451      <t>Made it clear that user-agents should retry requests, not
2452         "clients" in general.</t>
2454      <t>Converted requirements for clients to ignore unexpected 100
2455         (Continue) responses, and for proxies to forward 100 responses,
2456         into a general requirement for 1xx responses.</t>
2458      <t>Modified some TCP-specific language, to make it clearer that
2459         non-TCP transports are possible for HTTP.</t>
2461      <t>Require that the origin server MUST NOT wait for the request
2462         body before it sends a required 100 (Continue) response.</t>
2464      <t>Allow, rather than require, a server to omit 100 (Continue) if
2465         it has already seen some of the request body.</t>
2467      <t>Allow servers to defend against denial-of-service attacks and
2468         broken clients.</t>
2469  </list>
2472   This change adds the Expect header and 417 status code.
2475   Clean up confusion between 403 and 404 responses. (Section <xref target="status.403" format="counter"/>,
2476   <xref target="status.404" format="counter"/>, and <xref target="status.410" format="counter"/>)
2479   The PATCH<iref item="PATCH method" primary="true"/><iref item="Methods" subitem="PATCH" primary="true"/>, LINK<iref item="LINK method" primary="true"/><iref item="Methods" subitem="LINK" primary="true"/>, UNLINK<iref item="UNLINK method" primary="true"/><iref item="Methods" subitem="UNLINK" primary="true"/> methods were defined but not commonly
2480   implemented in previous versions of this specification. See <xref target="RFC2068"/>.
2484<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
2486  Clarify definition of POST.
2487  (<xref target="POST"/>)
2490  Failed to consider that there are
2491  many other request methods that are safe to automatically redirect,
2492  and further that the user agent is able to make that determination
2493  based on the request method semantics.
2494  (Sections <xref format="counter" target="status.301"/>,
2495  <xref format="counter" target="status.302"/> and
2496  <xref format="counter" target="status.307"/> )
2499  Correct syntax of Location header to allow fragment,
2500  as referred symbol wasn't what was expected, and add some
2501  clarifications as to when it would not be appropriate.
2502  (<xref target="header.location"/>)
2505  In the description of the Server header, the Via field
2506  was described as a SHOULD. The requirement was and is stated
2507  correctly in the description of the Via header in Section 8.9 of <xref target="Part1"/>.
2508  (<xref target="header.server"/>)
2514<section title="Change Log (to be removed by RFC Editor before publication)">
2516<section title="Since RFC2616">
2518  Extracted relevant partitions from <xref target="RFC2616"/>.
2522<section title="Since draft-ietf-httpbis-p2-semantics-00">
2524  Closed issues:
2525  <list style="symbols">
2526    <t>
2527      <eref target=""/>:
2528      "Via is a MUST"
2529      (<eref target=""/>)
2530    </t>
2531    <t>
2532      <eref target=""/>:
2533      "Fragments allowed in Location"
2534      (<eref target=""/>)
2535    </t>
2536    <t>
2537      <eref target=""/>:
2538      "Safe Methods vs Redirection"
2539      (<eref target=""/>)
2540    </t>
2541    <t>
2542      <eref target=""/>:
2543      "Revise description of the POST method"
2544      (<eref target=""/>)
2545    </t>
2546    <t>
2547      <eref target=""/>:
2548      "Normative and Informative references"
2549    </t>
2550    <t>
2551      <eref target=""/>:
2552      "RFC2606 Compliance"
2553    </t>
2554    <t>
2555      <eref target=""/>:
2556      "Informative references"
2557    </t>
2558    <t>
2559      <eref target=""/>:
2560      "Redundant cross-references"
2561    </t>
2562  </list>
2565  Other changes:
2566  <list style="symbols">
2567    <t>
2568      Move definitions of 304 and 412 condition codes to <xref target="Part4"/>
2569    </t>
2570  </list>
Note: See TracBrowser for help on using the repository browser.