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

Re: URI Scheme that needs help.

From: Frank Ellermann <nobody@xyzzy.claranet.de>
Date: Thu, 11 Jan 2007 23:09:25 +0100
To: uri@w3.org
Message-ID: <45A6B595.39A0@xyzzy.claranet.de>
Cc: uri-review@ietf.org

Christopher R. Hertel wrote:

> If the scheme is going to support workgroups at all, however, then
> I think we need to maintain the "smb://" semantics.

Excluding the special case smb:// (I try to tackle that below) what
you have about absolute URLs should work.  One problem pointed out
by Claus was for relative URLs using /.. segments:  You can't invent
special rules for ../bar at smb://foo/ resulting in  smb://bar/, the
general rules in RFC 3986 don't allow this.

The reason is that all UAs will handle "." and ".." as specified in
chapter 5.2 of RFC 3986, no matter what the actual scheme is, smb or
ftp or anything else using path-segments separated by slashes.

And with that algorithm there's no relative way from smb://foo/ to
smb://bar/ because "//foo" is parsed as "authority".  I think you're
forced to accept this, here the "U" (uniform) in "URI" beats scheme-
specific ideas.

For the smb: vs. smb:// issue I can't tell what's better, the general
syntax apparently allows an "empty authority" as in smb://  

   URI           = scheme ":" hier-part [ "?" query ] [ "#" fragment ]

Remove query and fragment, there's no "?" and no "#" in "smb://"
Identify "smb" as scheme, ":" as separator, that leaves "//"

   hier-part     = "//" authority path-abempty

The only way to get "//" at this position, so now we need an empty
authority and an empty path-abempty to finish this.

   path-abempty  = *( "/" segment )

path-abempty can be completely empty (zero segments).

   authority     = [ userinfo "@" ] host [ ":" port ]

userinfo and host are only optional, now we need an empty host (of
course this is okay as in "file:///", but I check the host anyway):

   host          = IP-literal / IPv4address / reg-name

No chance with the literals, they're never empty.  Therefore we need
an empty reg-name:

   reg-name      = *( unreserved / pct-encoded / sub-delims )

Bingo, zero or more characters, we pick zero.  "smb://" is allowed,
syntactically.  But Claus only wrote that '"smb://" also does not
fit into the generic SMB syntax', that's not the generic URI syntax.

Received on Thursday, 11 January 2007 22:15:35 UTC

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