Dear list,
When you use GET, you receive following headers before html file:
HTTP/1.1 200 OK
Date: Mon, 23 May 2005 22:38:34 GMT
Server: Apache/1.3.3.7 (Unix) (Red-Hat/Linux)
Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT
Etag: "3f80f-1b6-3e1cb03b"
Accept-Ranges: bytes
Content-Length: 438
Connection: close
Content-Type: text/html; charset=UTF-8
---------
Now, if you focus in above lines you don't see hostname and domain or
url....It' my problem.I send above lines along with html file to
squid:3128 but squid doesn't find out hostname or domain or url....
Do you have solution?
--mohsen
On Sat, 2011-07-02 at 15:07 +0430, Mohsen Pahlevanzadeh wrote:
> I fill response.txt file with the following text:
> HTTP/1.1 200 OK
> Date: Mon, 23 May 2005 22:38:34 GMT
> Server: Apache/1.3.3.7 (Unix) (Red-Hat/Linux)
> Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT
> Etag: "3f80f-1b6-3e1cb03b"
> Accept-Ranges: bytes
> Content-Length: 438
> Connection: close
> Content-Type: text/html; charset=UTF-8
>
>
> And append a html file which has 438 bytes which Content-Length says.
> After it, i ran the following command:
>
>
> cat response.txt |telnet squid_server 3128
> the i got the following error:
>
>
>
> HTTP/1.0 400 Bad Request
> Server: squid/2.7.STABLE9
> Date: Sat, 02 Jul 2011 10:22:56 GMT
> Content-Type: text/html
> Content-Length: 2957
> X-Squid-Error: ERR_INVALID_REQ 0
> X-Cache: MISS from debian
> Via: 1.0 debian:3128 (squid/2.7.STABLE9)
> 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>
> HTTP/1.1 200 OK
> Date: Mon, 23 May 2005 22:38:34 GMT
> Server: Apache/1.3.3.7 (Unix) (Red-Hat/Linux)
> Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT
> Etag: "3f80f-1b6-3e1cb03b"
> Accept-Ranges: bytes
> Content-Length: 19499
> Connection: close
> Content-Type: text/html; charset=UTF-8
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
> Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <!-- saved from url=(0027)http://wiki.qemu.org/Manual -->
> <html xmlns="http://www.w3.org/1999/xhtml"
> xml:lang="en" lang="en"
> dir="ltr"><head><meta
> http-equiv="Content-Type" content="text/html;
> charset=UTF-8">
>
> <meta http-equiv="Content-Style-Type"
> content="text/css">
> <meta name="generator" content="MediaWiki
> 1.15.1">
> <meta name="keywords"
> content="Manual,Documentation/9psetup,Documentation/CreateSnapshot,Documentation/Debugging,Documentation/GettingStartedDevelopers,Documentation/HardwareManuals,Documentation/ISAManuals,Documentation/Networking,Documentation/Platforms/PC,KQEMU,KQemu/Doc">
> <link rel="shortcut icon"
> href="http://wiki.qemu.org/favicon.ico">
> <link rel="search"
> type="application/opensearchdescription+xml"
> href="http://wiki.qemu.org/opensearch_desc.php"
> title="QEMU (en)">
> <link title="Creative Commons" type="application/rdf
> +xml"
> href="http://wiki.qemu.org/index.php?title=Manual&action=creativecommons" rel="meta">
> <link rel="copyright"
> href="http://www.gnu.org/licenses/old-licenses/fdl-1.2.txt">
> </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 Sat, 02 Jul 2011 10:22:56 GMT by debian (squid/2.7.STABLE9)
> </ADDRESS>
> </BODY></HTML>
>
>
> Do you have an idea what i add to http headers?
>
> Yours,
> Mohsen
>
> zadeh wrote:
> > Dear all,
> >
> > i have a squid server and separate server which has a million page from
> > million URL,you know that i can insert page into cache via "squidclient
> > MYURL",but it uses GET http command and download page,now i have this
> > page and just wanna insert into cache(already downloaded), do you have
> > solution?
> >
> > Yours,
> > Mohsen
> >
> >
>
This archive was generated by hypermail 2.2.0 : Sun Jul 03 2011 - 12:00:01 MDT