Bug 39713

Summary: Seconds / microseconds confusion for warning header
Product: Apache httpd-2 Reporter: Owen Taylor <otaylor>
Component: mod_cacheAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED FIXED    
Severity: normal Keywords: FixedInTrunk
Priority: P2    
Version: 2.5-HEAD   
Target Milestone: ---   
Hardware: Other   
OS: other   

Description Owen Taylor 2006-06-03 14:03:54 UTC
in cache-util.c, we have:

        /* add warning if maxstale overrode freshness calculation */
        if (!(((smaxage != -1) && age < smaxage) ||
              ((maxage != -1) && age < maxage) ||
              (info->expire != APR_DATE_BAD &&
               (info->expire - info->date) > age))) {

But info->expire and info->date are in microseconds, and age is in
seconds. So, an apr_time_sec() is needed, as above.
Comment 1 Ruediger Pluem 2006-06-03 19:42:18 UTC
Thanks for the fix. Committed to trunk as r411464
(http://svn.apache.org/viewvc?rev=411464&view=rev).
Comment 2 Christophe JAILLET 2008-11-09 07:33:11 UTC
Included into trunk on Sat Jun 3 19:41:49 2006 UTC as explained in a previous comment.
Comment 3 Ruediger Pluem 2008-11-09 08:10:27 UTC
Proposed for backport in r712507.
Comment 4 Ruediger Pluem 2008-11-24 03:30:49 UTC
Backported to 2.2.x as r720171.