Search squid archive

Antwort: Re: [squid-users] Antwort: [squid-users] Squid 3.0.STABLE17 is available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you Amos,

your patch did the trick, it now works smoothly.
I didn't have time to test yesterday, therefore sorry for my late 
response.

Martin




Amos Jeffries <squid3@xxxxxxxxxxxxx> 
27.07.2009 17:00

An
Martin.Pichlmaier@xxxxxxxxxxxxxxxxxxxxxxxxxxx
Kopie
Squid <squid-users@xxxxxxxxxxxxxxx>
Thema
Re:  Antwort: [squid-users] Squid 3.0.STABLE17 is available






Amos Jeffries wrote:
> Martin.Pichlmaier@xxxxxxxxxxxxxxxxxxxxxxxxxxx wrote:
>> Hello all,
>>
>> I just compiled squid-3.0.STABLE17 and it compiled fine.
>> Unfortunately I now get many warning messages in cache.log (still 
>> testing, not yet in productive environment):
>> 2009/07/27 15:11:26| HttpMsg.cc(157) first line of HTTP message is 
>> invalid
>> 2009/07/27 15:11:28| HttpMsg.cc(157) first line of HTTP message is 
>> invalid
>> 2009/07/27 15:11:37| HttpMsg.cc(157) first line of HTTP message is 
>> invalid
>> 2009/07/27 15:11:40| HttpMsg.cc(157) first line of HTTP message is 
>> invalid
>> 2009/07/27 15:11:41| HttpMsg.cc(157) first line of HTTP message is 
>> invalid
>>
>> It seems that nearly every URL I try to access gives that warning 
>> message,
>> for example www.arin.net, www.ripe.net, www.hp.com,
>> www.arin.net, even www.squid-cache.org and so on.
>> Are nearly all pages in the internet invalid or is the if-query or 
>> rather the function incorrect?
>> The lines that produce the above warning are new in STABLE17...
>>
>> HttpMsg.cc -- lines 156 to 160:
>>     if (!sanityCheckStartLine(buf, hdr_len, error)) {
>>         debugs(58,1, HERE << "first line of HTTP message is invalid");
>>         // NP: sanityCheck sets *error
>>         return false;
>>     }
>>
> 
> Oh dear. I missed a bit in the upgrade. Thanks.
> This attached patch should quieten it down to only the real errors.
> 
> Amos
> 

Oh foey. forget that patch. It pasted badly.

Here is the real one.

Amos
-- 
Please be using
   Current Stable Squid 2.7.STABLE6 or 3.0.STABLE17
   Current Beta Squid 3.1.0.12
=== modified file 'src/HttpMsg.cc'
--- src/HttpMsg.cc               2009-07-26 11:33:16 +0000
+++ src/HttpMsg.cc               2009-07-27 13:55:53 +0000
@@ -154,8 +154,7 @@
 
     // sanity check the start line to see if this is in fact an HTTP 
message
     if (!sanityCheckStartLine(buf, hdr_len, error)) {
-        debugs(58,1, HERE << "first line of HTTP message is invalid");
-        // NP: sanityCheck sets *error
+        // NP: sanityCheck sets *error and sends debug warnings.
         return false;
     }
 

=== modified file 'src/HttpReply.cc'
--- src/HttpReply.cc             2009-07-26 12:04:45 +0000
+++ src/HttpReply.cc             2009-07-27 14:59:48 +0000
@@ -446,8 +446,10 @@
     // content is long enough to possibly hold a reply
     // 4 being magic size of a 3-digit number plus space delimiter
     if ( buf->contentSize() < (protoPrefix.size() + 4) ) {
-        if (hdr_len > 0)
+        if (hdr_len > 0) {
+            debugs(58, 3, "HttpReply::sanityCheckStartLine: Too small 
reply header (" << hdr_len << " bytes)");
             *error = HTTP_INVALID_HEADER;
+        }
         return false;
     }
 

=== modified file 'src/HttpRequest.cc'
--- src/HttpRequest.cc           2009-07-26 11:33:16 +0000
+++ src/HttpRequest.cc           2009-07-27 14:59:29 +0000
@@ -156,6 +156,7 @@
     if ( buf->contentSize() < 2 ) {
         // this is ony a real error if the headers apparently complete.
         if (hdr_len > 0) {
+            debugs(58, 3, "HttpRequest::sanityCheckStartLine: Too small 
request header (" << hdr_len << " bytes)");
             *error = HTTP_INVALID_HEADER;
         }
         return false;

=== modified file 'src/pconn.cc'
--- src/pconn.cc                 2009-02-19 02:17:28 +0000
+++ src/pconn.cc                 2009-07-27 08:04:11 +0000
@@ -188,7 +188,7 @@
     else
         snprintf(buf, SQUIDHOSTNAMELEN * 3 + 10, "%s:%d", host, (int) 
port);
 
-    debugs(48,6,"PconnPool::key(" << host << "," << port << "," << domain 
<< "," << inet_ntoa(*client_address) << "is {" << buf << "}" );
+    debugs(48,6,"PconnPool::key(" << (host?host:"") << "," << port << "," 
<< (domain?domain:"") << "," << 
(client_address?inet_ntoa(*client_address):"") << "is {" << buf << "}" );
     return buf;
 }
 




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux