[jcifs] SMB URL parsing buglet?
Allen, Michael B (RSCH)
Michael_B_Allen at ml.com
Thu Sep 5 14:38:40 EST 2002
> -----Original Message-----
> From: Christopher R. Hertel [SMTP:crh at ubiqx.mn.org]
> Sent: Thursday, September 05, 2002 12:04 AM
> To: jcifs at samba.org
> Subject: [jcifs] SMB URL parsing buglet?
>
> Mike,
>
> java List smb://192.168.101.16/c/My%20Download%20Files
>
> dumps an exception, but
>
> java List "smb://192.168.101.16/c/My Download Files"
>
> works fine. The % escapes should work, though.
>
True. I believe we determined it was only necessary to URL encode the authority
component before the '@' (e.g. another '@'). So if it's not necessary to URL encode
path names I don't bother to try and decode them for the sake of performance. But
with applications like NetworkExplorer it would be a great idea to URL decode these.
> I seem to recall that there were some URL issues that you hadn't had time to
> look at yet.
>
The big issues were resolved. There are some pathalogical canonicalization issues but
I don't think they would be encountered in the wild really. I would rather put effort into
other things at the moment. Later, I will write a little state machine to parse these URLs.
That should be better, smaller, and more extensible. Same principle as the one I have
at the bottom of my homepage here:
http://www.eskimo.com/~miallen/
for parsing CSV lines.
You might give it a shot actually. It's fun. Just have a loop around a switch( state ) and
then do your transition routine within each case block. I've applied little state machines
over and over in other projects. I'd be happy to go back and fourth about your code.
Doesn't require much Java knowledge. More like using c really which is probably more
your speed. Seems appropriate for you to do it anyway. Probably do it better than I would.
More information about the jcifs
mailing list