W3C home > Mailing lists > Public > www-talk@w3.org > January to February 2001

Re: Temp Redirect & relative URI's

From: Al Gilman <asgilman@iamdigex.net>
Date: Sat, 20 Jan 2001 19:50:59 -0500
Message-Id: <Version.32.20010120180043.04757c60@pop.iamdigex.net>
To: "Russell O'Connor" <roconnor@math.berkeley.edu>, <www-talk@w3.org>
Cc: uri@w3.org
At 02:31 PM 2001-01-20 -0800, Russell O'Connor wrote:
>When a document is retrived via a Temporary Redirect, and there is a link
>specified by a relative URI, is it resolved using the original URI, or the
>redirected URI?
>

What is in the Location header of the response that delivers the link to you,
when you follow the "temporarily moved to" redirect and GET what is at the
redirected Location?

The redirected URL, albeit a temporary.  If you are following a link within an
entity body that you recovered from the redirected Location, then the
redirected location is the innermost specification of BASE (barring an
explicit
BASE setting in the entity body itself) and that is what governs.  Within the
session while you have the entity body open that immediately resulted from the
redirected GET.

In

 rfc2396 - Uniform Resource Identifiers (URI): Generic Syntax
 <http://www.landfield.com/rfcs/rfc2396.html>http://www.landfield.com/rfcs/
rfc2396.html

it says rather explicitly

5.1.3. Base URI from the Retrieval URI

   If no base URI is embedded and the document is not encapsulated
   within some other entity (e.g., the top level of a composite entity),
   then, if a URI was used to retrieve the base document, that URI shall
   be considered the base URI.  Note that if the retrieval was the
   result of a redirected request, the last URI used (i.e., that which
   resulted in the actual retrieval of the document) is the base URI.

If you want the BASE to be evaluated to the un-temporary, un-redirected URL
set
a BASE inside the temporary document which you have located outside the normal
context.

Subsequent requests (after receiving and following a 307 redirect) for the
original resource itself should use the un-redirected URI, but subordinate
requests (following links from within what you got after following the
redirection) should use the redirected URI.

Al

>-- 
>Russell O'Connor                        roconnor@alumni.uwaterloo.ca
>          
<<http://www.math.berkeley.edu/~roconnor/>http://www.math.berkeley.edu/~roco
nnor/>
>``Paradoxically, a refusal to `put a monetary value on life' means that
>life is often undervalued.'' -- Artificial Intelligence: A Modern Approach
>  
Received on Saturday, 20 January 2001 19:41:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 October 2010 18:14:25 GMT