A stack trace would be helpful here, but it will almost certainly be
because of the "|" (pipe) character, which is considered an unsafe
character and should be encoded. Java's URLEncoder class will help you
here, but you shouldn't run the whole URL through the URLEncoder -
that will almost certainly give you an unusable URL!

I'd also suggest searching the mailing list archives on this one, it's
been discussed many times.

Thanks,

Sam



On 23 November 2011 08:42, Sreejith S <[email protected]> wrote:
> Hi all,
>
> HttpClient throws illegalArgumentException when calling urls of kind
>
> http://www.economist.com/node/21534742?fsrc=rss|ltr
> http://www.economist.com/node/21536537?fsrc=rss|ltr
> http://www.economist.com/node/21536537?fsrc=rss|ltr
> http://www.economist.com/node/21534742?fsrc=rss|ltr
> http://www.economist.com/node/21531410?fsrc=rss|ltr
> http://www.economist.com/node/21532241?fsrc=rss|ltr
> http://www.economist.com/node/21533394?fsrc=rss|btn
>
> And its all working fine with Java URL class. Is it due to any strict rules
> imposing in http-client??
> I would like to know how to tackle this.
>
> Thank You,
>
>
> --
>
>
> *Sreejith.S*
> http://srijiths.wordpress.com/
> * *http://sreejiths.emurse.com/
>
> tweet2sree@twitter <http://tweet2Sree>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to