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

Reply via email to