It is not accepted by Squid as it puts the result of the action into the
"undefined" domain.
The function you need to change is clientCheckContentLength.
From one of my earlier message on this subject:
--- start included message fragment ---
Change client_side.c:clientCheckContentLength()
From
case METHOD_GET:
case METHOD_HEAD:
/* We do not want to see a request entity on GET/HEAD requests
*/
return !has_cont_len;
To
case METHOD_GET:
case METHOD_HEAD:
/* We do not want to see a request entity with data on GET/HEAD
requests */
return r->content_length <= 0;
---- end message fragment --
Full copy of my original message is available in the Squid-users
archives from January 27, under the subject "Re: Intuit claims bugs in
Squid 2.2!"
Notes from discussions which was held privately on the subject and thus
not available in the archives:
a) Squid is a HTTP/1.0 (RFC1945) proxy. As such it may not accept
request-entities(signalled by a content-length header in the request) to
the GET method, as this is not defined in the HTTP/1.0 message formats.
b) If Squid is ever going to be a HTTP/1.1 (RFC2616) proxy then it
should accept and forward such request-entities, even if larger than 0
bytes.
-- Henrik Nordstrom Squid hacker Anh-Tuan Doan wrote: > > Hi, > > I have the FP request header now. It looks like the zero content length is not > accepted > by squid. I did the same thing with Netscape Proxy and it is o.k with the 0 > length. > My possible questions: > - is it good to hack the squid to accept zero content length? > - if yes, where (which .c file) to hack? > - any other advice/suggestions? > > Many thanks. > Tuan > > 1. The request from client: > GET http://www.dev.unsystem.org/images/case_3_e.gif HTTP/1.0 > Date: Tue, 06 June 2000 13:45:10 GMT > MIME-Version: 1.0 > Accept: */* > User-Agent: Mozilla/2.0 (compatible; MS FrontPage 4.0) > Host: www.dev.unsystem.org > Authorization: Basic cG9..........211 > Content-Length: 0 > > 2. The answer from squid: > HTTP/1.0 411 Length Required > Server: Squid/2.3STABLE1 > Mine-Version: 1.0 > Date: Tue, 06 June 2000 13:45:10 GMT > X-Squid-Error: ERR_INVALID_REQ 0 > X-Cache: MISS from leo > Proxy-Connection: close > <HTML><HEAD> > <TITLE>ERROR: The requested URL could not be retrieved</TITLE> > <HR> > <P> > While trying to process the request > <PRE> > GET http://www.dev.unsystem.org/images/case_3_e.gif HTTP/1.0 > Date: Tue, 06 June 2000 13:45:10 GMT > MIME-Version: 1.0 > Accept: */* > User-Agent: Mozilla/2.0 (compatible; MS FrontPage 4.0) > Host: www.dev.unsystem.org > Authorization: Basic cG9..........211 > Content-Length: 0 > </PRE> > <P> > The following error was encountered: > .... > Some aspect of the HTTP Request is invalid. Possible problems: > <UL> > <LI> Missing or unknown request method > <LI> Missing URL > <LI> Missing HTTP identifier (HTTP/1.0) > <LI> Request is too large > <LI>Content-Length missing for POST or PUT requests > <LI> Illegal character in hostname; underscores are not allowed > </UL> > > ___________________________________ > > Anh-Tuan Doan > Distributed Systems Group > International Computing Centre (ICC) > e-mail: doan@unicc.org > > Henrik Nordstrom <hno@hem.passagen.se> on 2000-05-30 16:15:32 > > > > > > > > To: Anh-Tuan Doan/ICC > > cc: Squid Users <squid-users@ircache.net> > > > > Subject: Re: FrontPage 2000 loading problem > > > The output shown from your analyzer is only a summary of the connection, > not the actual TCP contents. Or maybe it is only the first line of the > contents. > > Request from Netscape and FP look very different in the request headers > folloing the initial request line. > > -- > Henrik Nordstrom > Squid hacker > > Anh-Tuan Doan wrote: > > > I used a network analyser to capture TCP packets to Squid from FP and > > a Netscape browser and both have the same request: > > > > HTTP method GET Text=GET http://www.dev.unsystem.org/images/un_locator.gif > HTTP/1.0Received on Tue Jun 06 2000 - 13:06:16 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:53:56 MST