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 John Smith <de...@gmail.com> on 2010/04/21 09:33:48 UTC

How can I except uri encoding?

I use HttpClient in my http debugger project.
And I need send parameters without any conversion.
I found a way for POST method, but I couldn't found that functionality
for GET method.
When I try  to send something like that "GET http://localhost/?er$%@%"
I get exception. Of course I realized that my request is incorrect,
but I have to send it to server.

I checked out in HttpClient sources and saw this:

public HttpGet(final String uri) {
        super();
        setURI(URI.create(uri));
    }


Have I got any possibilities for circumvent restriction?

Thanks for your help.

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: How can I except uri encoding?

Posted by John Smith <de...@gmail.com>.
O-o-o, it's great!
Oleg, thank you very much for your answer!

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: How can I except uri encoding?

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Wed, 2010-04-21 at 10:30 +0200, John Smith wrote:
> On Wed, Apr 21, 2010 at 9:43 AM, Christophe Marchand
> <ch...@axyus.com> wrote:
> > URLEncoder.encodeUrl(...) ???
> >
> > Regards,
> > Christophe
> >
> 
> No, no. I know that and use.
> When I use that I'll transform request from
> GET http://localhost/?er$%@%
> to
> GET http://localhost/?er%24%25%40%25
> 
> It's correct and correspond with RFC. I agree.
> 
> But I need send request WITHOUT any encoding.
> 
> When request (it's just example)
> GET http://localhost/?er$%@%
> send as
> GET http://localhost/?er$%@%
> without any transforming.
> 
> I suppose that sounds some strange, but I need it.
> 
> Of course I can send that if I use plain sockets, but
> HttpClient very useful and nice library.  I hope that it has implements for it.
> 
> Christophe, thank you very much for your help!
> May be anybody has any other ideas?
> 

If you are absolutely $%@%ing sure abusing HTTP is not a $%@%ing
problem, you can use HttpCore instead of plain sockets. You will lose
connection management, cookies and authentication capabilities provided
by HttpClient but you will be able to bend HTTP protocol pretty much
whatever way you please.

HttpCore is used internally by HttpClient

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: How can I except uri encoding?

Posted by John Smith <de...@gmail.com>.
On Wed, Apr 21, 2010 at 9:43 AM, Christophe Marchand
<ch...@axyus.com> wrote:
> URLEncoder.encodeUrl(...) ???
>
> Regards,
> Christophe
>

No, no. I know that and use.
When I use that I'll transform request from
GET http://localhost/?er$%@%
to
GET http://localhost/?er%24%25%40%25

It's correct and correspond with RFC. I agree.

But I need send request WITHOUT any encoding.

When request (it's just example)
GET http://localhost/?er$%@%
send as
GET http://localhost/?er$%@%
without any transforming.

I suppose that sounds some strange, but I need it.

Of course I can send that if I use plain sockets, but
HttpClient very useful and nice library.  I hope that it has implements for it.

Christophe, thank you very much for your help!
May be anybody has any other ideas?

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: How can I except uri encoding?

Posted by Christophe Marchand <ch...@axyus.com>.
URLEncoder.encodeUrl(...) ???

Regards,
Christophe

John Smith wrote:
> I use HttpClient in my http debugger project.
> And I need send parameters without any conversion.
> I found a way for POST method, but I couldn't found that functionality
> for GET method.
> When I try  to send something like that "GET http://localhost/?er$%@%"
> I get exception. Of course I realized that my request is incorrect,
> but I have to send it to server.
>
> I checked out in HttpClient sources and saw this:
>
> public HttpGet(final String uri) {
>         super();
>         setURI(URI.create(uri));
>     }
>
>
> Have I got any possibilities for circumvent restriction?
>
> Thanks for your help.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>
>   



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org