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 kl...@Materna.de on 2006/01/31 10:30:41 UTC

Connection keep-alive

Hi,

to keep a http connection open,

a) does the application have to set the request header Connection:
Keep-Alive ?
b) does httpClient set it by itself ?
c) is it not neccessary to set the header Connection: Keep-Alive ?

Does anybody know ?

Thanks

Klaus.

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


Re: Connection keep-alive

Posted by Roland Weber <ht...@dubioso.net>.
Hi Klaus,

> to keep a http connection open,
> 
> a) does the application have to set the request header Connection:
> Keep-Alive ?
> b) does httpClient set it by itself ?
> c) is it not neccessary to set the header Connection: Keep-Alive ?

I can't help thinking that these questions are all the same.

HttpClient will by default try to keep connections alive.
This includes sending a keep-alive header if the application does
not set one. This is also addressed in our optimization guide:
http://jakarta.apache.org/commons/httpclient/performance.html#Connection%20persistence

cheers,
  Roland

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