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 7B2D810B1D for ; Thu, 15 Jan 2015 16:41:33 +0000 (UTC) Received: (qmail 98379 invoked by uid 500); 15 Jan 2015 16:41:35 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 98336 invoked by uid 500); 15 Jan 2015 16:41:35 -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 98324 invoked by uid 99); 15 Jan 2015 16:41:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jan 2015 16:41:35 +0000 Date: Thu, 15 Jan 2015 16:41:35 +0000 (UTC) From: "Oleg Kalnichevski (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (HTTPCLIENT-1598) Native Windows Negotiate/NTLM via JNA + 407 Proxy Authentication Required 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-1598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oleg Kalnichevski resolved HTTPCLIENT-1598. ------------------------------------------- Resolution: Duplicate > Native Windows Negotiate/NTLM via JNA + 407 Proxy Authentication Required > ------------------------------------------------------------------------- > > Key: HTTPCLIENT-1598 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1598 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpAuth > Affects Versions: 4.4 Beta1 > Environment: Windows 8 > Reporter: Giacomo Boccardo > Labels: 407, jna, native, ntlm > Attachments: curl7.40Output.txt, curlOutput.txt, log.txt, sample.java > > > I'm trying to use the native Windows NTLM negotiation as described at http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/httpclient-win/src/examples/org/apache/http/examples/client/win/ClientWinAuth.java > but I need to explicitly set a proxy. > {code:java} > if (!WinHttpClients.isWinAuthAvailable()) { > System.out.println("Integrated Win auth is not supported!!!"); > } > HttpClientBuilder httpClientBuilder = WinHttpClients.custom(); > HttpHost httpProxy = new HttpHost("proxyserver.example.com", 3128); > httpClientBuilder.setProxy(httpProxy); > CloseableHttpClient httpclient = httpClientBuilder.build(); > try { > HttpGet httpget = new HttpGet("http://www.google.it"); > System.out.println("Executing request " + httpget.getRequestLine()); > CloseableHttpResponse response = httpclient.execute(httpget); > try { > System.out.println("----------------------------------------"); > System.out.println(response.getStatusLine()); > EntityUtils.consume(response.getEntity()); > } finally { > response.close(); > } > } finally { > httpclient.close(); > } > {code} > The response contains the following line > {{HTTP/1.0 407 Proxy Authentication Required}} > In the attachments both the source code above and the complete log of the negotiation (I obviously changed the real proxy). > What's wrong? -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org