Bug 39713 - Seconds / microseconds confusion for warning header
Seconds / microseconds confusion for warning header
Status: RESOLVED FIXED
Product: Apache httpd-2
Classification: Unclassified
Component: mod_cache
2.5-HEAD
Other other
: P2 normal (vote)
: ---
Assigned To: Apache HTTPD Bugs Mailing List
: FixedInTrunk
Depends on:
Blocks:
  Show dependency tree
 
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.