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 DE9D29768 for ; Wed, 17 Dec 2014 10:47:31 +0000 (UTC) Received: (qmail 79931 invoked by uid 500); 17 Dec 2014 10:47:31 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 79884 invoked by uid 500); 17 Dec 2014 10:47:31 -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 79872 invoked by uid 99); 17 Dec 2014 10:47:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Dec 2014 10:47:30 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of namasrihari@gmail.com designates 209.85.220.52 as permitted sender) Received: from [209.85.220.52] (HELO mail-pa0-f52.google.com) (209.85.220.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Dec 2014 10:47:03 +0000 Received: by mail-pa0-f52.google.com with SMTP id eu11so16149111pac.11 for ; Wed, 17 Dec 2014 02:47:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=WFsdoZe+uR61ZFxsmSl0delL+5xtosvE+YmiMXMVd0o=; b=xkFePiXaY8246NDNzc1hWc7p/MfSyiDWApDFruCCh62scm/1+Phw3k9ks5GgVIuv5+ ettP87oHL7Q4v/GVGEslZSxP4ebXPqqLANeH7GDJFc73QBu5CPO4mqFAuv/axN1Cy7fE LR85n295hrpgp19BYqhTIIMC5xbn9snbdWOv0zCFjfMPU6QGhXTm1K4GTTUBBWh707NK CNeUMLspqQnA5ecxsJ4QFDvGjGNSMSvFYoqvXTSCaWNU/hE6E2rcNial+TfbKOaUBnjw mlz+yosez6LbOKOpagO6OtmEtDkZmaWhxbB9tcbHNT4766u7R9GijJLHj+D6vpDgrD4F LSLg== MIME-Version: 1.0 X-Received: by 10.70.15.68 with SMTP id v4mr67836167pdc.21.1418813221920; Wed, 17 Dec 2014 02:47:01 -0800 (PST) Received: by 10.70.72.97 with HTTP; Wed, 17 Dec 2014 02:47:01 -0800 (PST) In-Reply-To: <1418807384.18594.5.camel@apache.org> References: <1418653097.17201.1.camel@apache.org> <1418807384.18594.5.camel@apache.org> Date: Wed, 17 Dec 2014 16:17:01 +0530 Message-ID: Subject: Re: Custom SchemeRegistry via local context not working From: srihari na To: HttpClient User Discussion Content-Type: multipart/alternative; boundary=047d7bdc9fe61868e6050a673289 X-Virus-Checked: Checked by ClamAV on apache.org --047d7bdc9fe61868e6050a673289 Content-Type: text/plain; charset=UTF-8 Again thanks for the response however we are expecting answer for another question: Can we get a confirmation that this issue is resolved in later versions or a probable solution can be designed for the described scenario? Thank you On Wed, Dec 17, 2014 at 2:39 PM, Oleg Kalnichevski wrote: > > On Wed, 2014-12-17 at 11:55 +0530, srihari na wrote: > > Thank You for the quick response. Can we get a confirmation that this > issue > > is resolved in later versions or a probable solution can be designed for > > the described scenario? The reason we ask is our product bundled > > v4.2.5(upgraded from 3.1) of the library in April 2013 and moving to > > 4.3/4.4 would mean a lot of API/design changes that can significantly > > impact the product stability. It is therefore desirable for us to move > to a > > stable version which is covered under under Long Term Suppor (LTS). Is > > there a plan to support 4.3/4.4 for longer term or can you let us know > the > > current outlook for ending support for those streams? Also we will be > > interested to know if any support will be provided on 4.2 stream on > buying > > support for annual fee. > > > > Apache HC is a non-commercial project. We do not have LTS releases. We > are able to maintain two concurrent branches only only: dev (unstable) > and ga (stable). Current stable branch is 4.3. 4.4 GA can be expected in > Q1 2015. > > Oleg > > > Thank you hoping for a quick response. > > > > On Mon, Dec 15, 2014 at 7:48 PM, Oleg Kalnichevski > wrote: > > > > > > On Mon, 2014-12-15 at 17:46 +0530, srihari na wrote: > > > > Hello Folks, > > > > > > > > We are using HttpClient 4.2.5 and Our scenario is that there is only > 1 > > > > instance of HTTP client throughout the JVM and only one connection > pool > > > > linked to client. The same client using the single connection pool > > > > interacts with various http/https endpoints by creating a new method > > > > instance for every request. For https based connections we have our > own > > > > implementation for socket connection factory, when we try to > register a > > > new > > > > custom scheme using custom socket factory via local context, it is > not > > > > being picked by the client. It always tries to get the list of scheme > > > > registries from connection manager even though we try to override at > > > local > > > > context level. We use local context to pass authentication > information > > > > which works perfectly fine however schemeregistry is not picked up. > > > > > > > > AbstractHttpClient > > > > protected HttpRoutePlanner createHttpRoutePlanner() { > > > > return new DefaultHttpRoutePlanner(*getConnectionManager* > > > > *().getSchemeRegistry()*); > > > > } > > > > > > > > > > > > Now that local context scheme registry is not picked up we tried > > > > registering all the schemes at connection manager level with unique > > > scheme > > > > names and pass the respective scheme name in the HttpHost of the > execute > > > > method. > > > > In the first pass route planner has the proper scheme name we set in > the > > > > HttpHost so it pickedup the proper socket factory > > > > DefaultHttpRoutePlanner.determineRoute(HttpHost, HttpRequest, > > > HttpContext) > > > > line: 113 > > > > DefaultRequestDirector.determineRoute(HttpHost, HttpRequest, > HttpContext) > > > > line: 791 > > > > DefaultRequestDirector.execute(HttpHost, HttpRequest, HttpContext) > line: > > > 414 > > > > DefaultHttpClient(AbstractHttpClient).execute(HttpHost, HttpRequest, > > > > HttpContext) line: 906 > > > > > > > > In the second pass the target it reconstructed using the URI so the > > > custom > > > > scheme name is lost and our custom socket factory is not picked up > > > > DefaultRequestDirector.handleResponse(RoutedRequest, HttpResponse, > > > > HttpContext) line: 1110 > > > > *HttpHost newTarget = URIUtils.extractHost(uri);* > > > > > > > > DefaultHttpRoutePlanner.determineRoute(HttpHost, HttpRequest, > > > HttpContext) > > > > line: 113 > > > > DefaultRequestDirector.determineRoute(HttpHost, HttpRequest, > HttpContext) > > > > line: 791 > > > > DefaultRequestDirector.handleResponse(RoutedRequest, HttpResponse, > > > > HttpContext) line: 1129 > > > > DefaultRequestDirector.execute(HttpHost, HttpRequest, HttpContext) > line: > > > 548 > > > > > > > > Request the forum to help solve our scenario. You help is much > > > appreciated, > > > > awaiting a quick response. > > > > > > > > Thank you > > > > > > > > > > Please consider upgrading to 4.3.x. Even if it is a bug in HttpClient > > > there will be no more releases from the 4.2.x branch. > > > > > > Oleg > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org > > > For additional commands, e-mail: httpclient-users-help@hc.apache.org > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org > For additional commands, e-mail: httpclient-users-help@hc.apache.org > > -- Regards, Srihari NA --047d7bdc9fe61868e6050a673289--