Is there any java class/commons libraries which can encode the url that
HttpClient accepts.

Thank You
Kyama 

-----Original Message-----
From: Roland Weber [mailto:[EMAIL PROTECTED] 
Sent: Sunday, July 30, 2006 9:56 AM
To: HttpClient User Discussion
Subject: Re: Problem with encoded url param to HttpClient.

Kyama Ashok-E51121 wrote:
>  Hi,
> 
> Iam passing result of
> URLEncoder.encode(http://200.12.23.21:8898/PCT/content\update\pack\mul
> ti
> .xml) to HttpClient GetMethod(url).
>  And I got the exception:
> java.lang.IllegalArgumentException: Invalid uri
> 'http://200.12.23.21:8898/PCT/content\update\pack\multi.xml': escaped 
> absolute path not valid

The URL is invalid because it contains backslashes.
URLEncoder does *not* generate valid URLs, it only generates
*parameters* in a URL-safe encoding.
That's for the "...?param=value" part of a URL.

cheers,
  Roland

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to