]> granicus.if.org Git - apache/commitdiff
Combine the calls to add the core_filter to one place. Basically, it is
authorRyan Bloom <rbb@apache.org>
Sat, 23 Sep 2000 18:39:30 +0000 (18:39 +0000)
committerRyan Bloom <rbb@apache.org>
Sat, 23 Sep 2000 18:39:30 +0000 (18:39 +0000)
safe to add the core_filter during the post_read_request, and it means
that we only have to add the filter once in the code.  This should make
it easier to add an SSL module in the future.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86307 13f79535-47bb-0310-9956-ffa450edef68

modules/http/http_core.c
modules/http/http_protocol.c
modules/http/http_request.c

index 810822d864fa6734cc7767caaf27300370e85d57..5fbd376b986789985a683a0311842f387a432e9b 100644 (file)
@@ -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.
index e44fd5faf74e75246066fc3145e85c8ebc7fbcce..3463aa5c9b39f26f7ca19eb873433008a7c192c4 100644 (file)
@@ -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);
index f8c6f5b203a0c07c4dfafca05eafd3d5292f1f96..2b68e0ecfa7693edc6d7139e81a8d9e1d160866e 100644 (file)
@@ -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