From: Nick Kew Date: Sat, 26 May 2007 18:50:18 +0000 (+0000) Subject: PR#39710 - badly broken errordocuments for CGI X-Git-Tag: 2.3.0~1794 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d09a836fb0295aa7eb9454adb5a67693535ec6e4;p=apache PR#39710 - badly broken errordocuments for CGI We've just had another duplicate report of this on bugzilla. We've got a simple patch, and people asking WTF is going on with inaction. Noone seems clear on why the patch shouldn't be applied (http://marc.info/?l=apache-httpd-dev&m=117760311129386&w=2). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@541926 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index 2c668c6b58..b0ffdabe25 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -929,18 +929,7 @@ static int cgi_handler(request_rec *r) int ret; if ((ret = ap_scan_script_header_err_brigade(r, bb, sbuf))) { - ret = log_script(r, conf, ret, dbuf, sbuf, bb, script_err); - - /* Set our status. */ - r->status = ret; - - /* Pass EOS bucket down the filter chain. */ - apr_brigade_cleanup(bb); - b = apr_bucket_eos_create(c->bucket_alloc); - APR_BRIGADE_INSERT_TAIL(bb, b); - ap_pass_brigade(r->output_filters, bb); - - return ret; + return log_script(r, conf, ret, dbuf, sbuf, bb, script_err); } location = apr_table_get(r->headers_out, "Location");