Re: [squid-users] Content Length Header problem

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Thu, 4 Jul 2002 10:15:44 +0200

On Thursday 04 July 2002 05.27, richard.fuser@ernstyoung.com.au wrote:

> I saw a posting from Henrick with the following comment in it
> regarding content length headers and squid handling them.
>
> Link > http://list.cineca.it/cgi-bin/wa?A2=ind0010&L=squid&P=R28799

This related to content-length headers in the requests only, not how
you server replies.

> a) If there is no Content-Length on requests which must have one
> (POST, PUT)
>
> Becasue the content is being generated dynamically in cannot tell
> the content length in advance, I am thinking it should be using
> chunked encoding until it knows the length???

It does not matter how your server generates the content, or how/if it
uses content-length in the reply. What matters here is how the
user-agent sends the request.

> When I sniff the connection to the proxy I see a POST method take
> place so I am thinking that I am experiencing the exact problem
> mentioned in the post.

Probably not.

I see two possibilities here:

a) The useragent is using POST where it should have used GET (no
request-entity in the request).

b) The user-agent incorrectly sends a HTTP/1.1 POST request using
chunked encoding. Squid is a HTTP/1.0 proxy, and your user-agent MUST
NOT (according to the HTTP specification) send chunked encoding to
HTTP/1.0 proxies or servers.

> We are running Squid 2.4 STABLE 3 and are wondering if there is any
> solution to this problem, I belive the coding is dodgey but not
> sure how easy it is going to be to get them to change it.

Try upgrading to 2.4.STABLE7.. one of the fixes there might work
around case 'b' above, and you probably want all the other fixes
since STABLE3... (quite many, and quite important ones).

Regards
Henrik
Received on Thu Jul 04 2002 - 02:27:02 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:09:01 MST