On Sat, Mar 01, 2008 at 03:56:35PM +0000, Jeremy Henty (ie. *me*) wrote:
The problem appears when resolving a relative URI reference such as "?foo=bar" relative to a URI such as "http://a.b.c/e/f". Dillo resolves this to "http://a.b.c/e?foo=bar" ie. it loses the last path component.
I was slightly wrong. Dillo actually resolves the relative URI reference to "http://a.b.c/e/?foo=bar" (notice the trailing '/' in the path). However the example page I gave returns a redirect that strips the '/'.
Clearly Dillo should only lose the last path component of the base URI when the path of the relative is non-empty.
I've just noticed that RFC 2396 explicitly disagrees with me. From section C: C. Examples of Resolving Relative URI References Within an object with a well-defined base URI of http://a/b/c/d;p?q the relative URI would be resolved as follows: C.1. Normal Examples [snip] ?y = http://a/b/c/?y Interestingly, RFC 1808 explicitly agrees with me. 5. Examples and Recommended Practice Within an object with a well-defined base URL of Base: <URL:http://a/b/c/d;p?q#f> the relative URLs would be resolved as follows: 5.1. Normal Examples [snip] ?y = <URL:http://a/b/c/d;p?y> Even odder, in RFC 2396 "G.4. Modifications from RFC 1808" there is no mention of this change. It seems that they made the change but forgot to explain why. Weirderer and weirderer! Jeremy Henty