[jcifs] Re: SMB URL encoding/decoding

Christopher R. Hertel crh at ubiqx.org
Sun Feb 24 15:27:59 EST 2002


James Nord wrote:
:
> See the mail that started this thread.  jCifs then has a url parsing bug.
> I have been mixing implementation with drafts and confusing myself (and
> others?)

Well, the SMB URL format is not finalized yet.  Still a draft.  The jCIFS
implementation is a very good way to work out bugs in the draft, and vice
versa.  I get much better feedback from jCIFS than I do from some of the
other implementations (it varies...there are some really good folk out
there).

> URL is smb://HI137/D$/Documents and Settings/ryar/seti at home.txt
> java.net.UnknownHostException: home.txt

Given the syntax rules in the URL RFC (rfc2396), it shoult read:

  smb://HI137/D$/Documents%20and%20Settings/ryar/seti#home.txt

That's the painfully correct version.  RFC2396 goes into detail regarding
the use of whitespace in a URL string (they don't like it), but many
browsers will accept the spaces anyway.  (Just as many browsers will
accept really bad HTML code and render it anyway...browsers are in the
business of making things easy when they can.)

A note... I looked all through the RFC and found nothing about translating
the '+' into a space.  Annoying, as I know it was there in the early days.

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