Re: [squid-users] found two conflicting content-length headers

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Thu, 26 May 2005 18:54:32 +0200 (CEST)

On Thu, 26 May 2005, kodel wrote:

> Hi all
> Im sorry before because i know that this problem
> already posted in this mailing list, but still I don't
> quite understand about the header problem and found no
> solutions of it.

Hard to find good solutions when the problem is not in your equipment but
a broken web server which violates the HTTP standards.

> Below is the error that I got from my cache.log
> Previous thread about this problem says that this trouble
> come from the IIS, but the problem is I don't have the authorization
> of this webserver..

It's not only IIS. Have also seen this problem with Apache servers running
an old and broken mod_banner plugin, and a number of other sites.

In all cases is it a programming error in the web server or web
application running on the server. You SHOULD talk to the webmaster of the
site(s) in question to have them fix their server.

> 2005/05/26 13:24:17| ctx: enter level 0:
> 'http://ls.asklearning.com/peopledimension/sa/pdfviewer.asp'
> 2005/05/26 13:24:17| WARNING: found two conflicting content-length
> headers in {Server: Microsoft-IIS/5.0
> Date: Thu, 26 May 2005 06:41:24 GMT
> X-Powered-By: ASP.NET
> Connection: keep-alive
> Content-Disposition: inline;filename=27147_2400.pdf
> Content-Length: 308612
> Connection: Keep-Alive
> Content-Length: 308630
> Content-Type: application/pdf
> Cache-control: private

The problem in the above is that there is two Content-Length headers.
Content-Length is a very important header in HTTP as this indicates the
size of the response and where the next response from the server begins.
As the headers above is unclear on the size of this response (is it 308612
bytes or is it 308630 bytes?) Squid isn't sure what to do.

This said I published a patch today to work around this quite common cases
in an reasonable manner, hopefully without opening up for cache pollution
attacks on the proxy.

Regards
Henrik
Received on Thu May 26 2005 - 10:54:37 MDT

This archive was generated by hypermail pre-2.1.9 : Wed Jun 01 2005 - 12:00:03 MDT