From: wessels <> Date: Wed, 14 Dec 2005 00:32:34 +0000 (+0000) Subject: Support for Method header in ICAP OPTIONS respose. X-Git-Tag: SQUID_3_0_PRE4~456 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ffddf96c4b8b767e0e7c03dc918589a7d54d5785;p=thirdparty%2Fsquid.git Support for Method header in ICAP OPTIONS respose. Currently the 'icap_service' directive in squid.conf specifies both the URI and method. The ICAP server also returns the method in the OPTIONS response. This could create a conflict if the user specifies the wrong method for a service. For now we trust the squid.conf value and issue a warning if the OPTIONS response reports a different method. --- diff --git a/src/ICAP/ICAPServiceRep.cc b/src/ICAP/ICAPServiceRep.cc index 026e9a394e..dfda856ca0 100644 --- a/src/ICAP/ICAPServiceRep.cc +++ b/src/ICAP/ICAPServiceRep.cc @@ -278,6 +278,16 @@ void ICAPServiceRep::changeOptions(ICAPOptions *newOptions) newOptions); delete theOptions; theOptions = newOptions; + + /* + * Maybe it would be better if squid.conf just listed the URI and + * then discovered the method via OPTIONS + */ + + if (theOptions->method != method) + debugs(93,1, "WARNING: Squid is configured to use ICAP method " << ICAP::methodStr(method) << + "for service " << uri.buf() << + "but OPTIONS response declares the method is " << ICAP::methodStr(theOptions->method)); } static