From: hno <> Date: Mon, 26 Nov 2007 19:31:37 +0000 (+0000) Subject: Correct update of 304 headers X-Git-Tag: SQUID_3_0_STABLE1~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9917847f6d25ac8387e61797047ecaa35413ebc9;p=thirdparty%2Fsquid.git Correct update of 304 headers --- diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc index 7069d187f1..ef93f7c613 100644 --- a/src/HttpHeader.cc +++ b/src/HttpHeader.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpHeader.cc,v 1.136 2007/09/28 00:22:37 hno Exp $ + * $Id: HttpHeader.cc,v 1.137 2007/11/26 12:31:37 hno Exp $ * * DEBUG: section 55 HTTP Header * AUTHOR: Alex Rousskov @@ -453,12 +453,20 @@ HttpHeader::update (HttpHeader const *fresh, HttpHeaderMask const *denied_mask) if (denied_mask && CBIT_TEST(*denied_mask, e->id)) continue; - debugs(55, 7, "Updating header '" << HeadersAttrs[e->id].name << "' in cached entry"); - if (e->id != HDR_OTHER) delById(e->id); else delByName(e->name.buf()); + } + + pos = HttpHeaderInitPos; + while ((e = fresh->getEntry(&pos))) { + /* deny bad guys (ok to check for HDR_OTHER) here */ + + if (denied_mask && CBIT_TEST(*denied_mask, e->id)) + continue; + + debugs(55, 7, "Updating header '" << HeadersAttrs[e->id].name << "' in cached entry"); addEntry(e->clone()); }