]> granicus.if.org Git - apache/commitdiff
Merge r1584430, r1584434 from trunk:
authorJim Jagielski <jim@apache.org>
Wed, 7 May 2014 12:50:35 +0000 (12:50 +0000)
committerJim Jagielski <jim@apache.org>
Wed, 7 May 2014 12:50:35 +0000 (12:50 +0000)
mod_expires: don't add Expires header to error responses (4xx/5xx),
             be they generated or forwarded. PR 55669.

Follow up to r1584430.

Submitted by: ylavic
Reviewed/backported by: jim

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

CHANGES
STATUS
modules/metadata/mod_expires.c

diff --git a/CHANGES b/CHANGES
index 613eac5cbcdc023bc5b3ed3d06de27cba73633b7..b300af53b5ce6d4b82ebe430b80c36e5fc15296d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.10
 
+  *) mod_expires: don't add Expires header to error responses (4xx/5xx),
+     be they generated or forwarded. PR 55669. [ Yann Ylavic ]
+
   *) mod_proxy_fcgi: Don't segfault when failing to connect to the backend.
      (regression in 2.4.9 release) [Jeff Trawick]
 
diff --git a/STATUS b/STATUS
index b91a6cbb8429d758c5adc7daac5d9d6ceb6d50f6..8038c4b0398f0ad7478f59d48521be2f1e7406d1 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -100,13 +100,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * mod_expires: don't add Expires header to error responses (4xx/5xx),
-                  be they generated or forwarded. PR 55669.
-     trunk patch: http://svn.apache.org/r1584430
-                  http://svn.apache.org/r1584434
-     2.4.x patch: trunk works (modulo CHANGES)
-     +1: ylavic, covener, jim
-
    * mod_cache: Fix CacheLock on Windows
      trunk patch: http://svn.apache.org/r1588704
      2.4.x patch: trunk works
index 049cfc2250961029d993a00e601f7c538ede2aaf..8f8a7776939c73ea331b3e9f2d7bd6369f4eeebd 100644 (file)
@@ -451,6 +451,12 @@ static apr_status_t expires_filter(ap_filter_t *f,
     const char *expiry;
     apr_table_t *t;
 
+    /* Don't add Expires headers to errors */
+    if (ap_is_HTTP_ERROR(f->r->status)) {
+        ap_remove_output_filter(f);
+        return ap_pass_brigade(f->next, b);
+    }
+
     r = f->r;
     conf = (expires_dir_config *) ap_get_module_config(r->per_dir_config,
                                                        &expires_module);