From b82a2f2829e3a891562f7e01c803eadca442c588 Mon Sep 17 00:00:00 2001 From: Ruediger Pluem Date: Wed, 14 Apr 2010 08:57:18 +0000 Subject: [PATCH] * According to RFC2616 13.2.3 1. negative results of age calculations should be replaced by zero. Reported by: Ryujiro Shibuya git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@933886 13f79535-47bb-0310-9956-ffa450edef68 --- modules/cache/cache_util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/cache/cache_util.c b/modules/cache/cache_util.c index 73506f6834..fb4f013828 100644 --- a/modules/cache/cache_util.c +++ b/modules/cache/cache_util.c @@ -198,6 +198,10 @@ CACHE_DECLARE(apr_int64_t) ap_cache_current_age(cache_info *info, resident_time = now - info->response_time; current_age = corrected_initial_age + resident_time; + if (current_age < 0) { + current_age = 0; + } + return apr_time_sec(current_age); } -- 2.50.1