]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 2950: HTTP responses with no Date, Last-modified or expired can
authorRobert Collins <robertc@robertcollins.net>
Tue, 15 Jun 2010 08:26:43 +0000 (20:26 +1200)
committerRobert Collins <robertc@robertcollins.net>
Tue, 15 Jun 2010 08:26:43 +0000 (20:26 +1200)
now be cached (given an appropriate refresh_pattern). Previously we
were not caching them in case of an infinite loop in cache farms:
however Squid adds Date: headers now which remove that concern.

ChangeLog
src/http.cc

index 4bb4ae5d3b532ad6f697c1c710655ac22e3b66ed..b6cdfeb3efc7a57ac84463f83b369384e87e21a2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Changes in development:
+
+       - Bug 2950: HTTP responses with no Date, Last-modified or expired can
+         now be cached (given an appropriate refresh_pattern). Previously we
+         were not caching them in case of an infinite loop in cache farms:
+         however Squid adds Date: headers now which remove that concern.
+
 Changes to squid-3.1.4 (30 May 2010):
 
        - Bug 2933: Verification of the max. port number for WCCP2 dynamic service
index 2420d6219048504c92672b203edd53637de044a0..8260c5f2dc2c9f73d738620f98b3e9a007ab2ad5 100644 (file)
@@ -441,22 +441,8 @@ HttpStateData::cacheableReply()
         if (!refreshIsCachable(entry) && !REFRESH_OVERRIDE(store_stale)) {
             debugs(22, 3, "refreshIsCachable() returned non-cacheable..");
             return 0;
-        }
-
-        /* don't cache objects from peers w/o LMT, Date, or Expires */
-        /* check that is it enough to check headers @?@ */
-        if (rep->date > -1)
-            return 1;
-        else if (rep->last_modified > -1)
-            return 1;
-        else if (!_peer)
-            return 1;
-
-        /* @?@ (here and 302): invalid expires header compiles to squid_curtime */
-        else if (rep->expires > -1)
-            return 1;
-        else
-            return 0;
+        } else 
+          return 1;
 
         /* NOTREACHED */
         break;