[jcifs] Re: SMB URL encoding/decoding
Christopher R. Hertel
crh at ubiqx.org
Sun Feb 24 13:34:43 EST 2002
Michael B Allen wrote:
> On Sun, 24 Feb 2002 02:35:09 +0100
> James Nord <teilo at teilo.net> wrote:
> > >Let's not loose the focus of the real problem here though. SMB
> > >servers allow the '@' sign but the various URL RFC's do not.
> > >
> > As do HTTP servers - FTP servers... why is the smb url the special
> I mean in general the other schemes don't support '@' in the path
> without escaping it (except in this case of FTP that you cited?). I'm
> not familiar with the intimate details but it seems to me the '@' is
> creating a special case for the SMB URL and if we can just dodge this
> one thing we can dump all the escaping (or at least you don't *have* to
> URL encode).
I think you are both right to some extent here. Generally speaking an '@'
char is in the <reserved> set and should typically by escaped. However...
net_path = "//" authority [ abs_path ]
abs_path = "/" path_segments
rel_path = rel_segment [ abs_path ]
path = [ abs_path | opaque_part ]
path_segments = segment *( "/" segment )
segment = *pchar *( ";" param )
param = *pchar
pchar = unreserved | escaped |
":" | "@" | "&" | "=" | "+" | "$" | ","
According to all that mess, the "@" is a legal pchar, and path strings are
made up of pchars. So... Yes, the "@" may be used unescaped in a path.
Captain Pedantic -)-----
Samba Team -- http://www.samba.org/ -)----- Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/ -)----- ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/ -)----- crh at ubiqx.mn.org
More information about the jcifs