You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Gerardo Corro <ro...@hotmail.com> on 2009/07/15 17:07:45 UTC
Encoding/Decoding
Hi HC people,
I'm implementing a filter that processes requests from many sources, and I always do a redirection at the end, the problem I have is that some request are encoded with:
URLEncoder.encode(reqString, "UTF-8");
others not, so in my filter those that are not encoded work properly with:
httpMethod.setURI(new URI(resourcePath.toString(), false));
and those that are encoded work properly with:
httpMethod.setURI(new URI(resourcePath.toString(), true));
How can I know whether or not an incoming request was encoded? or How can I deal with this?
Thanks in advanced!
_________________________________________________________________
Windows Live™: Keep your life in sync. Check it out!
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009
Re: Encoding/Decoding
Posted by Oleg Kalnichevski <ol...@apache.org>.
Gerardo Corro wrote:
> Hi HC people,
>
>
> I'm implementing a filter that processes requests from many sources, and I always do a redirection at the end, the problem I have is that some request are encoded with:
>
> URLEncoder.encode(reqString, "UTF-8");
>
> others not, so in my filter those that are not encoded work properly with:
>
> httpMethod.setURI(new URI(resourcePath.toString(), false));
>
> and those that are encoded work properly with:
>
> httpMethod.setURI(new URI(resourcePath.toString(), true));
>
> How can I know whether or not an incoming request was encoded? or How can I deal with this?
>
I am afraid you can't. There is a reason why people are supposed to use
standards.
Oleg
> Thanks in advanced!
>
>
>
> _________________________________________________________________
> Windows Live™: Keep your life in sync. Check it out!
> http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org