W3C home > Mailing lists > Public > uri@w3.org > June 2003

Semantic Bug

From: Rob Cameron <cameron@cs.sfu.ca>
Date: Fri, 13 Jun 2003 10:30:37 -0700 (PDT)
Message-Id: <200306131730.h5DHUbG07095@orpheus.cs.sfu.ca>
To: uri@w3.org

It appears that there is a semantic bug in the URI spec in the
resolution of relative URIs.  Consider resolution of the
relative URI ".//g" in the context of the base URI "f:/a".
Should the result be "f:/.//g" or "f://g"?

It seems to me that only "f:/.//g" makes sense; the URI "f://g"
re-interprets the path segment "g" as an authority component.

However, the spec and three reference implementations all seem
to agree that "f://g" is the answer specified.

>>> join('f:/a','.//g')

URI.hs (Graham Klyne)
URI> absoluteUriPart "f:/a" ".//g"

URIbis3.py (me)
>>> resolve_relative_URI('f:/a', './/g')

At least part of the solution seems to me that the 
recomposition of parsed URIs (section 5.3) must be 
modified to deal with the potential ambiguity.  If the
authority is undefined and the path begins "//", then
"/." must be appended to the result before the path is.
Received on Friday, 13 June 2003 13:30:39 UTC

This archive was generated by hypermail 2.4.0 : Sunday, 10 October 2021 22:17:43 UTC