file:/ vs file://<host>/ vs file:///

Glenn McGrath bug1 at iinet.net.au
Thu Nov 4 14:45:36 EET 2004


The file-uri-spec says that "file:/<path>" shouldnt be used as it isnt
correct according to RFC1738.

The file-uri-spec says we should use file://localhost/<path> or
file:///<path>

RFC2396 says the format of a URI is

absoluteURI = scheme ":" ( hier_part | opaque_part )
hier_part = ( net_path | abs_path ) [ "?" query ]
net_path = "//" authority [ abs_path ]
abs_path = "/"  path_segments

Clearly file:/<path> is compatable with RFC2396

The "//" seperator is meant to represent a network location. I think its
very unlikely that the file scheme would be used with a remote host, so
it doenst make much sense. Using "localhost" or not specifying a host as
a way of trying to negating the meaning of "//" is confusing and not
necessary.

As "//localhost" is a net_path redirected to the the local machine, why
not just use "/", the abs_path, it seems it was designed for this
purpose.

I suggest the file-uri-spec be updated or removed as it only adds more
confusion which is counter productive to the purpose of any spec.



Glenn



More information about the xdg mailing list