[ https://issues.apache.org/jira/browse/HTTPCLIENT-1598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14278554#comment-14278554 ]
Michael Osipov edited comment on HTTPCLIENT-1598 at 1/15/15 10:47 AM: ---------------------------------------------------------------------- Giacomo, the log output from {{curll}} isn't helpful: 1. Your version is stoneage, please download 7.40.0 and retry 2. The logout does not show any login attempt from the client Since {squid} wants NTLM and not SPNEGO, please do the following: {noformat} > curl --version > curl --verbose -U : --proxy-ntlm -x http://<proxy-host>:<port> <url> {noformat} was (Author: michael-o): Giacomo, the log output from {{curll}} isn't helpful: 1. You version is stoneage, please download 7.40.0 and retry 2. The logout does not show any login attempt from the client Since {squid} wants NTLM and not SPNEGO, please do the following: {noformat} > curl --version > curl --verbose -U : --proxy-ntlm -x http://<proxy-host>:<port> <url> {noformat} > 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: 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-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org