W3C home > Mailing lists > Public > uri@w3.org > January 2006

Re: path-abempty in URI

From: Frank Ellermann <nobody@xyzzy.claranet.de>
Date: Sat, 07 Jan 2006 19:42:53 +0100
To: uri@w3.org
Message-ID: <43C00BAD.40BC@xyzzy.claranet.de>

Tom Petch wrote:
 
> My understanding from reading the text is that <path-abempty>
> exists to ensure that there is always an authority between
> the // that comes after scheme: and before the // that may
> start a path

The "//" after the scheme ":" is only used in conjunction with
hier-part = "//" authority path-abempty

You can also have a scheme ":" with path-absolute, path-empty,
and path-rootless, and in these three cases there's no "//"
after the scheme ":".

1 - path-empty is 0<pchar>, no slashes in sight, next stop "?".
2 - path-absolute is "/" segment-nz etc., segment-nz is 1*pchar
    So here you have precisely one slash after the scheme ":".
3 - path-rootless starts with segment-nz, no "/" after the ":"

That leaves "//" authority path-abempty to get an interesting
number of slashes after the scheme ":".

Ignoring optional parts <authority> is at least a <host>, and
<host> is IP-literal / IPv4addrss / reg-name.  I'm positive
that the former are never empty, but <reg-name> can be empty.

path-abempty is zero or more "/" segment, and segment is zero
or more pchar.  So you can have file:///etc (three slashes),
and in theory also more slashes if the segments are "empty".

In practice file: is the only URI scheme I know that allows an
empty reg-name (in that case instead of localhost), are there
any other schemes with a similar "feature" ?

>      scheme:////SERVERA/////////////////////////?abnf=ok
> where the path is //SERVERA///... is allowed.  Comments?

Yes, you're right.  I didn't know that, thanks for info, bye
Received on Saturday, 7 January 2006 18:46:37 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:09 UTC