From eafe3f728282df62bd33b036a5093cdc630f9434 Mon Sep 17 00:00:00 2001 From: rousskov <> Date: Thu, 31 May 2007 02:22:30 +0000 Subject: [PATCH] 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. --- src/ICAP/ICAPServiceRep.cc | 6 ++++++ 1 file changed, 6 insertions(+) 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. -- 2.47.2