On Sat, Mar 01, 2008 at 05:16:13PM +0100, Joerg Sonnenberger wrote:
On Sat, Mar 01, 2008 at 03:56:35PM +0000, Jeremy Henty 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".i
I don't think that's a valid relative URI,
RFC 2396 disagrees. Section "C.1. Normal Examples" explicitly cites "?y" as an example URI. That example also parses according to the regular expression they provide: $ perl -wnle 'print if m(^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$)' <<< '?foo=bar' ?foo=bar $
... but I would threat the empty path component as ".".
I think that would be consistent with RFC 2396 but not the earlier RFC 1808. As I said elsewhere I think RFC 1808 is clearly right on this point and I'm puzzled that RFC 2396 does not explain or even mention the change. Regards, Jeremy Henty