[jcifs] Re: SMB URL encoding/decoding

Christopher R. Hertel crh at ubiqx.org
Sun Feb 24 15:32:28 EST 2002


Michael B Allen wrote:
:
> > 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.
> 
> Ok, well then we're doing this all wrong. I want to know how the author
> of this grammer defines "authority" and how to traverse all the
> characters that might apear in the the password.

Yeah.  It's all there in RFC2396.  Note that 2396 supercedes at least two
others so there's a lot of history involved.  Not surprising that this stuff
is a little odd.

Just to yank everyone's chain there's a cute little bit of code they slip
into this document.  They write:

^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?

That's a regular expression that recognizes general URIs.  Geez.

Chris -)-----

-- 
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 mailing list