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 Riad Souissi <rs...@stc.com.sa> on 2005/02/12 13:35:03 UTC
Problems using the HTTPClient through a proxy
Hi all,
I am using HTTPClient 3.0-rc1.
I am connecting to an HTTPS site through a proxy.
1) I used HTTPLook to see the HTTP messages between the Proxy and the
HTTPClient.
I noticed that it always used HTTP/1.1 and I could not find how to get
the HTTPClient to use HTTP/1.0 with the proxy instead.
The setVersion() method, when used, only impacts the tunneled HTTP
protocol between the HTTPClient and the target host.
=> Do you know how I can force the client to use HTTP/1.0 with the proxy
?
2) I also that the HTTPClient does not specify the Content-Length in the
HTTP header with the Proxy.
This seems to cause the Proxy to reject the connection from the
HTTPClient.
When I use the Internet Explorer, I can see that Content-Length is
specified (value is 0).
=> Do you know how I can force the client to specify this header with
the proxy ?
Thanks in advance,
riad
DiscalimerThe information in this email and in any files transmitted with it,
is intended only for the addressee and may contain confidential and/or privileged material.
Access to this email by anyone else is unauthorized. If you receive this in error,
please contact the sender immediately and delete the material from any computer.
If you are not the intended recipient, any disclosure, copying, distribution or
any action taken or omitted to be taken in reliance on it, is strictly prohibited.
Statement and opinions expressed in this e-mail are those of the sender, and do not
necessarily reflect those of STC.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
Re: Problems using the HTTPClient through a proxy
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Sat, 2005-02-12 at 15:35 +0300, Riad Souissi wrote:
> Hi all,
>
> I am using HTTPClient 3.0-rc1.
> I am connecting to an HTTPS site through a proxy.
>
> 1) I used HTTPLook to see the HTTP messages between the Proxy and the
> HTTPClient.
> I noticed that it always used HTTP/1.1 and I could not find how to get
> the HTTPClient to use HTTP/1.0 with the proxy instead.
> The setVersion() method, when used, only impacts the tunneled HTTP
> protocol between the HTTPClient and the target host.
Riad,
setVersion() should also work for proxy communication. Please post the
wire/context log of the HTTP session. See
<http://jakarta.apache.org/commons/httpclient/3.0/logging.html> for
details. I'll take a look at the log
>
> => Do you know how I can force the client to use HTTP/1.0 with the proxy
> ?
>
> 2) I also that the HTTPClient does not specify the Content-Length in the
> HTTP header with the Proxy.
> This seems to cause the Proxy to reject the connection from the
> HTTPClient.
It should not. The Content-Length (or Transfer-Encoding) is required for
entity enclosing methods. HTTP CONNECT is not supposed to enclose an
entity
>
> When I use the Internet Explorer, I can see that Content-Length is
> specified (value is 0).
>
Well, after all, it is IE.
Oleg
> => Do you know how I can force the client to specify this header with
> the proxy ?
>
> Thanks in advance,
> riad
>
> DiscalimerThe information in this email and in any files transmitted with it,
> is intended only for the addressee and may contain confidential and/or privileged material.
> Access to this email by anyone else is unauthorized. If you receive this in error,
> please contact the sender immediately and delete the material from any computer.
> If you are not the intended recipient, any disclosure, copying, distribution or
> any action taken or omitted to be taken in reliance on it, is strictly prohibited.
> Statement and opinions expressed in this e-mail are those of the sender, and do not
> necessarily reflect those of STC.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org