W3C home > Mailing lists > Public > w3c-dist-auth@w3.org > July to September 2002

can a non-HTTP URL be the target of a redirect (301/302)

From: Julian Reschke <julian.reschke@gmx.de>
Date: Thu, 12 Sep 2002 21:03:20 +0200
To: <w3c-dist-auth@w3.org>
Message-ID: <JIEGINCHMLABHJBIGKBCIEHIFFAA.julian.reschke@gmx.de>

Hi,

(hopefully catching Roy's attention...-)

RFC2616 says about the 302 response status [1]:

"The requested resource resides temporarily under a different URI. Since the
redirection might be altered on occasion, the client SHOULD continue to use
the Request-URI for future requests. This response is only cacheable if
indicated by a Cache-Control or Expires header field.

The temporary URI SHOULD be given by the Location field in the response.
Unless the request method was HEAD, the entity of the response SHOULD
contain a short hypertext note with a hyperlink to the new URI(s).

If the 302 status code is received in response to a request other than GET
or HEAD, the user agent MUST NOT automatically redirect the request unless
it can be confirmed by the user, since this might change the conditions
under which the request was issued. "

...and about the Location header [2]:

"The Location response-header field is used to redirect the recipient to a
location other than the Request-URI for completion of the request or
identification of a new resource. For 201 (Created) responses, the Location
is that of the new resource which was created by the request. For 3xx
responses, the location SHOULD indicate the server's preferred URI for
automatic redirection to the resource. The field value consists of a single
absolute URI.

       Location       = "Location" ":" absoluteURI"


The question: are there any restrictions on what type or absoluteURI(s) are
allowed? For instance, is it legal to redirect to

a) mailto: URLs?

b) file: URLs?



Regards,

Julian




[1] <http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.10.3.3>
[2] <http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.14.30>


--
<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760
Received on Thursday, 12 September 2002 15:03:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:44:01 GMT