| Network Working Group | R. Fielding |
| Internet Draft | Day Software |
| <draft-lafon-rfc2616bis-03> | J. Gettys |
| Obsoletes: 2616 (if approved) | J. Mogul |
| Intended status: Standards Track | HP |
| Expires: December 2007 | H. Frystyk |
| Microsoft | |
| L. Masinter | |
| Adobe Systems | |
| P. Leach | |
| Microsoft | |
| T. Berners-Lee | |
| W3C/MIT | |
| Y. Lafon, Editor | |
| W3C | |
| J. F. Reschke, Editor | |
| greenbytes | |
| June 2007 |
Hypertext Transfer Protocol -- HTTP/1.1
draft-lafon-rfc2616bis-03
By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she becomes aware will be disclosed, in accordance with Section 6 of BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as “work in progress”.
The list of current Internet-Drafts can be accessed at <http://www.ietf.org/ietf/1id-abstracts.txt>.
The list of Internet-Draft Shadow Directories can be accessed at <http://www.ietf.org/shadow.html>.
This Internet-Draft will expire in December 2007.
Copyright © The IETF Trust (2007). All Rights Reserved.
The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. It is a generic, stateless, protocol which can be used for many tasks beyond its use for hypertext, such as name servers and distributed object management systems, through extension of its request methods, error codes and headers [RFC2324]. A feature of HTTP is the typing and negotiation of data representation, allowing systems to be built independently of the data being transferred.
HTTP has been in use by the World-Wide Web global information initiative since 1990. This specification defines the protocol referred to as "HTTP/1.1", and is an update to RFC2616.
Distribution of this document is unlimited. Please send comments to the Hypertext Transfer Protocol (HTTP) mailing list at ietf-http-wg@w3.org, which may be joined by sending a message with subject "subscribe" to ietf-http-wg-request@w3.org. Discussions of the HTTP working group are archived at <http://lists.w3.org/Archives/Public/ietf-http-wg/>. XML versions, latest edits and the issues list for this document are available from <http://www.w3.org/Protocols/HTTP/1.1/rfc2616bis/>.
The purpose of this document is to revise [RFC2616], doing only minimal corrections. For now, it is not planned to advance the standards level of HTTP, thus - if published - the specification will still be a "Proposed Standard" (see [RFC2026]).
The current plan is to incorporate known errata, and to update the specification text according to the current IETF publication guidelines. In particular:
This document is based on a variant of the original RFC2616 specification formatted using Marshall T. Rose's "xml2rfc" tool (see <http://xml.resource.org>) and therefore deviates from the original text in word wrapping, page breaks, list formatting, reference formatting, whitespace usage and appendix numbering. Otherwise, it is supposed to contain an accurate copy of the original specification text. See <http://www.w3.org/Protocols/HTTP/1.1/rfc2616bis-00-from-rfc2616.diff.html> for a comparison between both documents, as generated by "rfcdiff" (<http://tools.ietf.org/tools/rfcdiff/>).
| I rfc2616bis (type: edit, status: open) | ||
| julian.reschke@greenbytes.de | 2006-10-10 | Umbrella issue for changes with respect to the revision process itself. |
| I unneeded_references (type: edit, status: open) | ||
| julian.reschke@greenbytes.de | 2006-10-19 | The reference entries for RFC1866, RFC2069 and RFC2026 are unused. Remove them? |
| julian.reschke@greenbytes.de | 2006-11-02 | See also http://lists.w3.org/Archives/Public/ietf-http-wg/2006OctDec/0118 and http://www.w3.org/Protocols/HTTP/1.1/rfc2616bis/issues/#i44. |
| I edit (type: edit, status: open) | ||
| julian.reschke@greenbytes.de | 2006-10-08 | Umbrella issue for editorial fixes/enhancements. |
| Associated changes in this document: <#rfc.change.edit.1>, 3.2.1, 8.1.1, 10.3.8, 13.1.2, 13.13, 14.11, 14.23, 15.6, 16.2, 16.2, 16.2, 16.2, 16.2, F.3, G. | ||
| I i66-iso8859-1-reference (type: change, status: open) | ||
| julian.reschke@greenbytes.de | 2006-10-28 | Classify ISO8859 as normative, and simplify reference to only refer to ISO8859 Part 1 (because that's the only part needed here), and update to the 1998 version. |
| I abnf (type: change, status: open) | ||
| julian.reschke@greenbytes.de | 2006-12-03 | Update BNF to RFC4234 (plan to be added). |
| I i45-rfc977-reference (type: edit, status: closed) | ||
| julian.reschke@greenbytes.de | 2006-10-26 | Classify RFC977 (NNTP) as informative, and update the reference to RFC3977. |
| 2006-10-26 | Resolution: Done. | |
| Associated changes in this document: 1.1, 17.1, 17.2. | ||
| I i46-rfc1700_remove (type: edit, status: closed) | ||
| julian.reschke@greenbytes.de | 2006-11-12 |
RFC1700 ("ASSIGNED NUMBERS") has been obsoleted by RFC3232 ("Assigned
Numbers: RFC 1700 is Replaced by an On-line Database").
draft-gettys-http-v11-spec-rev-00 just updates the reference, which I think is a bug. In fact, RFC2616 refers to RCF1700 (1) for the definition of the default TCP port (Section 1.4), (2) for a reference to the character set registry (Section 3.4) and (3) for a reference to the media type registry (Section 3.7). I propose to remove the reference, and to make the following changes: (1) Replace reference with in-lined URL of the IANA port registry, (2) Replace the first reference with the in-lined URL of the IANA character set registry, and drop the second one, and (3) Drop the reference, as the next sentence refers to the Media Type Registration Process anyway. (see also <http://lists.w3.org/Archives/Public/ietf-http-wg/2006OctDec/0181.html> |
| 2007-03-18 | Resolution: Accepted during the Prague meeting, see http://www.w3.org/2007/03/18-rfc2616-minutes.html#action21. | |
| Associated changes in this document: 1.4, 3.4, 3.4, 3.7, 17.1. | ||
| I rfc2048_informative_and_obsolete (type: edit, status: open) | ||
| julian.reschke@greenbytes.de | 2006-11-15 | Classify RFC2048 ("Multipurpose Internet Mail Extensions (MIME) Part Four: Registration Procedures") as informative, update to RFC4288, potentially update the application/http and multipart/byteranges MIME type registration. Also, in Section 3.7 fix first reference to refer to RFC2046 (it's about media types in general, not the registration procedure). |
| julian.reschke@greenbytes.de | 2007-04-20 | Separate issue for updating the registration template: i55-updating-to-rfc4288. |
| I i34-updated-reference-for-uris (type: change, status: open) | ||
| julian.reschke@greenbytes.de | 2006-11-14 | Update RFC2396 ("Uniform Resource Identifiers (URI): Generic Syntax") to RFC3986. |
| I i50-misc-typos (type: edit, status: open) | ||
| a-travis@microsoft.com | 2006-12-18 | (See http://lists.w3.org/Archives/Public/ietf-http-wg/2006OctDec/0275.html). |
| julian.reschke@greenbytes.de | 2007-06-29 | Some of the strictly editorial issues have been resolves as part of issue "edit". |
| I i65-informative-references (type: edit, status: open) | ||
| julian.reschke@greenbytes.de | 2007-05-28 | The following references are informative: Luo1998 ("Tunneling TCP based protocols through Web proxy servers", also update reference to quote the expired Internet Draft properly). Nie1997 ("Network Performance Effects of HTTP/1.1, CSS1, and PNG"). Pad1995 ("Improving HTTP Latency"). RFC821 (SMTP), also update the reference to RFC2821. RFC822 ("STANDARD FOR THE FORMAT OF ARPA INTERNET TEXT MESSAGES") -- but add another instance as RFC822ABNF for the cases where the reference if for the ABNF part (these references will later be replaced by references to RFC4234 (see issue abnf)). RFC959 (FTP). RFC1036 ("Standard for Interchange of USENET Messages"). RFC1123 ("Requirements for Internet Hosts -- Application and Support") -- it is only used as a background reference for rfc1123-date, which this spec defines itself (note this disagrees with draft-gettys-http-v11-spec-rev-00 which made it normative). RFC1305 ("Network Time Protocol (Version 3)"). RFC1436 (Gopher). RFC1630 (URI Syntax) -- there'll be a normative reference to a newer spec. RFC1738 (URL) -- there'll be a normative reference to a newer spec. RFC1806 ("Communicating Presentation Information in Internet Messages: The Content-Disposition Header"). RFC1808 (Relative Uniform Resource Locators). RFC1867 ("Form-based File Upload in HTML"), also update the reference to RFC2388 ("Returning Values from Forms: multipart/form-data"). RFC1900 ("Renumbering Needs Work"). RFC1945 (HTTP/1.0). RFC2026 ("The Internet Standards Process -- Revision 3"). RFC2049 ("Multipurpose Internet Mail Extensions (MIME) Part Five: Conformance Criteria and Examples"). RFC2068 (HTTP/1.1). RFC2076 ("Common Internet Message Headers"). RFC2110 (MHTML), also update the reference to RFC2557. RFC2145 ("Use and Interpretation of HTTP Version Numbers"). RFC2183 ("Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field"). RFC2277 ("IETF Policy on Character Sets and Languages"). RFC2279 (UTF8), also update the reference to RFC3629. RFC2324 (HTCPCP/1.0). Spero ("Analysis of HTTP Performance Problems"). Tou1998 ("Analysis of HTTP Performance"). WAIS ("WAIS Interface Protocol Prototype Functional Specification (v1.5)"). |
| derhoermi@gmx.net | 2007-05-28 | On RFC1950-1952: Understanding these documents is required in order to understand the coding values defined for the coding registry established and used by the document; why would it be appropriate to cite them as informative? |
The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. HTTP has been in use by the World-Wide Web global information initiative since 1990. The first version of HTTP, referred to as HTTP/0.9, was a simple protocol for raw data transfer across the Internet. HTTP/1.0, as defined by [RFC1945], improved the protocol by allowing messages to be in the format of MIME-like messages, containing metainformation about the data transferred and modifiers on the request/response semantics. However, HTTP/1.0 does not sufficiently take into consideration the effects of hierarchical proxies, caching, the need for persistent connections, or virtual hosts. In addition, the proliferation of incompletely-implemented applications calling themselves "HTTP/1.0" has necessitated a protocol version change in order for two communicating applications to determine each other's true capabilities.
This specification defines the protocol referred to as "HTTP/1.1". This protocol includes more stringent requirements than HTTP/1.0 in order to ensure reliable implementation of its features.
Practical information systems require more functionality than simple retrieval, including search, front-end update, and annotation. HTTP allows an open-ended set of methods and headers that indicate the purpose of a request [RFC2324]. It builds on the discipline of reference provided by the Uniform Resource Identifier (URI) [RFC1630], as a location (URL) [RFC1738] or name (URN) [RFC1737], for indicating the resource to which a method is to be applied. Messages are passed in a format similar to that used by Internet mail [RFC822] as defined by the Multipurpose Internet Mail Extensions (MIME) [RFC2045].
HTTP is also used as a generic protocol for communication between user agents and proxies/gateways to other Internet systems, including those supported by the SMTP [RFC821], NNTP ↓[RFC977][RFC3977], FTP [RFC959], Gopher [RFC1436], and WAIS [WAIS] protocols. In this way, HTTP allows basic hypermedia access to resources available from diverse applications.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
An implementation is not compliant if it fails to satisfy one or more of the MUST or REQUIRED level requirements for the protocols it implements. An implementation that satisfies all the MUST or REQUIRED level and all the SHOULD level requirements for its protocols is said to be "unconditionally compliant"; one that satisfies all the MUST level requirements but not all the SHOULD level requirements for its protocols is said to be "conditionally compliant."
This specification uses a number of terms to refer to the roles played by participants in, and objects of, the HTTP communication.
| I i52-sort-1.3-terminology (type: edit, status: open) | ||
| a-travis@microsoft.com | 2006-12-21 | It's irritating to try and look up definitions in section 1.3. IMHO, the entries really should be sorted alphabetically, despite the fact that the terms have dependencies on one another. |
| julian.reschke@greenytes.de | 2006-06-15 | See action item http://www.w3.org/2007/03/18-rfc2616-minutes.html#action23 and proposal in http://lists.w3.org/Archives/Public/ietf-http-wg/2007AprJun/0350.html. |
| julian.reschke@greenytes.de | 2006-06-15 |
I personally think we should not do this change:
(1) Sorting paragraphs makes it very hard to verify the changes; in essence, a reviewer would either need to trust us, or re-do the shuffling to control whether it's correct (nothing lost, no change in the definitions). (2) In the RFC2616 ordering, things that belong together (such as "client", "user agent", "server" ...) are close to each other. (3) Contrary to RFC2616, the text version of new spec will contain an alphabetical index section anyway (unless it's removed upon publication :-). |
connection
message
request
response
resource
entity
representation
content negotiation
variant
client
user agent
server
origin server
proxy
gateway
tunnel
cache
cacheable
first-hand
explicit expiration time
heuristic expiration time
age
freshness lifetime
fresh
stale
semantically transparent
validator
upstream/downstream
inbound/outbound
The HTTP protocol is a request/response protocol. A client sends a request to the server in the form of a request method, URI, and protocol version, followed by a MIME-like message containing request modifiers, client information, and possible body content over a connection with a server. The server responds with a status line, including the message's protocol version and a success or error code, followed by a MIME-like message containing server information, entity metainformation, and possible entity-body content. The relationship between HTTP and MIME is described in Appendix D.
Most HTTP communication is initiated by a user agent and consists of a request to be applied to a resource on some origin server. In the simplest case, this may be accomplished via a single connection (v) between the user agent (UA) and the origin server (O).
request chain ------------------------>
UA -------------------v------------------- O
<----------------------- response chain
A more complicated situation occurs when one or more intermediaries are present in the request/response chain. There are three common forms of intermediary: proxy, gateway, and tunnel. A proxy is a forwarding agent, receiving requests for a URI in its absolute form, rewriting all or part of the message, and forwarding the reformatted request toward the server identified by the URI. A gateway is a receiving agent, acting as a layer above some other server(s) and, if necessary, translating the requests to the underlying server's protocol. A tunnel acts as a relay point between two connections without changing the messages; tunnels are used when the communication needs to pass through an intermediary (such as a firewall) even when the intermediary cannot understand the contents of the messages.
request chain -------------------------------------->
UA -----v----- A -----v----- B -----v----- C -----v----- O
<------------------------------------- response chain
The figure above shows three intermediaries (A, B, and C) between the user agent and origin server. A request or response message that travels the whole chain will pass through four separate connections. This distinction is important because some HTTP communication options may apply only to the connection with the nearest, non-tunnel neighbor, only to the end-points of the chain, or to all connections along the chain. Although the diagram is linear, each participant may be engaged in multiple, simultaneous communications. For example, B may be receiving requests from many clients other than A, and/or forwarding requests to servers other than C, at the same time that it is handling A's request.
Any party to the communication which is not acting as a tunnel may employ an internal cache for handling requests. The effect of a cache is that the request/response chain is shortened if one of the participants along the chain has a cached response applicable to that request. The following illustrates the resulting chain if B has a cached copy of an earlier response from O (via C) for a request which has not been cached by UA or A.
request chain ---------->
UA -----v----- A -----v----- B - - - - - - C - - - - - - O
<--------- response chain
Not all responses are usefully cacheable, and some requests may contain modifiers which place special requirements on cache behavior. HTTP requirements for cache behavior and cacheable responses are defined in Section 13.
In fact, there are a wide variety of architectures and configurations of caches and proxies currently being experimented with or deployed across the World Wide Web. These systems include national hierarchies of proxy caches to save transoceanic bandwidth, systems that broadcast or multicast cache entries, organizations that distribute subsets of cached data via CD-ROM, and so on. HTTP systems are used in corporate intranets over high-bandwidth links, and for access via PDAs with low-power radio links and intermittent connectivity. The goal of HTTP/1.1 is to support the wide diversity of configurations already deployed while introducing protocol constructs that meet the needs of those who build web applications that require high reliability and, failing that, at least reliable indications of failure.
HTTP communication usually takes place over TCP/IP connections. The default port is TCP 80 ↓[RFC1700](<http://www.iana.org/assignments/port-numbers>), but other ports can be used. This does not preclude HTTP from being implemented on top of any other protocol on the Internet, or on other networks. HTTP only presumes a reliable transport; any protocol that provides such guarantees can be used; the mapping of the HTTP/1.1 request and response structures onto the transport data units of the protocol in question is outside the scope of this specification.
In HTTP/1.0, most implementations used a new connection for each request/response exchange. In HTTP/1.1, a connection may be used for one or more request/response exchanges, although connections may be closed for a variety of reasons (see Section 8.1).
All of the mechanisms specified in this document are described in both prose and an augmented Backus-Naur Form (BNF) similar to that used by [RFC822]. Implementors will need to be familiar with the notation in order to understand this specification. The augmented BNF includes the following constructs:
name = definition
"literal"
rule1 | rule2
(rule1 rule2)
*rule
[rule]
N rule
#rule
; comment
implied *LWS
The following rules are used throughout this specification to describe basic parsing constructs. The US-ASCII coded character set is defined by ANSI X3.4-1986 [USASCII].
OCTET = <any 8-bit sequence of data>
CHAR = <any US-ASCII character (octets 0 - 127)>
UPALPHA = <any US-ASCII uppercase letter "A".."Z">
LOALPHA = <any US-ASCII lowercase letter "a".."z">
ALPHA = UPALPHA | LOALPHA
DIGIT = <any US-ASCII digit "0".."9">
CTL = <any US-ASCII control character
(octets 0 - 31) and DEL (127)>
CR = <US-ASCII CR, carriage return (13)>
LF = <US-ASCII LF, linefeed (10)>
SP = <US-ASCII SP, space (32)>
HT = <US-ASCII HT, horizontal-tab (9)>
<"> = <US-ASCII double-quote mark (34)>
HTTP/1.1 defines the sequence CR LF as the end-of-line marker for all protocol elements except the entity-body (see Appendix C for tolerant applications). The end-of-line marker within an entity-body is defined by its associated media type, as described in Section 3.7.
CRLF = CR LF
HTTP/1.1 header field values can be folded onto multiple lines if the continuation line begins with a space or horizontal tab. All linear white space, including folding, has the same semantics as SP. A recipient MAY replace any linear white space with a single SP before interpreting the field value or forwarding the message downstream.
LWS = [CRLF] 1*( SP | HT )
| I i63-header-length-limit-with-encoded-words (type: change, status: open) | ||
| derhoermi@gmx.net | 2007-05-14 | (See http://lists.w3.org/Archives/Public/ietf-http-wg/2007AprJun/0050.html). |
The TEXT rule is only used for descriptive field contents and values that are not intended to be interpreted by the message parser. Words of *TEXT MAY contain characters from character sets other than ISO-8859-1 [ISO-8859-1] only when encoded according to the rules of [RFC2047].
TEXT = <any OCTET except CTLs,
but including LWS>
A CRLF is allowed in the definition of TEXT only as part of a header field continuation. It is expected that the folding LWS will be replaced with a single SP before interpretation of the TEXT value.
Hexadecimal numeric characters are used in several protocol elements.
HEX = "A" | "B" | "C" | "D" | "E" | "F"
| "a" | "b" | "c" | "d" | "e" | "f" | DIGIT
Many HTTP/1.1 header field values consist of words separated by LWS or special characters. These special characters MUST be in a quoted string to be used within a parameter value (as defined in Section 3.6).
token = 1*<any CHAR except CTLs or separators>
separators = "(" | ")" | "<" | ">" | "@"
| "," | ";" | ":" | "\" | <">
| "/" | "[" | "]" | "?" | "="
| "{" | "}" | SP | HT
Comments can be included in some HTTP header fields by surrounding the comment text with parentheses. Comments are only allowed in fields containing "comment" as part of their field value definition. In all other fields, parentheses are considered part of the field value.
comment = "(" *( ctext | quoted-pair | comment ) ")"
ctext = <any TEXT excluding "(" and ")">
A string of text is parsed as a single word if it is quoted using double-quote marks.
| I i31-qdtext-bnf (type: change, status: open) | ||
| jamie@shareable.org | 2004-03-15 | ...I wrote a regular expression based on the RFC 2616 definition, and that allows "foo\" as a quoted-string. That's not intended, is it? |
quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
qdtext = <any TEXT except <">>
| I i62-whitespace-in-quoted-pair (type: change, status: open) | ||
| dan.winship@gmail.com | 2007-04-20 | (...) RFC 2822 updates RFC 822's quoted-pair rule to disallow CR, LF, and NUL. We should probably make the same change. |
The backslash character ("\") MAY be used as a single-character quoting mechanism only within quoted-string and comment constructs.
quoted-pair = "\" CHAR
HTTP uses a "<major>.<minor>" numbering scheme to indicate versions of the protocol. The protocol versioning policy is intended to allow the sender to indicate the format of a message and its capacity for understanding further HTTP communication, rather than the features obtained via that communication. No change is made to the version number for the addition of message components which do not affect communication behavior or which only add to extensible field values. The <minor> number is incremented when the changes made to the protocol add features which do not change the general message parsing algorithm, but which may add to the message semantics and imply additional capabilities of the sender. The <major> number is incremented when the format of a message within the protocol is changed. See [RFC2145] for a fuller explanation.
The version of an HTTP message is indicated by an HTTP-Version field in the first line of the message.
HTTP-Version = "HTTP" "/" 1*DIGIT "." 1*DIGIT
Note that the major and minor numbers MUST be treated as separate integers and that each MAY be incremented higher than a single digit. Thus, HTTP/2.4 is a lower version than HTTP/2.13, which in turn is lower than HTTP/12.3. Leading zeros MUST be ignored by recipients and MUST NOT be sent.
An application that sends a request or response message that includes HTTP-Version of "HTTP/1.1" MUST be at least conditionally compliant with this specification. Applications that are at least conditionally compliant with this specification SHOULD use an HTTP-Version of "HTTP/1.1" in their messages, and MUST do so for any message that is not compatible with HTTP/1.0. For more details on when to send specific HTTP-Version values, see [RFC2145].
The HTTP version of an application is the highest HTTP version for which the application is at least conditionally compliant. HTTP-Version is case-sensitive.
Proxy and gateway applications need to be careful when forwarding messages in protocol versions different from that of the application. Since the protocol version indicates the protocol capability of the sender, a proxy/gateway MUST NOT send a message with a version indicator which is greater than its actual version. If a higher version request is received, the proxy/gateway MUST either downgrade the request version, or respond with an error, or switch to tunnel behavior.
Due to interoperability problems with HTTP/1.0 proxies discovered since the publication of [RFC2068], caching proxies MUST, gateways MAY, and tunnels MUST NOT upgrade the request to the highest version they support. The proxy/gateway's response to that request MUST be in the same major version as the request.
URIs have been known by many names: WWW addresses, Universal Document Identifiers, Universal Resource Identifiers [RFC1630], and finally the combination of Uniform Resource Locators (URL) [RFC1738] and Names (URN) [RFC1737]. As far as HTTP is concerned, Uniform Resource Identifiers are simply formatted strings which identify--via name, location, or any other characteristic--a resource.
URIs in HTTP can be represented in absolute form or relative to some known base URI [RFC1808], depending upon the context of their use. The two forms are differentiated by the fact that absolute URIs always begin with a scheme name followed by a colon. For definitive information on URL syntax and semantics, see "Uniform Resource Identifiers (URI): Generic Syntax and Semantics," [RFC2396] (which replaces [RFC1738] and [RFC1808]). This specification adopts the definitions of "URI-reference", "absoluteURI", "relativeURI", "port", "host",↑↓"abs_path", "rel_path", and "authority" from that specification.
The HTTP protocol does not place any a priori limit on the length of a URI. Servers MUST be able to handle the URI of any resource they serve, and SHOULD be able to handle URIs of unbounded length if they provide GET-based forms that could generate such URIs. A server SHOULD return 414 (Request-URI Too Long) status if a URI is longer than the server can handle (see Section 10.4.15).
The "http" scheme is used to locate network resources via the HTTP protocol. This section defines the scheme-specific syntax and semantics for http URLs.
http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]
| I i58-what-identifies-an-http-resource (type: change, status: open) | ||
| julian.reschke@gmx.de | 2007-01-23 |
3.2.2 really doesn't say what identifies the resource:
"If the port is empty or not given, port 80 is assumed. The semantics are that the identified resource is located at the server listening for TCP connections on that port of that host, and the Request-URI for the resource is abs_path (Section 5.1.2)." But it *does* say what part of the HTTP URL becomes the Request-URI, and that definitively needs to be fixed. |
If the port is empty or not given, port 80 is assumed. The semantics are that the identified resource is located at the server listening for TCP connections on that port of that host, and the Request-URI for the resource is abs_path (Section 5.1.2). The use of IP addresses in URLs SHOULD be avoided whenever possible (see [RFC1900]). If the abs_path is not present in the URL, it MUST be given as "/" when used as a Request-URI for a resource (Section 5.1.2). If a proxy receives a host name which is not a fully qualified domain name, it MAY add its domain to the host name it received. If a proxy receives a fully qualified domain name, the proxy MUST NOT change the host name.
When comparing two URIs to decide if they match or not, a client SHOULD use a case-sensitive octet-by-octet comparison of the entire URIs, with these exceptions:
Characters other than those in the "reserved" set (see [RFC2396]) are equivalent to their ""%" HEX HEX" encoding.
For example, the following three URIs are equivalent:
http://example.com:80/~smith/home.html http://EXAMPLE.com/%7Esmith/home.html http://EXAMPLE.com:/%7esmith/home.html
HTTP applications have historically allowed three different formats for the representation of date/time stamps:
Sun, 06 Nov 1994 08:49:37 GMT ; [RFC822], updated by [RFC1123] Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by [RFC1036] Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
| I i47-inconsistency-in-date-format-explanation (type: edit, status: closed) | ||
| julian.reschke@greenbytes.de | 2006-11-20 |
Should say "...obsolete
RFC1036 date format [...]..." instead of "...obsolete RFC
850 [12] date format...".
See also <http://lists.w3.org/Archives/Public/ietf-http-wg/2006OctDec/0187.html>. |
| 2006-11-20 | Resolution: Done. | |
| Associated changes in this document: 3.3.1. | ||
The first format is preferred as an Internet standard and represents a fixed-length subset of that defined by [RFC1123] (an update to [RFC822]). The second format is in common use, but is based on the obsolete RFC 850 [RFC1036] date formatRFC 1036 date format [RFC1036] and lacks a four-digit year. HTTP/1.1 clients and servers that parse the date value MUST accept all three formats (for compatibility with HTTP/1.0), though they MUST only generate the RFC 1123 format for representing HTTP-date values in header fields. See Appendix C for further information.
All HTTP date/time stamps MUST be represented in Greenwich Mean Time (GMT), without exception. For the purposes of HTTP, GMT is exactly equal to UTC (Coordinated Universal Time). This is indicated in the first two formats by the inclusion of "GMT" as the three-letter abbreviation for time zone, and MUST be assumed when reading the asctime format. HTTP-date is case sensitive and MUST NOT include additional LWS beyond that specifically included as SP in the grammar.
| I i51-http-date-vs-rfc1123-date (type: change, status: open) | ||
| a-travis@microsoft.com | 2006-12-18 | On closer inspection, shouldn't the BNF for that section (14.18) be "rfc1123-date" and not "HTTP-date"? I mean, why say it's an HTTP-date, but only RFC 1123 form is allowed (conflicting with the definition of HTTP-date)*? Likewise, shouldn't we just use the rfc1123-date moniker throughout the document whenever explicitly referring to only dates in RFC 1123 format? |
HTTP-date = rfc1123-date | rfc850-date | asctime-date
rfc1123-date = wkday "," SP date1 SP time SP "GMT"
rfc850-date = weekday "," SP date2 SP time SP "GMT"
asctime-date = wkday SP date3 SP time SP 4DIGIT
date1 = 2DIGIT SP month SP 4DIGIT
; day month year (e.g., 02 Jun 1982)
date2 = 2DIGIT "-" month "-" 2DIGIT
; day-month-year (e.g., 02-Jun-82)
date3 = month SP ( 2DIGIT | ( SP 1DIGIT ))
; month day (e.g., Jun 2)
time = 2DIGIT ":" 2DIGIT ":" 2DIGIT
; 00:00:00 - 23:59:59
wkday = "Mon" | "Tue" | "Wed"
| "Thu" | "Fri" | "Sat" | "Sun"
weekday = "Monday" | "Tuesday" | "Wednesday"
| "Thursday" | "Friday" | "Saturday" | "Sunday"
month = "Jan" | "Feb" | "Mar" | "Apr"
| "May" | "Jun" | "Jul" | "Aug"
| "Sep" | "Oct" | "Nov" | "Dec"
Note: HTTP requirements for the date/time stamp format apply only to their usage within the protocol stream. Clients and servers are not required to use these formats for user presentation, request logging, etc.
Some HTTP header fields allow a time value to be specified as an integer number of seconds, represented in decimal, after the time that the message was received.
delta-seconds = 1*DIGIT
HTTP uses the same definition of the term "character set" as that described for MIME:
The term "character set" is used in this document to refer to a method used with one or more tables to convert a sequence of octets into a sequence of characters. Note that unconditional conversion in the other direction is not required, in that not all characters may be available in a given character set and a character set may provide more than one sequence of octets to represent a particular character. This definition is intended to allow various kinds of character encoding, from simple single-table mappings such as US-ASCII to complex table switching methods such as those that use ISO-2022's techniques. However, the definition associated with a MIME character set name MUST fully specify the mapping to be performed from octets to characters. In particular, use of external profiling information to determine the exact mapping is not permitted.
HTTP character sets are identified by case-insensitive tokens. The complete set of tokens is defined by the IANA Character Set registry ↑↓[RFC1700](<http://www.iana.org/assignments/character-sets>).
charset = token
Although HTTP allows an arbitrary token to be used as a charset value, any token that has a predefined value within the IANA Character Set registry ↑↓[RFC1700] MUST represent the character set defined by that registry. Applications SHOULD li