From: Amos Jeffries Date: Fri, 18 Nov 2016 06:19:19 +0000 (+1300) Subject: Fix ICAP Allow header containing only trailers option X-Git-Tag: M-staged-PR71~367 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6fbd6ef2918f981395076caa1f95c6dbec68cd06;p=thirdparty%2Fsquid.git Fix ICAP Allow header containing only trailers option r14941 added 'tailers' option to te Allow header but did not send it when only that option was used, without the 204 or 206 features. Detected by Coverity Scan. Issue 1394381. --- diff --git a/src/adaptation/icap/ModXact.cc b/src/adaptation/icap/ModXact.cc index 549a78ec45..4efac62e98 100644 --- a/src/adaptation/icap/ModXact.cc +++ b/src/adaptation/icap/ModXact.cc @@ -1528,13 +1528,13 @@ void Adaptation::Icap::ModXact::makeAllowHeader(MemBuf &buf) const bool allow206out = state.allowedPostview206 = shouldAllow206out(); const bool allowTrailers = true; // TODO: make configurable - debugs(93,9, HERE << "Allows: " << allow204in << allow204out << + debugs(93, 9, "Allows: " << allow204in << allow204out << allow206in << allow206out << allowTrailers); const bool allow204 = allow204in || allow204out; const bool allow206 = allow206in || allow206out; - if (!allow204 && !allow206) + if (!allow204 && !allow206 && !allowTrailers) return; // nothing to do if (virginBody.expected()) // if there is a virgin body, plan to send it