Re: keepalive/redirect bug in Squid 2.0/PATCH2

From: Henrik Nordstrom <>
Date: Wed, 20 Jan 1999 09:50:57 +0100

Peter van Dijk wrote:

> it could be because actually does keepalive for
> redirects but not really for normal requests.

It is a problem with WN/2.0.5

Squid is a HTTP/1.0+ proxy with persistent connections. As such it uses
Connection: Keep-Alive to signal a persistent connection.

$ nc 80
GET /vreemdeberichten HTTP/1.0
Connection: Keep-Alive

HTTP/1.1 301 Moved Permanently
Server: WN/2.0.5
Date: Wed, 20 Jan 1999 08:33:33 GMT
Content-type: text/html
Connection: Keep-Alive

["long" delay]

The problem above is that the reply has no content-length, and as a 301
reply may have a message body Squid waits for the server to signal
end-of-message by closing the connection. The correct reply should
include a "Content-Length: 0" header. (RFC 2068, section 4.4 Message

Another related excerpt from RFC 2068:

10.3.2 301 Moved Permanently
   .... Unless the request method was HEAD, the entity
   of the response SHOULD contain a short hypertext note with a
   hyperlink to the new URI(s).

Henrik Nordstrom
Spare time Squid hacker
Received on Wed Jan 20 1999 - 01:50:15 MST

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