[squid-users] Re: Content-Length 0 in requests causing problems for FrontPage users

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Fri, 13 Apr 2001 09:29:41 +0200

Older Squid versions gets upset when seeing Content-Length headers in a
GET query (not disallowed by the specifications, but result of having a
request entity on a GET/HEAD request is somewhat undefined).

Current Squid versions (2.3.STABLE4 or later) accepts "Content-Length:
0" in GET/HEAD queries, assuming that a 0 bytes large request entity
will not change the way in which the request is processed by HTTP
servers..

Patching older versions is a matter of changing clientCheckContentLength
in client_side.c to accepth Content-Length 0 for GET/HEAD requests.

--
Henrik Nordstrom
Squid Hacker
Anthony Sticha wrote:
> HTTP/1.0 411 Length Required Server: Squid/2.3.STABLE3 Mime-Version: 1.0
> Date: Wed, 11 Apr 2001 21:50:38 GMT Content-Type: text/html
> Content-Length: 1103 Expires: Wed, 11 Apr 2001 21:50:38 GMT
> X-Squid-Error: ERR_INVALID_REQ 0
> X-Cache: MISS from XXXXXXXXXXX Connection: close
> ERROR
> The requested URL could not be retrieved
> 
> While trying to process the request:
> GET /images/duomap5.gif HTTP/1.1
> Date: Wed, 11 Apr 2001 21:23:40 GMT
> Mime-Version: 1.0
> Accept: */*
> User-Agent: Mozilla/2.0 (compatible; MS FrontPage 4.0)
> Host: YYYYYYYYYYYYYYYYYY
> Accept: auth/sicily
> Content-Length: 0
> Connection: Keep-Alive
> 
> The following error was encountered:
> Invalid Request
> Some aspect of the HTTP Request is invalid. Possible problems:
> Missing or unknown request method
> Missing URL
> Missing HTTP Identifier (HTTP/1.0)
> Request is too large
> Content-Length missing for POST or PUT requests
> Illegal character in hostname; underscores are not allowed
> Your cache administrator is ka@apcs.com.au <mailto:ka@apcs.com.au>.
> 
> Generated Wed, 11 Apr 2001 21:50:38 GMT by XXXXXXXXXXXXXXXXX
> (Squid/2.3.STABLE3)
Received on Fri Apr 13 2001 - 01:42:12 MDT

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