From: Ruediger Pluem Date: Mon, 24 Nov 2008 11:30:35 +0000 (+0000) Subject: Merge r411464 from trunk: X-Git-Tag: 2.2.11~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48e87ab719baddd1cde02645053691d3bd6bb079;p=thirdparty%2Fapache%2Fhttpd.git Merge r411464 from trunk: * 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 Reviewed by: rpluem, jim, jfclere git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@720171 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 3546f797ef0..d653b31fbb9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,10 @@ -*- coding: utf-8 -*- Changes with Apache 2.2.11 + *) 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 ] + *) Build: Correctly set SSL_LIBS during openssl detection if pkgconfig is not available. PR 46018 [Ruediger Pluem] diff --git a/STATUS b/STATUS index 4accf166b43..183c4793b48 100644 --- a/STATUS +++ b/STATUS @@ -86,14 +86,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * 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. - Trunk version of patch: - http://svn.apache.org/viewvc?rev=411464&view=rev - Backport version for 2.2.x of patch: - Trunk version of patch works - +1: rpluem, jim, jfclere PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] diff --git a/modules/cache/cache_util.c b/modules/cache/cache_util.c index 78770ffdcde..ec2d749b6c7 100644 --- a/modules/cache/cache_util.c +++ b/modules/cache/cache_util.c @@ -351,7 +351,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))) {