diff --git a/modules/http/http_core.c b/modules/http/http_core.c index 810822d864..5fbd376b98 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -3284,6 +3284,11 @@ static const char *core_method(const request_rec *r) static unsigned short core_port(const request_rec *r) { return DEFAULT_HTTP_PORT; } +static int core_post_read_req(request_rec *r) +{ + ap_add_filter("CORE", NULL, r); +} + static void core_register_filter(request_rec *r) { int i; @@ -3310,6 +3315,7 @@ static void register_hooks(void) /* FIXME: I suspect we can eliminate the need for these - Ben */ ap_hook_type_checker(do_nothing,NULL,NULL,AP_HOOK_REALLY_LAST); ap_hook_access_checker(do_nothing,NULL,NULL,AP_HOOK_REALLY_LAST); + ap_hook_post_read_request(core_post_read_req, NULL, NULL, AP_HOOK_REALLY_FIRST); /* define the CORE filter, then register a hook to insert it at * request-processing time. diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index e44fd5faf7..3463aa5c9b 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -1200,8 +1200,6 @@ 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); diff --git a/modules/http/http_request.c b/modules/http/http_request.c index f8c6f5b203..2b68e0ecfa 100644 --- a/modules/http/http_request.c +++ b/modules/http/http_request.c @@ -1388,8 +1388,6 @@ static request_rec *internal_internal_redirect(const char *new_uri, apr_table_setn(new->subprocess_env, "REDIRECT_STATUS", apr_psprintf(r->pool, "%d", r->status)); - ap_add_filter("CORE", NULL, new); - /* * XXX: hmm. This is because mod_setenvif and mod_unique_id really need * to do their thing on internal redirects as well. Perhaps this is a