From: rousskov <> Date: Thu, 31 May 2007 02:22:30 +0000 (+0000) Subject: Bug #1976 fix: Do not check OPTIONS response specifics if the response X-Git-Tag: SQUID_3_0_PRE7~232 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eafe3f728282df62bd33b036a5093cdc630f9434;p=thirdparty%2Fsquid.git Bug #1976 fix: Do not check OPTIONS response specifics if the response 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. --- diff --git a/src/ICAP/ICAPServiceRep.cc b/src/ICAP/ICAPServiceRep.cc index d4fd563a4c..2f8b0414bd 100644 --- a/src/ICAP/ICAPServiceRep.cc +++ b/src/ICAP/ICAPServiceRep.cc @@ -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.