On Wed, Sep 09, 2009 at 02:55:02AM -0700, Pankaj Arora wrote:
> Hi,
> I want to do preemptive authentication in Http ands as per as the auth
> guide
> http://hc.apache.org/httpclient-3.x/authentication.html#Preemptive_Authe
> ntication I have set the option
> client.getParams().setAuthenticationPreemptive(true);
> I observed that in case of the server the basic credentials were sent
> out even though server didn't send a 401 reply but in case of proxy the
> credentials were sent only when the client received 407 response.
> Is there some other option I have to set for doing preemptive
> authentication on the proxy too?
> Please note that in both cases basic auth is happening.
> 
> Also as I understand the preemptive authentication happens only in basic
> authentication as in digest/NTLM we need reply from the server to create
> the final response. Is my understanding correct?
> 
> Thanks,
> Pankaj Arora
> 
> 

Pankaj

HttpClient 3.1 is nearing end of life. Consider upfrading to 4.0.

Http authentication with HttpClient 4.0 is described in details here:

http://hc.apache.org/httpcomponents-client/tutorial/html/authentication.html

Preemptive authentication is described here:

http://hc.apache.org/httpcomponents-client/tutorial/html/authentication.html#d4e942

Oleg


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to