diff options
author | Yann Ylavic <ylavic@apache.org> | 2015-03-10 18:25:17 +0100 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2015-03-10 18:25:17 +0100 |
commit | 0a431ef862d309e2157ada8da485fb227cadd0dd (patch) | |
tree | 2fbdea369daab080893212ea818f2b2e59ca3d8d /server/error_bucket.c | |
parent | motorz: add and use the timer event of the connection. (diff) | |
download | apache2-0a431ef862d309e2157ada8da485fb227cadd0dd.tar.xz apache2-0a431ef862d309e2157ada8da485fb227cadd0dd.zip |
core, modules: like r1657897 but for core and other modules than mod_proxy.
More uses of ap_map_http_request_error() and AP_FILTER_ERROR so that we never
return an HTTP error status from a handler if some filter generated a response
already.
That is, from a handler, either ap_get_brigade() (an input filter) returned
AP_FILTER_ERROR and we must forward it to ap_die(), or ap_pass_brigade() (an
output filter) failed with any status and we must return AP_FILTER_ERROR in
any case for ap_die() to determine whether a response is needed or not.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1665625 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/error_bucket.c')
-rw-r--r-- | server/error_bucket.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/error_bucket.c b/server/error_bucket.c index 9c118e6144..52b55c35c4 100644 --- a/server/error_bucket.c +++ b/server/error_bucket.c @@ -61,6 +61,9 @@ AP_DECLARE(apr_bucket *) ap_bucket_error_create(int error, const char *buf, APR_BUCKET_INIT(b); b->free = apr_bucket_free; b->list = list; + if (!ap_is_HTTP_VALID_RESPONSE(error)) { + error = HTTP_INTERNAL_SERVER_ERROR; + } return ap_bucket_error_make(b, error, buf, p); } |