]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
fixed client_side cache-control max-age (henrik)
authorwessels <>
Tue, 12 Jan 1999 05:23:07 +0000 (05:23 +0000)
committerwessels <>
Tue, 12 Jan 1999 05:23:07 +0000 (05:23 +0000)
src/HttpRequest.cc
src/refresh.cc
src/structs.h

index 702d4683e1c6135c013b2e5de8dd8b4e2583cb43..d19ac3bc2da544fedc5396832f8f9478ea925fc7 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpRequest.cc,v 1.19 1998/12/05 00:54:12 wessels Exp $
+ * $Id: HttpRequest.cc,v 1.20 1999/01/11 22:23:07 wessels Exp $
  *
  * DEBUG: section 73    HTTP Request
  * AUTHOR: Duane Wessels
@@ -43,7 +43,6 @@ requestCreate(method_t method, protocol_t protocol, const char *urlpath)
     req->protocol = protocol;
     if (urlpath)
        stringReset(&req->urlpath, urlpath);
-    req->max_age = -1;
     req->max_forwards = -1;
 #if DELAY_POOLS
     req->delay_id = 0;
index 1422ece991b56e1f6873f2323facc9870f5f8677..90b45944061d0171c9b1383e06b5a033e0180029 100644 (file)
@@ -1,7 +1,7 @@
 
 
 /*
- * $Id: refresh.cc,v 1.45 1998/11/13 20:50:56 wessels Exp $
+ * $Id: refresh.cc,v 1.46 1999/01/11 22:23:07 wessels Exp $
  *
  * DEBUG: section 22    Refresh Calculation
  * AUTHOR: Harvest Derived
@@ -187,8 +187,8 @@ refreshCheck(const StoreEntry * entry, request_t * request, time_t delta, struct
            rc->negative_age_stale++;
            return 1;
        }
-       if (request->max_age > -1) {
-           if (age > request->max_age) {
+       if (request->cache_control && request->cache_control->max_age > -1) {
+           if (age > request->cache_control->max_age) {
                debug(22, 3) ("refreshCheck: YES: age > client-max-age\n");
                rc->request_max_age_stale++;
                return 1;
index f2f1e0ef349703cafcb60cd91c594a754154877e..2adb8eb5cedbab92e35ba6f7267d3c9cff6d258e 100644 (file)
@@ -1,7 +1,7 @@
 
 
 /*
- * $Id: structs.h,v 1.255 1999/01/08 21:12:18 wessels Exp $
+ * $Id: structs.h,v 1.256 1999/01/11 22:23:08 wessels Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -1294,7 +1294,6 @@ struct _request_t {
     request_flags flags;
     HttpHdrCc *cache_control;
     HttpHdrRange *range;
-    time_t max_age;
     float http_ver;
     time_t ims;
     int imslen;