hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Pasero <benjamin.pas...@web.de>
Subject Having problems with Proxy Connections
Date Tue, 12 Apr 2005 22:13:29 GMT
Hi,

I am wondering why some of my users fail to use a proxy server. I am
running my application with HttpClient 3.0 RC1.

In order to make the connection ready for proxy, I am:

1.) Calling HttpClient#getParams().setAuthenticationPreemptive(true);

2.) Calling HttpClient#getHostConfiguration().setProxy(proxyHost,
proxyPort);
    with the Proxy Host and Proxy Port entered by the user.

3.) Then in case a username and password is supplied (and ONLY then)
calling:

    AuthScope proxyAuthScope = new AuthScope(proxyHost, proxyPort);
    UsernamePasswordCredentials proxyUserPasswd = new
UsernamePasswordCredentials(proxyUsername, proxyPassword);
    HttpClient#getState().setProxyCredentials(proxyAuthScope,
proxyUserPasswd);

That is it, or am I missing something here? Should I maybe use
NTCredentials just in case
the Proxy uses NTLM Authentification. Any other Tips?

Regards,
Ben

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


Mime
View raw message