Hello Michelle,

> 3. socks proxy
> nothing if according to what Roland mentioned below"SOCKS 
> connections are transparent
> to HttpClient", then how do you know it is using socks proxy or a 
> direct connect?

We don't. SOCKS is transparent to HTTP, so there is no reason
why HttpClient should know about it. Sockets are created using
the standard JDK functionality, and that's where it is decided
whether the connection is direct or through SOCKS. HttpClient
just uses the socket connection it gets from the JDK.

> The wield thing is if I do 
> client.getState().setProxyCredentials(new AuthScope(hostName,port), new
> UsernamePasswordCredentials(NTUser, NTpassword));
> or
> client.getState().setProxyCredentials(new AuthScope(hostName,port), new
> NTCredentials(user, password,hostName, domain));
> they both work fine. why?

If your proxy doesn't require NTLM authentication but supports
BASIC authentication, then BASIC authentication can be performed
with both kinds of credentials. Test against a proxy that requires
NTLM authentication and you should see the first version fail.

hope that helps,
  Roland

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to