Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
4.4 Beta1
-
None
-
Windows 8
Description
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.
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(); }
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?
Attachments
Attachments
Issue Links
- relates to
-
HTTPCLIENT-1561 InitializeSecurityContext in WinHttpClient ignores return codes
- Resolved