mod_cache: When a bad Expires date is present, we need to behave as if
authorGraham Leggett <minfrin@apache.org>
Sat, 12 Feb 2011 19:02:58 +0000 (19:02 +0000)
committerGraham Leggett <minfrin@apache.org>
Sat, 12 Feb 2011 19:02:58 +0000 (19:02 +0000)
the Expires is in the past, not as if the Expires is missing. PR 16521.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1070128 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/cache/mod_cache.c

diff --git a/CHANGES b/CHANGES
index 103725ed87fc0c631c4ce1583e24112cb45421fe..f0554a8958e2ff6689834d36e54ddd8446174f42 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@
 
 Changes with Apache 2.3.11
 
+  *) mod_cache: When a bad Expires date is present, we need to behave as if
+     the Expires is in the past, not as if the Expires is missing. PR 16521.
+     [Co-Advisor <coad@measurement-factory.com>]
+
   *) mod_cache: We must ignore quoted-string values that appear in a
      Cache-Control header. PR 50199. [Graham Leggett]
 
index 3e8a5d671f1486a5e35adc63aa9e839d4d1bb331..1faa2e745ef0b215a9f6d033e0c3bc131ff4c22d 100644 (file)
@@ -837,9 +837,7 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
         exps = apr_table_get(r->headers_out, "Expires");
     }
     if (exps != NULL) {
-        if (APR_DATE_BAD == (exp = apr_date_parse_http(exps))) {
-            exps = NULL;
-        }
+        exp = apr_date_parse_http(exps);
     }
     else {
         exp = APR_DATE_BAD;