Re: [SQU] Connections don't seem to Keep-Alive

From: Robert Collins <robert.collins@dont-contact.us>
Date: Fri, 2 Mar 2001 10:10:52 +1100

----- Original Message -----
From: "Mark Funk" <mrfunk@us.ibm.com>
To: <squid-users@ircache.net>
Cc: "Ross Johnson" <rossjo@us.ibm.com>
Sent: Friday, March 02, 2001 9:38 AM
Subject: [SQU] Connections don't seem to Keep-Alive

> Reference: Connections don't seem to Keep-Alive
> From: Chris (rodent@mindspring.com)
> Date: Thu Apr 27 2000 - 15:47:14 MDT
>
> We too are seeing connections being closed after sending HTTP requests
> marked as Proxy-Connection: Keep-Alive. The initial symptoms that we
were
> experiencing are almost identical to those outlined in the referenced
> issue. But we were able to track the problem down a bit further and
we'd
> appreciate advice.
>
> In our environment, the Squid proxy and the associated HTTP server
reside
> on the same system; we want Squid to cache some short lived dynamic
HTML
> frames. The Squid proxy is listening on its default port and the HTTP
> server is listening on an arbitrary port (say 7782). We have both an
> emulated browser - which is in full control of the HTTP GET request
content
> - and commercial browsers capable of requesting these dynamic frames.
Both
> types are experiencing this problem. The commercial browser is, of
course,
> making the request via the HTTP proxy server settings. The emulated
> browser is making the request via a sockets connection to port 3128.
>
> The HTTP request from the commercial browser looks like:
>
> GET http://[SystemName]:7782/W.PGM?7 HTTP/1.0
> ACCEPT IMAGE/GIF, ..... , */*
> ACCEPT-LANGUAGE: EN-US
> ACCEPT-ENCODING: GZIP, DEFLATE
> USER-AGENT: MOZILLA/4.0 ....
> HOST: [SystemName]:7782
> PROXY-CONNECTION: KEEP-ALIVE
>
> The HTTP request from the emulated browser looks like:
>
> GET http://SystemName:7782/W.PGM?7 HTTP/1.1 <-- Notice the HTTP
version
> HOST: [SystemName]:7782
> PROXY-CONNECTION: KEEP-ALIVE
> ACCEPT: */*
>
> When seen by the HTTP server, both of these requests are seen as
specifying
> HTTP/1.0. More specifically, the request from the commercial browser
looks
> like:
>
> GET /w.pgm?7 HTTP/1.0
> Accept: *.*
> Accept-Language: en-us
> Accept-Encoding: gzip, deflate
> User-Agent: Mozilla/4.0 ....
> Pragma: no-cache
> Via: 1.0 SystemName:3128 (Squid/2.3.STABLE4)
> X-Forwarded-For: [IP address of system with browser]
> Host: [SystemName]:7782
> Cache-Control: max-age=259200
> Connection: keep-alive <- Notice change from PROXY-CONNECTION:
> KEEP-ALIVE
>
> The HTTP response output by the HTTP server is as follows:
>
> HTTP/1.1 200 OK
> Date: Thu, 01 Mar 2001 15:08:18 GMT
> Server: Apache
> Cache-Control: max-age=30
> Connection: close
> Content-Type: text/html
>
> The emulated browser sees essentially this same header but it finds
that
> Squid had added the following line:
>
> X-Cache: MISS from [SystemName]
>
> Of some additional interest, you will also note that this header
contains
> neither a Content-Length or a Chunking identifier. I understand that
this
> is allowed for those cases where the HTTP response indicates
> Connection:close.

You may have the wrong end of the stick. The lack of a Content-Length
header or a Transfer-Encoding means that the connection MUST be marked
close.

> We've modified what appears to be the pertinent time-based controls
> relating to connection lifetime in the Squid config file. Are there
some
> others that we ought to also be modifying? Is there something about
Squid
> that is forcing the HTTP version to 1.0 resulting is the Apache server
> closing the Keep-Alive connection? If so, is there something in the
config
> file enabling us to force Squid to use HTTP 1.1?

No. The standard squid distribution does not have support for chunked
transfer encoding, which is one of the key components for HTTP/1.1
compliance. There is a development branch "te" which does have support
for transfer-encoding, but IT IS NOT production ready yet.

Unless you can alter your server to send a content length header, you
will not have persistent connections.

Rob

>
> Thanks for your help.
>
> Mark
>
>
> --
> To unsubscribe, see http://www.squid-cache.org/mailing-lists.html
>
>

--
To unsubscribe, see http://www.squid-cache.org/mailing-lists.html
Received on Thu Mar 01 2001 - 16:10:55 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:58:28 MST