]> granicus.if.org Git - apache/commitdiff
* According to RFC2616 13.2.3 1. negative results of age calculations should
authorRuediger Pluem <rpluem@apache.org>
Wed, 14 Apr 2010 08:57:18 +0000 (08:57 +0000)
committerRuediger Pluem <rpluem@apache.org>
Wed, 14 Apr 2010 08:57:18 +0000 (08:57 +0000)
  be replaced by zero.

Reported by: Ryujiro Shibuya <rshibuya gmail.com>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@933886 13f79535-47bb-0310-9956-ffa450edef68

modules/cache/cache_util.c

index 73506f6834a8d80840db22a522fc585f361d9d8e..fb4f013828914ccda86e60d2b4c745f1c40b03db 100644 (file)
@@ -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);
 }