hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: NTLM Proxy Authentication ISA Server
Date Sat, 28 Mar 2009 12:01:21 GMT
On Thu, 2009-03-26 at 12:28 -0700, pkbharigopal wrote:
> I am facing a strange problem in using HttpClient with ISA proxy server that
> supports NTLM.
> The program I wrote successfully authenticate to proxy using NTLM and
> retrieve pages if I connect to any external website (ex: www.yahoo.com) both
> using Http and Https (SSL).
> 
> The same program through same proxy also works fine, if I connect to an
> internal host within our same corporate domain, if I use Http.  However, it
> gives 502.2 Bad Gateway error if I connect to the same host using Https
> (SSL).
> 

Are you using a custom SSL socket factory by any chance?

Post a complete wire log of the session

Oleg


> I am able to successfully connect to that internal host using normal browser
> (IE) using both Http and Https (using same proxy).
> 
> Any help on this is highly appreciated.
> 
> The code I used is as follows:
> 
> HttpClient client = new HttpClient();
> HostConfiguration config = client.getHostConfiguration();
> config.setProxy(proxyHost, proxyPort);
> 
> NTCredentials credentials = new NTCredentials(userName, password, host,
> domain);
> HttpState state = client.getState();
> state.setProxyCredentials(domain, proxyHost, credentials);
> GetMethod httpget = new GetMethod("https://hostname/");
> httpget.setDoAuthentication(true);
> int status = client.executeMethod(httpget);
> System.out.println(httpget.getStatusLine().toString());
> ....
> finally release connection..
> 
> Regards,
> hari
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message