W3C home > Mailing lists > Public > uri@w3.org > January 2010

Re: non-HTTP URIs in HTTP requests

From: John Cowan <cowan@ccil.org>
Date: Wed, 6 Jan 2010 16:01:50 -0500
To: Erik Wilde <dret@berkeley.edu>
Cc: "uri@w3.org" <uri@w3.org>
Message-ID: <20100106210150.GF18831@mercury.ccil.org>
Erik Wilde scripsit:

> i have a technical question about HTTP and URIs. my use case is that i 
> am considering to use HTTP for the resolution of non-HTTP URIs, so that 
> for example (this is my use case) a geo:37.0625,-95.677068 URI could be 
> "resolved" via HTTP. regardless of the actual process (what "resolution" 
> returns in the response), i am currently just trying to find out whether 
> it would be legal to send a HTTP request like this:
> GET geo:37.0625,-95.677068 HTTP/1.1

That is legal:  RFC 2616 (HTTP/1.1), Section 5.1.2, says that the
Request-URI may be an absoluteURI, which "geo:37.0625,-95.677068" is.
The relevant text:

   The absoluteURI form is REQUIRED when the request is being made to a
   proxy. The proxy is requested to forward the request or service it
   from a valid cache, and return the response. Note that the proxy MAY
   forward the request on to another proxy or directly to the server
   specified by the absoluteURI. In order to avoid request loops, a
   proxy MUST be able to recognize all of its server names, including
   any aliases, local variations, and the numeric IP address. An example
   Request-Line would be:

       GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.1

   To allow for transition to absoluteURIs in all requests in future
   versions of HTTP, all HTTP/1.1 servers MUST accept the absoluteURI
   form in requests, even though HTTP/1.1 clients will only generate
   them in requests to proxies.

Though the example shows an HTTP URI, the definition of "absoluteURI" is
provided by reference to RFC 2396, which permits it to use any scheme.

Normally I can handle panic attacks on my own;   John Cowan <cowan@ccil.org>
but panic is, at the moment, a way of life.      http://www.ccil.org/~cowan
Received on Wednesday, 6 January 2010 21:02:18 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:13 UTC