Re: HTTP/1.1 pconns to 1.0 servers

You wrote:

> 
> Jamie Lokier schrieb:
> > Stefan Eissing wrote:
> >>> However, the widely deployed Squid proxy cache 
> >>> <http://www.squid-cache.org/> does not behave in this manner; it 
> >>> requires a Connection: keep-alive header (or Proxy-Connection, but 
> >>> that's another discussion) in requests in order for them to persist.
> >>>
> >> I struggled with exactly the same issue when implementing a HTTP stack.

> >> Someone forced me with money to make it work with squid as it is widely

> >> deployed. Those were the days...
> > 
> > What is the difficulty with writing a client to work with Squid?
> > 
> > If you omit the "Connection: keep-alive", you'll just get a
> > non-keepalive connection, but it'll work fine.  Isn't that right?
> 
> With "make it work" I meant "working well". You are right that a correctly
> implemented client will just see the missing "keep-alive" and rightly
> assume that the connection will be closed. I was struggling with the
> "correctly implemented" and the "rightly assume" at that time and the
> variety of server behaviours did not exactly help.

My clients have always used a conservative approach to persistent
connections to work with origin servers and proxies, in an attempt to work
as well as possible.  If it's not talked to the proxy before (or recently
enough), it sends it an HTTP/1.0 request with a Connection:close header and
sees what happens; for non-proxies, it sends an HTTP/1.1 request with a
Connection:keep-alive header.  On the basis of that response, it will then
use HTTP/1.1 requests with or without connection headers, as appropriate (in
the case of the prehistoric NCSA 1.4.3 server, it reverts to HTTP/1.0
requests all the time, because that server sends faulty responses to
HTTP/1.1 requests)

It sounds like this would but it sounds like it'd be defeated by squid,
though?


-- 
Stewart Brodie
Software Engineer
ANT Software Limited

Received on Tuesday, 26 September 2006 10:32:36 UTC