[squid-users] Duplicate Content-Length headers result in error 502 bad gateway

From: Goetz von Escher <goetz@dont-contact.us>
Date: Wed, 08 Dec 2004 18:01:16 +0100

Hi all

When you point your browser at the following URL you will be enjoying
two identical Content-Length headers:

http://cache.gettyimages.com/thumb/51837289.jpg?x=x&a=51837289&b=editorial_emea&t=1

With snapshot squid-2.5.STABLE7-20041202 some new code was added in function
httpHeaderParse() of file HttpHeader.c to enforce a single Content-Length
header:

 } else if (e->id == HDR_CONTENT_LENGTH && httpHeaderHas(hdr, HDR_CONTENT_LENGTH)) {
        debug(55, 1) ("WARNING: found double content-length header\n");
        httpHeaderEntryDestroy(e);
        return httpHeaderReset(hdr);

This restriction fires on the URL above, you get an error 502 'bad gateway'
and squid complains about an invalid request (when in fact it was an invalid
response - but that's another story).

I have two questions:

a) are others experiencing the same issue (is it maybe a common IIS problem)?
b) any chance to get rid of the above restrictive code in squid?

Regards
Goetz von Escher
Received on Wed Dec 08 2004 - 10:01:18 MST

This archive was generated by hypermail pre-2.1.9 : Sat Jan 01 2005 - 12:00:01 MST