You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Wojciech Klicki <wo...@gmail.com> on 2011/09/20 22:06:49 UTC
Handshakes
Hello,
I use HttpClient to do few get requests to server that require two-way
authentication. I see in HttpClient logs that each time a request is made a
handshake is done. And this sends a lot of data along (for example
certificates). Is there a possibility to reuse connection in a way that
would allow to send few following requests within one handshake ?
--Pozdrawiam,
Wojciech Klicki
Re: Handshakes
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, 2011-09-20 at 22:06 +0200, Wojciech Klicki wrote:
> Hello,
>
> I use HttpClient to do few get requests to server that require two-way
> authentication. I see in HttpClient logs that each time a request is made a
> handshake is done. And this sends a lot of data along (for example
> certificates). Is there a possibility to reuse connection in a way that
> would allow to send few following requests within one handshake ?
>
> --Pozdrawiam,
>
> Wojciech Klicki
Wojciech
You need to make sure that logically related requests share the same
execution context (HttpContext instance). The user identity (principal)
is added to the execution context, when available, and this enables
HttpClient to re-use persistent connections that have been open
specifically for that particular user (such as HTTPS connections with
client authentication or NTLM connections).
hope this helps
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org