From: Bill Stoddard Date: Sat, 23 Feb 2002 19:44:31 +0000 (+0000) Subject: Fix problem with expiry date being set in the past. X-Git-Tag: 2.0.33~148 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7a7af0705c0d13ea520225a8972b475165cb4478;p=apache Fix problem with expiry date being set in the past. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93552 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/experimental/mod_cache.c b/modules/experimental/mod_cache.c index f8e3700d5b..f7055d51fc 100644 --- a/modules/experimental/mod_cache.c +++ b/modules/experimental/mod_cache.c @@ -685,15 +685,12 @@ static int cache_in_filter(ap_filter_t *f, apr_bucket_brigade *in) } info->lastmod = lastmod; - /* so we now have the expiry date */ /* if no expiry date then * if lastmod * expiry date = now + min((date - lastmod) * factor, maxexpire) * else * expire date = now + defaultexpire */ - ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, r->server, - "cache: Expiry date is %ld", (long)exp); if (exp == APR_DATE_BAD) { if (lastmod != APR_DATE_BAD) { apr_time_t x = (apr_time_t) ((date - lastmod) * conf->factor); @@ -701,10 +698,9 @@ static int cache_in_filter(ap_filter_t *f, apr_bucket_brigade *in) x = conf->maxex; exp = now + x; } - else + else { exp = now + conf->defex; - ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, r->server, - "cache: Expiry date calculated %ld", (long)exp); + } } info->expire = exp;