From: William A. Rowe Jr Date: Fri, 14 Dec 2001 03:30:23 +0000 (+0000) Subject: Move the insert_filter hook from the prepare request phase to the X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6b7de62e8e7017796a3d4b83dcbd29da1dba556e;p=apache Move the insert_filter hook from the prepare request phase to the invoke handler phase, since it can't fail, and contributes nothing to the request 'character', but everything to it's invocation. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92471 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/config.c b/server/config.c index 785d9dae8b..c032d9b416 100644 --- a/server/config.c +++ b/server/config.c @@ -333,6 +333,16 @@ AP_CORE_DECLARE(int) ap_invoke_handler(request_rec *r) char hbuf[MAX_STRING_LEN]; const char *old_handler = r->handler; + /* + * The new insert_filter stage makes the most sense here. We only use + * it when we are going to run the request, so we must insert filters + * if any are available. Since the goal of this phase is to allow all + * modules to insert a filter if they want to, this filter returns + * void. I just can't see any way that this filter can reasonably + * fail, either your modules inserts something or it doesn't. rbb + */ + ap_run_insert_filter(r); + if (!r->handler) { handler = r->content_type ? r->content_type : ap_default_type(r); if ((p=ap_strchr_c(handler, ';')) != NULL) { diff --git a/server/request.c b/server/request.c index ffecce817e..34a2788d5d 100644 --- a/server/request.c +++ b/server/request.c @@ -269,15 +269,6 @@ AP_DECLARE(int) ap_process_request_internal(request_rec *r) return access_status; } - /* The new insert_filter stage makes sense here IMHO. We are sure that - * we are going to run the request now, so we may as well insert filters - * if any are available. Since the goal of this phase is to allow all - * modules to insert a filter if they want to, this filter returns - * void. I just can't see any way that this filter can reasonably - * fail, either your modules inserts something or it doesn't. rbb - */ - ap_run_insert_filter(r); - return OK; }