httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r933886 - /httpd/httpd/trunk/modules/cache/cache_util.c
Date Wed, 14 Apr 2010 08:57:18 GMT
Author: rpluem
Date: Wed Apr 14 08:57:18 2010
New Revision: 933886

URL: http://svn.apache.org/viewvc?rev=933886&view=rev
Log:
* According to RFC2616 13.2.3 1. negative results of age calculations should
  be replaced by zero.

Reported by: Ryujiro Shibuya <rshibuya gmail.com>

Modified:
    httpd/httpd/trunk/modules/cache/cache_util.c

Modified: httpd/httpd/trunk/modules/cache/cache_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/cache_util.c?rev=933886&r1=933885&r2=933886&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/cache_util.c (original)
+++ httpd/httpd/trunk/modules/cache/cache_util.c Wed Apr 14 08:57:18 2010
@@ -198,6 +198,10 @@ CACHE_DECLARE(apr_int64_t) ap_cache_curr
     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);
 }
 



Mime
View raw message