From: Jim Jagielski Date: Tue, 11 Nov 2008 19:59:22 +0000 (+0000) Subject: Merge r708902 from trunk: X-Git-Tag: 2.2.11~80 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e70c653dcdcc6e945ab8e801dfa4f43af5045ec6;p=thirdparty%2Fapache%2Fhttpd.git Merge r708902 from trunk: Avoid time traveling :) Reviewed by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@713142 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/STATUS b/STATUS index 419816d9425..adf7f35bf12 100644 --- a/STATUS +++ b/STATUS @@ -113,14 +113,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK: Trunk version of patch works +1: rpluem, jim, pgollucci - * mod_expires: Do not sets negative max-age / Expires header in the past. - PR 39774 [Jim Jagielski] - Trunk version of patch: - http://svn.apache.org/viewvc?rev=708902&view=rev - Backport version for 2.2.x of patch: - Trunk version of patch works - +1: rpluem, jim, pgollucci - PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] diff --git a/modules/metadata/mod_expires.c b/modules/metadata/mod_expires.c index 984ee9312a7..16a4ff0b42d 100644 --- a/modules/metadata/mod_expires.c +++ b/modules/metadata/mod_expires.c @@ -430,6 +430,9 @@ static int set_expiration_fields(request_rec *r, const char *code, } expires = base + additional; + if (expires < r->request_time) { + expires = r->request_time; + } apr_table_mergen(t, "Cache-Control", apr_psprintf(r->pool, "max-age=%" APR_TIME_T_FMT, apr_time_sec(expires - r->request_time)));