hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vjeran Marcinko" <vje...@tis.hr>
Subject Re: HTTP1.1 persistent connections
Date Tue, 16 Nov 2004 09:37:26 GMT
----- Original Message ----- 
From: "Oleg Kalnichevski" <olegk@apache.org>
To: <httpclient-user@jakarta.apache.org>
Sent: Tuesday, November 16, 2004 10:27 AM
Subject: Re: HTTP1.1 persistent connections


> On Tue, 2004-11-16 at 07:15 +0100, Vjeran Marcinko wrote:
> > And one more question, is there some way to force HttpClient to close
> > connection after each request, regardless of server's response
> > (meaning
> > Connection header) ? I'm asking this because there are some stupid
> > HTTP
> > servers out there that don't respond me with "Connection: close" that
> > would
> > close it, although my HttpClient sends this same header in request....
> > :-(
> >
> >
> The best way of ensuring connection closure is to implement a custom
> connection manager which would force-close upon release

Hi Oleg.

Thanx for suggestion. Anyway, I think that HttpClient functionality is a bit
insufficient about this. I was reading HTTP specs, and it seems that any
HTTP *client* should close connection in these 2 cases :
1. When HTTP server returns "Connection: close" header
2. or when HTTP request sent by client itself contained "Connection: close"
header notifying server that connection will be closed after the request. It
is not said anywhere that server should return this same header in response,
as like confirmation. They can, but they are not forced to, because they
expect connection will be closed by client anyway.

HttpClient is compliant about first one, but later is not implemented it
seems.

Regards,
Vjeran


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


Mime
View raw message