Commit 2d0a83f6 authored by Ruediger Pluem's avatar Ruediger Pluem
Browse files

* info->expire and info->date are in microseconds. So convert the difference

  to seconds before comparing it to age which is in seconds.

PR: 39713
Submitted by: Owen Taylor <otaylor redhat.com>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@411464 13f79535-47bb-0310-9956-ffa450edef68
parent 76ffcfb7
Loading
Loading
Loading
Loading
+6 −2
Changes for CHANGES: 6 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -2,9 +2,13 @@
Changes with Apache 2.3.0
  [Remove entries to the current 2.0 and 2.2 section below, when backported]
  *) mod_cache: Convert age of cached object to seconds before comparing it to
     age supplied by the request when checking whether to send a Warning
     header for a stale response. PR 39713. [Owen Taylor <otaylor redhat.com>]
  *) mod_authnz_ldap: Fix a problem with invalid auth error detection for
     LDAP client SDKs that don't support LDAP_SECURITY_ERROR macro. PR#39529
     [Ray Price <dohrayme yahoo.com>], [Josh Fenlason <jfenlason ptc.com>]
     LDAP client SDKs that don't support LDAP_SECURITY_ERROR macro. PR 39529.
     [Ray Price <dohrayme yahoo.com>, Josh Fenlason <jfenlason ptc.com>]
  *) mod_cache: Do not overwrite the Content-Type in the cache, for
     successfully revalidated cached objects. PR 39647. [Ruediger Pluem]
+1 −1
Changes for modules/cache/cache_util.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -314,7 +314,7 @@ CACHE_DECLARE(int) ap_cache_check_freshness(cache_handle_t *h,
        if (!(((smaxage != -1) && age < smaxage) ||
              ((maxage != -1) && age < maxage) ||
              (info->expire != APR_DATE_BAD &&
               (info->expire - info->date) > age))) {
               (apr_time_sec(info->expire - info->date)) > age))) {
            /* make sure we don't stomp on a previous warning */
            if ((warn_head == NULL) ||
                ((warn_head != NULL) && (ap_strstr_c(warn_head, "110") == NULL))) {