
Andre Merzky wrote:
Quoting [Ceriel Jacobs] (Dec 13 2007):
Andre Merzky wrote:
Quoting [Thilo Kielmann] (Dec 13 2007):
The motivation for relative paths is: an absoute path immediately becomes a URL, (well, a URL-shaped string) Why is that?
tmp/data.bin <-- relative /tmp/data.bin <-- absolute
http://localhost/tmp/data.bin <-- relative Well, according to RFC 1738 it is, but RFC 1738 has been superseeded by RFC 2396, which in turn has been superseeded by RFC 3986. Both of these consider the above an absolute URI, with an absolute path "/tmp/data.bin".
Uhm, how is a relative path then expressed? I tried to read that from the document but couldn't... Or is that impossible in an absolute URI? (I take that this is an URI where scheme and authority are present?)
I guess the idea is that a relative path is always with respect to another URI. An absolute URI is one with a scheme. So, if it has a scheme, it is absolute and not relative to some other URI. So, indeed, you cannot specify a relative path in an absolute URI. Note that a relative URI can represent an absolute path but still be relative to another URI with respect to scheme and authority. Cheers, Ceriel