Return-Path: X-Original-To: apmail-hc-httpclient-users-archive@www.apache.org Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5FC9210483 for ; Fri, 18 Oct 2013 09:34:01 +0000 (UTC) Received: (qmail 29726 invoked by uid 500); 18 Oct 2013 09:33:59 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 29622 invoked by uid 500); 18 Oct 2013 09:33:51 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 29593 invoked by uid 99); 18 Oct 2013 09:33:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Oct 2013 09:33:46 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [217.150.250.48] (HELO kalnich.nine.ch) (217.150.250.48) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Oct 2013 09:33:39 +0000 Received: from [192.168.1.121] (77-57-198-202.dclient.hispeed.ch [77.57.198.202]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by kalnich.nine.ch (Postfix) with ESMTPSA id E4081B8006D for ; Fri, 18 Oct 2013 11:33:17 +0200 (CEST) Message-ID: <1382088797.18812.21.camel@ubuntu> Subject: Re: Problems with HttpAsyncClient 4.0-beta4 with SSL and Proxy From: Oleg Kalnichevski To: HttpClient User Discussion Date: Fri, 18 Oct 2013 11:33:17 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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 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