From: wessels <> Date: Tue, 12 Jan 1999 05:23:07 +0000 (+0000) Subject: fixed client_side cache-control max-age (henrik) X-Git-Tag: SQUID_3_0_PRE1~2430 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c525e01e55f7efb5025dd6e821ef49539f2ffcc7;p=thirdparty%2Fsquid.git fixed client_side cache-control max-age (henrik) --- diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc index 702d4683e1..d19ac3bc2d 100644 --- a/src/HttpRequest.cc +++ b/src/HttpRequest.cc @@ -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; diff --git a/src/refresh.cc b/src/refresh.cc index 1422ece991..90b4594406 100644 --- a/src/refresh.cc +++ b/src/refresh.cc @@ -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; diff --git a/src/structs.h b/src/structs.h index f2f1e0ef34..2adb8eb5ce 100644 --- a/src/structs.h +++ b/src/structs.h @@ -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;