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

Resolving relative URI's

From: Russell Steven Shawn O'Connor <roconnor@wronski.math.uwaterloo.ca>
Date: Sun, 15 Feb 1998 16:35:55 -0500 (EST)
To: www-talk@w3.org
Message-ID: <Pine.SOL.3.95q.980215162137.12920E-100000@wronski.math.uwaterloo.ca>

From draft-fielding-uri-syntax-01
Appendix C.2

   All client applications remove the query component from the base URI
   before resolving relative URIs.  However, some applications fail to
   separate the reference's query and/or fragment components from a
   relative path before merging it with the base path.  This error is
   rarely noticed, since typical usage of a fragment never includes the
   hierarchy ("/") character, and the query component is not normally
   used within relative references.

      g?y/./x       =  http://a/b/c/g?y/x
      g?y/../x      =  http://a/b/c/x
      g#s/./x       =  http://a/b/c/g#s/./x
      g#s/../x      =  http://a/b/c/g#s/../x

These first two examples really confuses me.  I though the URI is divided
up into components:

	  <first>/<second>;<third>?<fourth>

o g?u/../x is divided up into the path component g and the query
component u/../x.  I though the .. and . were only applied as a special
case to the path component.  in this case since the .. (.) are in the
query component, I'd expect the to resolve to http://a/b/c/g?y/../x (and
http://a/b/c/g?y/./x).  After reading over the suggested algorithm in
section 5.2, I reach the same conclusion.

Can someone explain these two abonormal examples?

-- 
Russell O'Connor                           roconnor@uwaterloo.ca
    <URL:http://www.undergrad.math.uwaterloo.ca/%7Eroconnor/>
"And truth irreversibly destroys the meaning of its own message"
-- Anindita Dutta, "The Paradox of Truth, the Truth of Entropy"
Received on Sunday, 15 February 1998 16:36:16 GMT

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