[jcifs] Re: SMB URL encoding/decoding
James Nord
teilo at teilo.net
Mon Feb 25 01:34:30 EST 2002
Christopher R. Hertel wrote:
>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.
>
Why is
smb://HI137/D$/Documents%20and%20Settings/ryar/seti@home.txt
incorect? @ is a valid pchar.
We could alwasy escape all the valid characters-
smb://HI137/D$/%44%6f%63...
I see no reason why that is more or less correct?
>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.)
>
Always be strict on forming and forgiving on parsing.
>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.
>
Is this not just special for form data in HTTP? I don't recall seeing
this escape sequence in a path before. (not really important now in any
case)
/James
More information about the jcifs
mailing list