hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Problems with HttpAsyncClient 4.0-beta4 with SSL and Proxy
Date Fri, 18 Oct 2013 09:33:17 GMT
On Thu, 2013-10-17 at 15:34 -0700, Johannes Kienzle wrote:
> Hi all,
> 
> we noticed that since beta4, the async client doesn't work when using a
> proxy and making SSL connections. It worked fine in previous versions and
> also works well with the regular HttpClient (4.3.1). Also, it works fine
> with non-SSL connections.
> 
> Relevant snippet as follows (I'm using a local squid proxy for testing):
> HttpHost proxy = new HttpHost("localhost", 3128, "http");
>  RequestConfig requestConfig = RequestConfig.custom()
> .setProxy(proxy)
> .build();
> 
> httpclient = HttpAsyncClients.custom()
> .setDefaultRequestConfig(requestConfig).build();
> 
> httpclient.start();
> 
> HttpGet request = new HttpGet("https://issues.apache.org:443");
> 
> final Future<HttpResponse> future = httpclient.execute(request,
> null);
> // this times out
>  HttpResponse response = future.get(5000, TimeUnit.MILLISECONDS);
> HttpEntity entity = response.getEntity();
> 
> The regular client seems to establish the tunnel and then sends the GET,
> finally closing the connection.
> The AsyncClient seems to never get past the point of creating the tunnel,
> but releases and establishes the connection again and again. Any ideas?
> 
> Full sample code, trying with both HttpClient and HttpAsyncClient:
> https://org62.my.salesforce.com/sfc/p/000000000062/a/30000000EiOB/RZRLGymga6mC9q76VfzGChGGRFIWcArUS0uW1ECrI9A=
> 
> The trace logs contain two parts: Test with the synchronous HTTPClient
> (works) and test with the HttpAsyncClient (doesn't work):
> https://org62.my.salesforce.com/sfc/p/000000000062/a/30000000EiOG/6OgBJ9s1Ru6ZJyZuN_4PoTMk.ce7a346abPNf3_iF18=
> 
> Thanks,
> Johannes

Hi Johannes

This problem has been fixed in SVN trunk. Please re-test your
application against the latest SVN snapshot.

Oleg


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


Mime
View raw message