[jcifs] jcifs bug?

Allen, Michael B (RSCH) Michael_B_Allen at ml.com
Tue Feb 26 11:07:33 EST 2002


> -----Original Message-----
> From:	Bernie Wieser [SMTP:bernie.wieser at calgary.qcdata.com]
> Sent:	Monday, February 25, 2002 4:35 PM
> To:	James Nord; Michael B Allen
> Cc:	jcifs at samba.org
> Subject:	RE: [jcifs] jcifs bug?
> 
> 
> Spec says protocol://[user@]host[:port]/fully_qualified_path
> (well, //<user>:<password>@<host>:<port>/<url-path> )
> 
> Problem is, I just can't pass fully_qualified_path to URLEncoder.encode
> because the '/' will get escaped and then jcifs.UniAddress.getByName
> explodes again.
> 
	In this case you will have to enumerate and encode each component
	separately. If you must encode these values (as opposed to your users) you
	could write your own encoder that scans over the path for '@', '%', and '+' and
	then breaks out and encodes each path component when necessary. Also, at
	the moment, jCIFS only decodes the path and not the server or auth
	information. This will change in the future at which point it will be necesary to
	encode '%' and '/' in everything before the server rather than after but I think
	we've decided that should turn out to be a little easier to deal with.

	Mike





More information about the jcifs mailing list