commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wynand <>
Subject HttpClient 3.0 - Tunneled HTTPS connections through HTTP proxies
Date Tue, 18 Oct 2005 12:30:24 GMT
Hi All,
 I've just started using the commons httpclient 3.0 rc4. It works just as
expected, except for connecting to a HTTPS site through a HTTP proxy
I have tried the the example as per the SSL guide, but to no avail; I get
the following error :
 2005/10/18 13:28:19:234 CAT [DEBUG] HttpMethodDirector - The server <> failed to respond <
org.apache.commons.httpclient.NoHttpResponseException: The server <> failed to respond>
org.apache.commons.httpclient.NoHttpResponseException: The server <> failed to respond
at org.apache.commons.httpclient.HttpMethodBase.readStatusLine (
at org.apache.commons.httpclient.HttpMethodBase.readResponse(
at org.apache.commons.httpclient.HttpMethodBase.execute(
at org.apache.commons.httpclient.ConnectMethod.execute (
at org.apache.commons.httpclient.HttpMethodDirector.executeConnect(
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry( :388)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(
at org.apache.commons.httpclient.HttpClient.executeMethod(
at org.apache.commons.httpclient.HttpClient.executeMethod (
at com.wolman.webagent.TestCase.simplestTest(
at com.wolman.webagent.TestCase.main(
 Just to clarify here is the example i used :
 HttpClient httpclient = new HttpClient();
httpclient.getHostConfiguration().setProxy("myproxyhost", 8080);
httpclient.getState().setProxyCredentials("my-proxy-realm", " myproxyhost",
new UsernamePasswordCredentials("my-proxy-username", "my-proxy-password"));
GetMethod httpget = new GetMethod("**");
 It works fine if I change the *https* to *http* in the url. Can someone
please confirm that this example is indeed working or if I'm missing
 Thanks alot

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message