]> granicus.if.org Git - apache/commitdiff
Move the insert_filter hook from the prepare request phase to the
authorWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 14 Dec 2001 03:30:23 +0000 (03:30 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 14 Dec 2001 03:30:23 +0000 (03:30 +0000)
  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

server/config.c
server/request.c

index 785d9dae8b75ccec6cefd6b16e2dd0c823e4c013..c032d9b416d50bbf774c53c76452a32929ff988c 100644 (file)
@@ -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) {
index ffecce817e575bcc4c89736764d4f72b5511cc51..34a2788d5d48304304a0c505610471b622d9b9d1 100644 (file)
@@ -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;
 }