[jcifs] URL Decoding Enabled

Allen, Michael B (RSCH) Michael_B_Allen at ml.com
Tue Dec 31 14:51:22 EST 2002


> -----Original Message-----
> From:	Christopher R. Hertel [SMTP:crh at ubiqx.mn.org]
> Sent:	Monday, December 30, 2002 10:46 PM
> To:	Allen, Michael B (RSCH)
> Cc:	'jcifs at samba.org'
> Subject:	Re: [jcifs] URL Decoding Enabled
> 
> Gut reaction is that the escape handling should be done after the URL has 
> been completely parsed, and then the individual parts should be re-escaped 
> before building the URL back from the parts.
> 
	It does. The jcifs/smb/Handler.java class basically gives you the components
	broken down based on RFC 29whatever. You have a limited capacity to
	mangle/decode/change things and then call setURL to set each component. The
	question was wheather or not it is really necessary logically to URL decode anything
	but the user info. I don't think so but I have not wrapped my brain around this stuff
	in a while.

> Looks as though there's a bit of the message missing, yes?
> 
	Ah, I removed the TestSmbURL output but forgot to remove the reference to it. It
	didn't really show anything.


> On Mon, Dec 30, 2002 at 07:21:14PM -0500, Allen, Michael B (RSCH) wrote:
> > I still have not enabled URL decoding of '%' escapes in 0.7. I don't recall if I simply forgot about this or was waiting for things to stablize before throwing in another wrench but here it comes.
> Did
> > we conclude that it was necessary to decode the *entire* URL? Natrually we would like to have a URL with an '@' in the path without being required to unconditionally encode it. Normally this sort
> of
> > thing is handled by the client application (like a web browser) but because of how the SMB URL is integrated into the library some decoding is necessary.
> > 
> > I have enabled decoding of '@' in the user info component "dom;user:pass" but that's it. There is no decoding of server or path components nor is '+' decoded as a space like:
> > 
> >     smb://dom;us%61r:p%40ss@server/share/p@th/to/Some File.pdf
> > 
> > Below is some sample examples/TestSmbURL output. Does this agree with everyone?
> > 
> > 
> > 
> 
> -- 
> 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