]> granicus.if.org Git - apache/commitdiff
Follow up to r1773761: we need to check both ap_send_error_response() and internal...
authorYann Ylavic <ylavic@apache.org>
Mon, 12 Dec 2016 19:44:20 +0000 (19:44 +0000)
committerYann Ylavic <ylavic@apache.org>
Mon, 12 Dec 2016 19:44:20 +0000 (19:44 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1773862 13f79535-47bb-0310-9956-ffa450edef68

modules/http/http_filters.c

index 21523c5cbdd6f1cb7f6aa1715f9605128dea1c44..65607df739256b9be97c263caaaab4d12349e7f4 100644 (file)
@@ -1249,11 +1249,11 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f,
         apr_table_clear(r->headers_out);
         apr_table_clear(r->err_headers_out);
 
-        /* Don't try ErrorDocument if we are (internal-)redirect-ed already,
-         * otherwise we can end up in infinite recursion, better fall through
-         * with 500, minimal headers and an empty body (EOS only).
+        /* Don't try ErrorDocument if we are (internal-)redirect-ed or dying
+         * already, otherwise we can end up in infinite recursion, better fall
+         * through with 500, minimal headers and an empty body (EOS only).
          */
-        if (!dying) {
+        if (ap_is_initial_req(r) && !dying) {
             apr_brigade_cleanup(b);
             apr_pool_userdata_setn("true", "http_header_filter_dying",
                                    apr_pool_cleanup_null, r->pool);