]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fixed mod_expires: Expires time shouldn't be in the past.
authorGuenter Knauf <fuankg@apache.org>
Wed, 6 Oct 2010 10:35:12 +0000 (10:35 +0000)
committerGuenter Knauf <fuankg@apache.org>
Wed, 6 Oct 2010 10:35:12 +0000 (10:35 +0000)
r1002205 in test framework needs to be reverted now since this is fixed.
Author: rjung, reviewed by: wrowe, sf.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@1004974 13f79535-47bb-0310-9956-ffa450edef68

STATUS
modules/metadata/mod_expires.c

diff --git a/STATUS b/STATUS
index 854d7557bcc23462141bfea5d661d8ec4e6c7155..fdc1ec9710f7e786ae5a7c9f298d937f1460391f 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -132,13 +132,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  * mod_expires: Expires time shouldn't be in the past
-    Trunk patch: http://svn.apache.org/viewvc?view=revision&revision=708902
-    2.2.x patch: http://svn.apache.org/viewvc?view=revision&revision=713142
-    Backport: http://people.apache.org/~rjung/patches/expires-in-the-past-2_0.patch
-    Revert r1002205 in test framework, once this is fixed.
-    +1: rjung, wrowe, sf
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ please place SVN revisions from trunk here, so it is easy to
     identify exactly what the proposed changes are!  Add all new
index 7dfeb964b11cc02a461fba7befb6b0b75dd8befc..7c2b78a5a1bac33c2a1f79a5ea0021fa0249f859 100644 (file)
@@ -427,6 +427,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)));