W3C home > Mailing lists > Public > uri@w3.org > July 2005

Re: URL resolution sanity check

From: Stefan Eissing <stefan.eissing@greenbytes.de>
Date: Tue, 19 Jul 2005 14:53:03 +0200
Message-Id: <c0f0d30261010a064848d3d16138cee0@greenbytes.de>
Cc: uri@w3.org
To: Elliotte Harold <elharo@metalab.unc.edu>


Am 19.07.2005 um 14:25 schrieb Elliotte Harold:

>
> I need to confirm something. Consider the following situation:
>
> <parent xml:base="http://www.example.com/data/limit/..">
>   <child xml:base="test.xml"/>
> </parent>
>
> Is the base URL of the child element
> http://www.example.com/data/limit/test.xml or
> http://www.example.com/data/test.xml ?
>
> In other words, is http://www.example.com/data/limit/.. essentially the
> same as http://www.example.com/data/limit/../ or not?
>
> Both the algorithms in RFC 2396 and 3RFC 986 seem to indicate that the 
> result is http://www.example.com/data/limit/test.xml, not 
> http://www.example.com/data/test.xml. I'm not sure if:
>
> A. I'm misreading the algorithm
> B. This is a bug in the algorithm
> C. This is an often unrecognized but intended consequence of the 
> specification
>
> The problem is that both 2396 and 3986 remove the segment following 
> the last slash *before* removing dot segments. Thus 
> http://www.example.com/data/limit/.. and 
> http://www.example.com/data/limit/../ do not get treated the same.

So do http://example.org/x and http://example.org/x/

I think this just follows from the UNIX idea that "." and ".." are just 
two normal directory entries.

//Stefan
Received on Tuesday, 19 July 2005 12:53:11 UTC

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