[Standards-JIG] Re: query component in XMPP URIs

Byron Ellacott bje at apnic.net
Thu Sep 30 01:10:22 UTC 2004

Alex Mauer wrote:
> Nolan Eakins wrote:
>>And why do some URI schemes make use of double slashes, like "http://"? Is
>>there a reason for them? I'm not suggesting them--yet anyway.
> The second slash is the top of the path.

An interesting take on it, but wrong.

http://www.ietf.org/rfc/rfc1738.txt section 3.1 says:

---- snip ----
    While the syntax for the rest of the URL may vary depending on the
    particular scheme selected, URL schemes that involve the direct use
    of an IP-based protocol to a specified host on the Internet use a
    common syntax for the scheme-specific data:


    Some or all of the parts "<user>:<password>@", ":<password>",
    ":<port>", and "/<url-path>" may be excluded.  The scheme specific
    data start with a double slash "//" to indicate that it complies with
    the common Internet scheme syntax. The different components obey the
    following rules:
---- snip ----

Also, if you're using a "file:" URL, the host part is not optional.  It 
is often omitted, and most URL parsing implementations can correct for 
its absence, but you /should/ be seeing "file:///foo" or 
"file://localhost/foo".  You can refer to files on other hosts, if you 
so wish, but this use is uncommon.

And, finally, by a strict interpretation the '/' separating the host and 
the url-path is not part of the url-path; on a Unix host paths are 
relative to the root directory, but on a Windows host you will often see 
a drive specification in the url-path.


More information about the Standards mailing list