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.
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?
Thanks for your help.
Mark
-- To unsubscribe, see http://www.squid-cache.org/mailing-lists.htmlReceived on Thu Mar 01 2001 - 15:40:01 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:58:27 MST