Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1A9FE10DD4 for ; Mon, 10 Mar 2014 10:04:51 +0000 (UTC) Received: (qmail 26218 invoked by uid 500); 10 Mar 2014 10:04:50 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 26011 invoked by uid 500); 10 Mar 2014 10:04:45 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 25930 invoked by uid 99); 10 Mar 2014 10:04:43 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Mar 2014 10:04:43 +0000 Date: Mon, 10 Mar 2014 10:04:43 +0000 (UTC) From: "Oleg Kalnichevski (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HTTPCLIENT-1479) NPE in DefaultHttpClient with Proxy and AuthCache MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCLIENT-1479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13925615#comment-13925615 ] Oleg Kalnichevski commented on HTTPCLIENT-1479: ----------------------------------------------- Is there a chance you could submit a complete test case reproducing the NPE? Oleg > NPE in DefaultHttpClient with Proxy and AuthCache > ------------------------------------------------- > > Key: HTTPCLIENT-1479 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1479 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient > Affects Versions: 4.3.3 > Reporter: Markus Kull > > For various reasons we are still using the now deprecated DefaultHttpClient. After updating to 4.3 we encountered a NullPointerException in a seldom case involving proxies and AuthCache. > {noformat} > @Test > public void testDefaultHttpClientProxyAndAuthCache() throws Exception { > try (CloseableHttpClient client = new DefaultHttpClient()) { > ConnRouteParams.setDefaultProxy(client.getParams(), URIUtils.extractHost(URI.create("http://example.org"))); > HttpClientContext context = HttpClientContext.create(); > context.setAuthCache(new BasicAuthCache()); > // java.lang.NullPointerException (null route) > // at org.apache.http.client.protocol.RequestAuthCache.process(RequestAuthCache.java:88) > // at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:131) > HttpResponse resp = client.execute(new HttpGet("https://www.example.org"), context); > EntityUtils.consumeQuietly(resp.getEntity()); > } > } > {noformat} > Thanks in Advance. -- This message was sent by Atlassian JIRA (v6.2#6252) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org