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

Re: draft-fielding-uri-rfc2396bis-02

From: Rob Cameron <cameron@cs.sfu.ca>
Date: Sun, 25 May 2003 07:13:12 -0700 (PDT)
Message-Id: <200305251413.h4PEDC220163@orpheus.cs.sfu.ca>
To: uri@w3.org

Following up on issue 033, the following equation is an
important test of consistent implementations:
resolve_relative_URI(compute_relative_URI(u, base), base) = u

To satisfy this for all examples in section 5.4 of rfc2396bis-02,
a change in the algorithm of section 5.2 is required.
The change is needed to ensure that the ./  and ../ processing 
is applied even when a relative  URI is a path starting with "/".
In my implementation:
                if R_path[0] == "/": T_path = merge('', R_path[1:])

A parser and URI processing algorithms that pass all the tests
are available for examination and comment at the following URL.
http://www.cs.sfu.ca/~cameron/uri/URIbis2.py
The parser is based on abnf2re and the algorithms include
compute_relative_URI as described yesterday, with one bug fix
to handle the authorityless relative URI.  

The test program is available as well.
http://www.cs.sfu.ca/~cameron/uri/bis2tests.py
Received on Sunday, 25 May 2003 10:13:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 13 January 2011 12:15:31 GMT