[jcifs] jCIFS MalformedURLException trying to get shares

Allen, Michael B (RSCH) Michael_B_Allen at ml.com
Fri Nov 8 15:26:19 EST 2002


> -----Original Message-----
> From:	Sundari Karra [SMTP:sundari at tek-tools.com]
> Sent:	Friday, November 08, 2002 1:51 AM
> To:	jcifs at lists.samba.org
> Subject:	[jcifs] jCIFS MalformedURLException trying to get shares
> 
> Hi,
> 
> I am using jCIFS 0.6.7 to get teh shares on a server.  But it is throwing a
> MalformedURLException with the smb url of this format:
> 	smb://test@test-domain.com:pwd@172.16.0.2/
> 
> The user name is of the format test at test-domain.com.  I think there seems to
> be parsing error because of the @ in the user name. Does anyone of any
> workaround for this problem?
	[Allen, Michael B (RSCH)]  

	This is an illegal URL. You *must* URL encode '@' (substitute '%40') if it is
	before the '@' used to separate credentials for the host in the authority
	component.

	   smb://test%40test-domain.com:pwd@172.16.0.2/

	Incidentally there is a related bug in 0.6. If you have a URL like:

	   smb://creds@server/share/path/me@thebeach/

	then 'thebeach' will be mistaken as the server name. There was a major
	overhaul of URL code in 0.7 to fix exactly this problem. See Sept. 26 news
	bullet on our homepage. But this does not apply to the problem you're
	describing. In 0.7 would still need to (and will forever need to) URL encode
	'@' in the credentials of the authority component.







More information about the jcifs mailing list