]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Verify the URL on memory cache hits
authorhno <>
Tue, 28 Aug 2007 03:56:58 +0000 (03:56 +0000)
committerhno <>
Tue, 28 Aug 2007 03:56:58 +0000 (03:56 +0000)
src/client_side_reply.cc

index c1b6e918df8f08e362220aa6cd76567b4d87eaa1..162c82b686dbd478b53ef421d4320ec65479897f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side_reply.cc,v 1.135 2007/08/27 12:50:43 hno Exp $
+ * $Id: client_side_reply.cc,v 1.136 2007/08/27 21:56:58 hno Exp $
  *
  * DEBUG: section 88    Client-side Reply Routines
  * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c)
@@ -504,6 +504,12 @@ clientReplyContext::cacheHit(StoreIOBuffer result)
      */
     assert(http->logType == LOG_TCP_HIT);
 
+    if (strcmp(e->mem_obj->url, urlCanonical(r)) != 0) {
+       debugs(33, 1, "clientProcessHit: URL mismatch, '" << e->mem_obj->url << "' != '" << urlCanonical(r) << "'");
+        processMiss();
+        return;
+    }
+
     switch (varyEvaluateMatch(e, r)) {
 
     case VARY_NONE: