SMB URL

Michael B. Allen miallen at eskimo.com
Tue Mar 25 21:12:17 GMT 2003


On Tue, 25 Mar 2003 21:39:26 +0100
Stephan Kulow <coolo at kde.org> wrote:

> Hi!
> 
> I looked into the URL handling libsmbclient is doing and it's
> lacking quite some of the stuff that the DRAFT specifies (and
> some of the stuff that generally are required for URIs). Is
> someone working on that? 
> 
> I'm currently preparing some patches, but hate C programming
> enough to dump it for some other solution :)
> 
> Greetings, Stephan

Please look at the jCIFS mailing list for discussions in February
about the SMB URL. There was an interesting discussion about Unicode
hanlding. The problem of course is that URLs require characters outside
of ASCII to be escaped with %HH hex escapes. This is of course not very
reasonable with SMB URLs so hex escaping is not required. In practice
this should not be a problem because these URLs are not submitted as
parameters to text based RPCs like HTTP GET requests.

We did reach an important conclusion that would be influential to anyone
writing an SMB URL parser. That is, even though SMB URLs do not require
Unicode characters be escaped (for practical reasons) they should be
able to decode escaped Unicode characters. This begs the question; how
do you escape Unicode characters? The prevailing answer appears to be
specified in the W3C IRI documents which suggest each escape should be
treated as a byte in a UTF-8 multibyte sequence.

Otherwise, the SMB URL is reasonably well defined. Unicode handling was
the only remaining issue I believe. The jCIFS client implements all of
this functionality minus the decoding of escaped UTF-8 sequences.

Please join the jCIFS mailing list if you have specific questions. We
have had many interesting discussions there about the SMB URL, we have
implemented it completely, and there are three people who understand it
quite well. Chris and Eric have the brains. Me type.

I'm not familiar with the state of the libsmbclient SMB URL handling.

Mike

-- 
A  program should be written to model the concepts of the task it
performs rather than the physical world or a process because this
maximizes  the  potential  for it to be applied to tasks that are
conceptually  similar and, more important, to tasks that have not
yet been conceived. 


More information about the samba-technical mailing list