]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #1420: 302 responses with an Expires header is always cached
authorhno <>
Fri, 9 Feb 2007 20:29:05 +0000 (20:29 +0000)
committerhno <>
Fri, 9 Feb 2007 20:29:05 +0000 (20:29 +0000)
tighten the expiry requirements of 302 responses to only cache fresh
302 responses.

src/http.cc

index 591ebf38993d532e19bdfd33ae70e96c94e74059..14d9459b53f25283a31eca21db0c8eadda6df9d1 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: http.cc,v 1.509 2006/10/31 23:30:57 wessels Exp $
+ * $Id: http.cc,v 1.510 2007/02/09 13:29:05 hno Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -493,7 +493,7 @@ HttpStateData::cacheableReply()
         /* Responses that only are cacheable if the server says so */
 
     case HTTP_MOVED_TEMPORARILY:
-        if (rep->expires > -1)
+        if (rep->expires > rep->date && rep->date > 0)
             return 1;
         else
             return 0;