From a54955f9bea12b3057ac8cfc84da4eb6c96ddba7 Mon Sep 17 00:00:00 2001 From: Nick Kew Date: Sun, 4 Jan 2009 23:58:57 +0000 Subject: [PATCH] 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 --- modules/filters/mod_ext_filter.c | 14 ++++++++++++-- 1 file 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; -- 2.50.1