From: Greg Ames Date: Tue, 19 Sep 2000 21:11:01 +0000 (+0000) Subject: Fix a bug where errors that happen during early request parsing (like 400 X-Git-Tag: APACHE_2_0_ALPHA_7~139 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c0f7a5b2c839e686033ecb53330587ea9ffb6d9b;p=apache Fix a bug where errors that happen during early request parsing (like 400 HTTP_BAD_REQUEST) don't send any error message content to the browser. The core_filter wasn't present this early in request parsing, so the output went into the bit bucket via r[v]puts->ap_pass_brigade. The chunking filter takes care of itself nicely, because it is added in ap_send_http_header if it's needed. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86253 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_core.c b/modules/http/http_core.c index 499bdc8844..d676b02924 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -3146,8 +3146,6 @@ static void core_register_filter(request_rec *r) char *foobar = items[i]; ap_add_filter(foobar, NULL, r); } - - ap_add_filter("CORE", NULL, r); } static void register_hooks(void) diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index cc208887e3..5d81855733 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -1200,6 +1200,8 @@ request_rec *ap_read_request(conn_rec *conn) r->status = HTTP_REQUEST_TIME_OUT; /* Until we get a request */ r->the_request = NULL; + ap_add_filter("CORE", NULL, r); + #ifdef APACHE_XLATE r->rrx = apr_pcalloc(p, sizeof(struct ap_rr_xlate)); ap_set_content_xlate(r, 0, ap_locale_from_ascii);