]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Correct update of 304 headers
authorhno <>
Mon, 26 Nov 2007 19:31:37 +0000 (19:31 +0000)
committerhno <>
Mon, 26 Nov 2007 19:31:37 +0000 (19:31 +0000)
src/HttpHeader.cc

index 7069d187f1025cc1ad4473de019a29898cf2255d..ef93f7c61333027c8f20a424715a8c66d710fc79 100644 (file)
@@ -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());
     }