]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Avoid time traveling :)
authorJim Jagielski <jim@apache.org>
Wed, 29 Oct 2008 13:32:58 +0000 (13:32 +0000)
committerJim Jagielski <jim@apache.org>
Wed, 29 Oct 2008 13:32:58 +0000 (13:32 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@708902 13f79535-47bb-0310-9956-ffa450edef68

modules/metadata/mod_expires.c

index 984ee9312a7299dc60ca1e3be2b647fda7195040..16a4ff0b42d817b8495b4347f2355971f7dcffea 100644 (file)
@@ -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)));