W3C home > Mailing lists > Public > ietf-http-wg@w3.org > July to September 2006

Re: HTTP/1.1 pconns to 1.0 servers

From: Mark Nottingham <mnot@yahoo-inc.com>
Date: Tue, 26 Sep 2006 11:19:30 -0700
Message-Id: <7BAFDF8C-BB0B-464E-AAB5-AC6B47A35D59@yahoo-inc.com>
Cc: ietf-http-wg@w3.org
To: Stewart Brodie <stewart.brodie@antplc.com>

Well, it depends; Squid (and most other proxies, for that matter) can  
be configured to be a normal (client-specified) proxy, a  
"transparent" a.k.a. interception proxy, or as a "reverse" proxy,  
a.k.a. "surrogate" or gateway.

In the first case, the behaviour you describe will cause Squid to  
close the connection.

But, in the latter cases, Squid will see the Connection: keep-alive  
and try to keep up.

Cheers,


On 2006/09/26, at 3:32 AM, Stewart Brodie wrote:

>
> 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
>
>

--
Mark Nottingham
mnot@yahoo-inc.com
Received on Tuesday, 26 September 2006 18:21:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 06:49:46 GMT