summaryrefslogtreecommitdiffstats
path: root/modules/filters
diff options
context:
space:
mode:
authorNick Kew <niq@apache.org>2009-01-05 00:58:57 +0100
committerNick Kew <niq@apache.org>2009-01-05 00:58:57 +0100
commita54955f9bea12b3057ac8cfc84da4eb6c96ddba7 (patch)
tree0a8066fc8e08b1a88c77e00b96ca0b501a6d96d2 /modules/filters
parentmod_session_crypto: Ensure that SessionCryptoDriver can only be (diff)
downloadapache2-a54955f9bea12b3057ac8cfc84da4eb6c96ddba7.tar.xz
apache2-a54955f9bea12b3057ac8cfc84da4eb6c96ddba7.zip
Improved fix to PR#41120: send a clean error response when aborting
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@731388 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/filters')
-rw-r--r--modules/filters/mod_ext_filter.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/modules/filters/mod_ext_filter.c b/modules/filters/mod_ext_filter.c
index 81cd70bf39..bdb1b464a2 100644
--- a/modules/filters/mod_ext_filter.c
+++ b/modules/filters/mod_ext_filter.c
@@ -879,8 +879,18 @@ static apr_status_t ef_output_filter(ap_filter_t *f, apr_bucket_brigade *bb)
return ap_pass_brigade(f->next, bb);
}
else {
- f->r->status = HTTP_INTERNAL_SERVER_ERROR;
- return HTTP_INTERNAL_SERVER_ERROR;
+ apr_bucket *e;
+ f->r->status_line = "500 Internal Server Error";
+
+ apr_brigade_cleanup(bb);
+ e = ap_bucket_error_create(HTTP_INTERNAL_SERVER_ERROR,
+ NULL, r->pool,
+ f->c->bucket_alloc);
+ APR_BRIGADE_INSERT_TAIL(bb, e);
+ e = apr_bucket_eos_create(f->c->bucket_alloc);
+ APR_BRIGADE_INSERT_TAIL(bb, e);
+ ap_pass_brigade(f->next, bb);
+ return AP_FILTER_ERROR;
}
}
ctx = f->ctx;