[jcifs] SMB URL
Christopher R. Hertel
crh at ubiqx.mn.org
Wed Jul 10 13:26:29 EST 2002
On Tue, Jul 09, 2002 at 10:40:56PM -0400, Allen, Michael B (RSCH) wrote:
:
:
> > Ouch. No, you should get
> >
> > smb://foo%2Ebar.what.snu.com
> >
> Try it with a web browser. The escapes are taken out. I will read
> the rest a little later.
The rest is probably better than that bit...
Anyway... I tried that string, and a few other variations, in NetScape.
I don't trust NetScape to exhibit "normal" behavior, but it didn't do what
you suggested. When I entered "http://jcifs%2Esamba.org/" it popped up a
message saying:
Netscape is unable to locate the server jcifs%2Esamba.org
...which, I think is the wrong thing to do. The escapes should be
translated before the name is passed to the DNS query.
Regarding my example: jcifs%2Esamba.org
The dot character is not reserved in a DNS name (the "host" field), so
there is no reason that it would be escaped. If it is internally
un-escaped and the re-escaped the dot might reasonably be left alone. If
viewed as DNS names, the strings "jcifs%2Esamba.org" and "jcifs.samba.org"
mean exactly the same thing.
On the other hand,
"anonymous:crh%40samba.org at us6.samba.org"
and
"anonymous:crh at samba.org@us6.samba.org"
are parsed differently, which changes semantics as well.
When I entered:
ftp://anonymous:crh%40samba.org@us6.samba.org/pub/samba/
I got FTP access to us6.samba.org. That worked correctly and Netscape
continued to show the %40 in the URL string as I moved up and down in the
directory tree.
[I have to admit, though, that Netscape also accepted
ftp://anonymous:crh@samba.org@us6.samba.org/pub/samba/
which is syntactically incorrect. Two '@'s should not be allowed in the
authority field. A credit to Netscape's parsing and "user
friendliness".]
Which browser did you test with? I have a selection to play with. It
would be interesting to see what happens.
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
OnLineBook -- http://ubiqx.org/cifs/ -)----- crh at ubiqx.org
More information about the jcifs
mailing list