Hi,
We are using HttpClient 4.2.3 to communicate to an internet URL through a
proxy server. Proxy server has NTLM authentication integrated with an
Active Directory.
We are able to do NTLM authentication with Ubuntu 12.04 Squid proxy server
but not able to do NTLM authentication with McAfee webgateway proxy server.

I am attaching HttpClient debug log for both the cases.
Can some one please take a look at the logs and tell me why NTLM
authentication is failing with McAfee webgateway proxy server.

I am using same code to communicate with both of them. Following is the
code.

DefaultHttpClient    client = new DefaultHttpClient();
HttpHost host = new HttpHost(proxyServer, port);
client.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, host);
NTCredentials creds = new NTCredentials(userName,
        password,
        InetAddress.getLocalHost().getHostName(),
        domain);
client.getCredentialsProvider().setCredentials(new AuthScope(host,
        AuthScope.ANY_REALM, AuthPolicy.NTLM), creds);
HttpGet httpMethod = new HttpGet(url);
HttpResponse response = client.execute(httpMethod);
BasicResponseHandler responseHandler = new BasicResponseHandler();
return responseHandler.handleResponse(response);

thank you for help,
deepak
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to