On Mon, 2014-03-10 at 19:04 +0200, d_k wrote:
> I'm using HttpClient 4.1.1 and i'm performing multiple requests to several
> web servers (using nutch 2.x) that requires authentication.
> 
> I've read that I can save the authentication state between calls by passing
> the same HttpContext but that I shouldn't reuse the same HttpContext between
> different threads. So in effect i'll have to authenticate from every thread.
> 

That is correct.

> i can use the SyncBasicHttpContext but without knowing exactly how nutch is
> using it I won't be able to know if its indeed safe to use it or not.
> Is there a chance that the HttpClient itself is using the
> SyncBasicHttpContext in an unsafe manner?
> 

It is not sufficient for the HttpContext implementation to be
thread-safe. Regardless of HttpContext thread-safety attributes stored
in it can still be mutable and thread-unsafe.

Oleg



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

Reply via email to