httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1592999 - in /httpd/httpd/branches/2.4.x: ./ CHANGES STATUS modules/metadata/mod_expires.c
Date Wed, 07 May 2014 12:50:36 GMT
Author: jim
Date: Wed May  7 12:50:35 2014
New Revision: 1592999

URL: http://svn.apache.org/r1592999
Log:
Merge r1584430, r1584434 from trunk:

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

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/CHANGES
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/modules/metadata/mod_expires.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1584430,1584434

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1592999&r1=1592998&r2=1592999&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Wed May  7 12:50:35 2014
@@ -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]
 

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1592999&r1=1592998&r2=1592999&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Wed May  7 12:50:35 2014
@@ -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

Modified: httpd/httpd/branches/2.4.x/modules/metadata/mod_expires.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/metadata/mod_expires.c?rev=1592999&r1=1592998&r2=1592999&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/metadata/mod_expires.c (original)
+++ httpd/httpd/branches/2.4.x/modules/metadata/mod_expires.c Wed May  7 12:50:35 2014
@@ -451,6 +451,12 @@ static apr_status_t expires_filter(ap_fi
     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);



Mime
View raw message