[squid-users] Using the squidclient to put a file into squid cache

From: ying lcs <yinglcs@dont-contact.us>
Date: Mon, 9 Jul 2007 00:39:40 -0500

Hi,

I am trying to use the squidclient to put a file into squid cache.

Like this:
./squidclient -P test.html http://www.test.com

But I get this error:
HTTP/1.0 411 Length Required
Server: squid/2.6.STABLE13
Date: Mon, 09 Jul 2007 05:20:31 GMT
Content-Type: text/html
Content-Length: 1224
Expires: Mon, 09 Jul 2007 05:20:31 GMT
X-Squid-Error: ERR_INVALID_REQ 0
X-Cache: MISS from nobody@testsite.com
Via: 1.0 nobody@testsite.com:3128 (squid/2.6.STABLE13)
Proxy-Connection: close

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=iso-8859-1">
<TITLE>ERROR: The requested URL could not be retrieved</TITLE>
<STYLE type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE>
</HEAD><BODY>
<H1>ERROR</H1>
<H2>The requested URL could not be retrieved</H2>
<HR noshade size="1px">
<P>
While trying to process the request:
<PRE>
GET / HTTP/1.0
Content-Length: 51
Accept: */*

</PRE>
<P>
The following error was encountered:
<UL>
<LI>
<STRONG>
Invalid Request
</STRONG>
</UL>

<P>
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>
<P>Your cache administrator is <A HREF="mailto:webmaster">webmaster</A>.

<BR clear="all">
<HR noshade size="1px">
<ADDRESS>
Generated Mon, 09 Jul 2007 05:20:31 GMT by nobody@testsite.com
(squid/2.6.STABLE13)
</ADDRESS>
</BODY></HTML>
Received on Sun Jul 08 2007 - 23:54:43 MDT

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