Question

RFC 3986 specifies a generic format for URIs but states that it "does not define a generative grammar for URIs; that task is performed by the individual specifications of each URI scheme." I am now looking for the current specification of that specific HTTP URI grammar.

HTTP/1.1 is specified in RFC 2616 (Hypertext Transfer Protocol -- HTTP/1.1). In section 3.2 it defines "the scheme-specific syntax and semantics for http URLs." And this looks really simple:

http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]

This rule references rules from RFC 2396 (Uniform Resource Identifiers (URI): Generic Syntax), which is obsoleted by RFC 3986 (Uniform Resource Identifier (URI): Generic Syntax). The latter RFC says nothing about abs_path, the former nothing about IPv6 and the http_URL is at least missing the fragment.

Did I miss something or did I get it completely wrong?

Was it helpful?

Solution

1) The official list of URI schemes is maintained by IANA at http://www.iana.org/assignments/uri-schemes.html, which indeed says that RFC 2616 defines the "http" URI scheme.

2) RFC 2616 predates RFC 3986 (obviously), and hasn't been updated since. But it will be soon; see http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p1-messaging-19.html#rfc.section.2.7 for the latest and greatest.

3) Fragment identifiers are not part of the URI scheme definition; they apply to all schemes; see http://greenbytes.de/tech/webdav/rfc3986.html#rfc.section.3.5.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top