httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1584430 - /httpd/httpd/trunk/modules/metadata/mod_expires.c
Date Thu, 03 Apr 2014 22:20:16 GMT
Author: ylavic
Date: Thu Apr  3 22:20:15 2014
New Revision: 1584430

URL: http://svn.apache.org/r1584430
Log:
mod_expires: don't add Expires header to error responses (4xx/5xx),
             be they generated or forwarded. PR 55669.

Modified:
    httpd/httpd/trunk/modules/metadata/mod_expires.c

Modified: httpd/httpd/trunk/modules/metadata/mod_expires.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_expires.c?rev=1584430&r1=1584429&r2=1584430&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/metadata/mod_expires.c (original)
+++ httpd/httpd/trunk/modules/metadata/mod_expires.c Thu Apr  3 22:20:15 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