W3C home > Mailing lists > Public > public-xg-webid@w3.org > January 2012

Re: redirects and relative URLs

From: Henry Story <henry.story@gmail.com>
Date: Sun, 29 Jan 2012 14:12:51 +0100
Cc: Liste SW-W3C <semantic-web@w3.org>, Linked Data community <public-lod@w3.org>, WebID XG <public-xg-webid@w3.org>, public-webid@w3.org
Message-Id: <2B03214B-29E8-49DC-AD7D-485D2F5E5566@gmail.com>
To: John Erickson <olyerickson@gmail.com>

On 29 Jan 2012, at 14:03, John Erickson wrote:

> Henry asked:
>> If I dereference a URL which contains a redirect to another resource, and that
>> resource contains relative URLs, how should the relative URLs of the returned
>> document be completed? With the initial URL? Or with the one given in the Location
>> header (or some other header?) of the last document?
>> 
>> Perhaps this has been written up somewhere?
> 
> Doesn't RFC 3986 <http://www.ietf.org/rfc/rfc3986.txt> speak to this?
> 
> 5.1.3.  Base URI from the Retrieval URI
> 
> If no base URI is embedded and the representation is not encapsulated
> within some other entity, then, if a URI was used to retrieve the
> representation, 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., the URI that resulted in the actual retrieval of the
> representation) is the base URI.

Thanks John,

   that is really important. It is easy to get this wrong. Some tools like
Apache's HTTP client do such a good job at redirecting that it is easy to
miss this. 

Here is the HTTP version of the RFC. 

   http://tools.ietf.org/html/rfc3986#section-5.1.3

Just forwarding this to WebID Community Group [1], as of course this is
very important there, since it would make a big difference as to what is
considered the WebID finally.


  Henry

PS. The WebID Incubator Group just switched to a community Group 
    http://www.w3.org/community/webid/
  Please feel free to join the community!

> 
> 
> -- 
> John S. Erickson, Ph.D.
> Director, Web Science Operations
> Tetherless World Constellation (RPI)
> <http://tw.rpi.edu> <olyerickson@gmail.com>
> Twitter & Skype: olyerickson

Social Web Architect
http://bblfish.net/



Received on Sunday, 29 January 2012 13:13:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 29 January 2012 13:13:41 GMT