Bug 39713 - Seconds / microseconds confusion for warning header
Summary: Seconds / microseconds confusion for warning header
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_cache (show other bugs)
Version: 2.5-HEAD
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: FixedInTrunk
Depends on:
Blocks:
 
Reported: 2006-06-03 14:03 UTC by Owen Taylor
Modified: 2008-11-24 03:30 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.