]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #1976 fix: Do not check OPTIONS response specifics if the response
authorrousskov <>
Thu, 31 May 2007 02:22:30 +0000 (02:22 +0000)
committerrousskov <>
Thu, 31 May 2007 02:22:30 +0000 (02:22 +0000)
is invalid in some way. Squid should now handle 404 Not Found and other
"invalid" ICAP OPTIONS responses by marking the ICAP service down.

OPTIONS error setting needs more work, but reporting the last error should
work for now.

Thanks to Christos Tsantilas for reporting and investigating this bug.

src/ICAP/ICAPServiceRep.cc

index d4fd563a4c7265342600325f65a27be8079fb2bb..2f8b0414bd9c75ff4013563ebb3ab18bf076d181 100644 (file)
@@ -354,6 +354,12 @@ void ICAPServiceRep::checkOptions()
     if (theOptions == NULL)
         return;
 
+    if (!theOptions->valid()) {
+        debugs(93,1, "WARNING: Squid got an invalid ICAP OPTIONS response " <<
+            "from service " << uri << "; error: " << theOptions->error);
+        return;
+    }
+
     /*
      * Issue a warning if the ICAP server returned methods in the
      * options response that don't match the method from squid.conf.