Re: [squid-users] Whether squid supports keep-alive between it and real server?

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 09 Jan 2013 23:39:43 +1300

On 9/01/2013 9:19 p.m., Tian You wrote:
> Hi,
>
> I use version 3.1.20.
> According to the doc, between squid and real server, keep-alive is supported.
> But when I use wireshark to capture the package, it's found that the
> TCP connection is still closed for every HTTP message.
> I checked the HTTP header, it's version HTTP 1.1, and "Connection:
> keep-alive" is also included in message from both squid and real
> server.
>
> Is this correct behaviour?

Maybe yes, maybe no.

keep-alive depends on a lot of details other than the Connection header.
Such as whether the object Content-Length is specified or a
Transfer-Encoding is used to delimit the object size. Or random choice
from Squid or Server closing the connection before it can be re-used. In
HTTP/1.1 keep-alive is assumed by default and any one of those details
can turn it OFF. The behaviour you see means that one of the other
details is disabling it for those requests.
  The usual culprit is the remote end being HTTP/1.0 and not accepting
Transfer-Ecoding:chunked which Squid uses to send/receive objects
without a Content-Length on keep-alive connections.

Can you upgrade to the latest 3.1 release and see if it is still ocuring
there?

Amos
Received on Wed Jan 09 2013 - 10:39:52 MST

This archive was generated by hypermail 2.2.0 : Fri Jan 11 2013 - 12:00:04 MST