hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak Mishra <dkmishra...@gmail.com>
Subject Re: NTLM proxy authentication is failing with McAfee web gateway proxy server
Date Wed, 06 Feb 2013 02:59:39 GMT
Had attached the log files but not able to see them on mail thread, so
attaching the same again.
thank you,
deepak

---------- Forwarded message ----------
From: Deepak Mishra <dkmishra001@gmail.com>
Date: Wed, Feb 6, 2013 at 6:27 AM
Subject: NTLM proxy authentication is failing with McAfee web gateway proxy
server
To: HttpClient User Discussion <httpclient-users@hc.apache.org>


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

Mime
View raw message