Re: i15: How to tell if a client does not support persistent connections

Adrien de Croy <adrien@qbik.com> wrote:

> I would have thought the most common type of non-compliance would be a 
> client that doesn't support persistent connections, and also doesn't 
> send Connection: close
> 
> This will leave a server in a bad place if it assumes keep-alive.  I 
> haven't seen a client that supports keep-alive that doesn't actually 
> always send Connection: keep-alive - i.e explicitly advertise a 
> capability, rather than rely on a server to infer it.  I think this is 
> evidence of browser authors taking the safe option.

Until a client has talked to a server, it doesn't know what version of HTTP
it is going to be using.  So I always send the keep-alive connection token
on the first request to an origin server, but if the origin server tells me
it supports HTTP/1.1, I won't bother sending it in subsequent requests.  On
reflection, perhaps I ought to just always send it anyway, for safety's
sake.

-- 
Stewart Brodie
Software Engineer
ANT Software Limited

Received on Thursday, 13 December 2007 10:14:43 UTC