trying to perform "now + ((date - lastmod) * factor)" where
date == lastmod resulting in "now + 0". The code now follows
the else path (using the default expiration) if date is
equal to lastmod. [rx@armstrike.com (Sergey), Paul J. Reder]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97589
13f79535-47bb-0310-9956-
ffa450edef68
Changes with Apache 2.0.44
+ *) Fix for PR 14556. The expiry calculations in mod_cache were
+ trying to perform "now + ((date - lastmod) * factor)" where
+ date == lastmod resulting in "now + 0". The code now follows
+ the else path (using the default expiration) if date is
+ equal to lastmod. [rx@armstrike.com (Sergey), Paul J. Reder]
+
*) Use AP_DECLARE in the debug versions of ap_strXXX in case the
default calling convention is not the same as the one used by
AP_DECLARE. [Juan Rivera <Juan.Rivera@citrix.com>]
* expire date = now + defaultexpire
*/
if (exp == APR_DATE_BAD) {
- if (lastmod != APR_DATE_BAD) {
+ /* if lastmod == date then you get 0*conf->factor which results in
+ * an expiration time of now. This causes some problems with
+ * freshness calculations, so we choose the else path...
+ */
+ if ((lastmod != APR_DATE_BAD) && (lastmod < date)) {
apr_time_t x = (apr_time_t) ((date - lastmod) * conf->factor);
if (x > conf->maxex) {
x = conf->maxex;