From aa62670a5f4cf03006a073fe82e179480d8a327d Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Fri, 30 Jul 2010 14:41:26 -0600 Subject: [PATCH] Compliance: Forward multiple unknown HTTP Cache-Control directives. httpHdrCcParseInit() ignored all unknown Cache-Control directives except for the first one because the (type != CC_OTHER) check applied to the debugging statement only. Co-Advisor test case: test_case/rfc2616/endHdr-fwd-set-Cache-Control-toSrv --- src/HttpHdrCc.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/HttpHdrCc.cc b/src/HttpHdrCc.cc index 6e91e83b7e..cc9356bad0 100644 --- a/src/HttpHdrCc.cc +++ b/src/HttpHdrCc.cc @@ -138,18 +138,17 @@ httpHdrCcParseInit(HttpHdrCc * cc, const String * str) type = CC_OTHER; } + // ignore known duplicate directives if (EBIT_TEST(cc->mask, type)) { - if (type != CC_OTHER) + if (type != CC_OTHER) { debugs(65, 2, "hdr cc: ignoring duplicate cache-directive: near '" << item << "' in '" << str << "'"); - - CcFieldsInfo[type].stat.repCount++; - - continue; + CcFieldsInfo[type].stat.repCount++; + continue; + } + } else { + EBIT_SET(cc->mask, type); } - /* update mask */ - EBIT_SET(cc->mask, type); - /* post-processing special cases */ switch (type) { -- 2.47.2