On Mon, 28 Feb 2005 16:01:20 +0100, Ronny T. Lampert <telecaadmin@xxxxxx> wrote: > sad fact is, that numerous (even bigger companies') webservers out there are > broken and DO send excess data that differs from the Content-Length: > specified in the header (mod_banner seems to be partially broken in this > regard, too). > > Squid does simply hard-cut the stream after the header-specified length, > which is all good and well, in theory. The "Excess data" message appears at two places in http.c >From a cursory reading of the source, it appears to me that if the server is not trying to do keep-alives, then the excess data is stored in the object, is not truncated. If the server is using keep-alives, but then goes on to violate it's own Content-length, Squid not only truncates the object, but terminates the TCP connection to the remote server. > How about adding a configurable window, in which excess data is tolerated, > but defaulting to 0 ? > It is mostly around a couple of bytes (up to ~100?) and the browsers handle > it, too. IMHO, Squid is doing exactly what it should. I might suggest that the debug message be updated to differentiate between the two cases? For a server to specify a "Connection: Keep-Alive" header (under HTTP/1.0) or to fail specify a "Connection: close" header (under HTTP/1.1), and then to go on and violate it's own "Content-length" by sending excess data, is truly broken, in all senses of the word. Kevin