]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Move where the CORE_IN filter is added to the server. We used to do this
authorRyan Bloom <rbb@apache.org>
Mon, 2 Oct 2000 19:52:37 +0000 (19:52 +0000)
committerRyan Bloom <rbb@apache.org>
Mon, 2 Oct 2000 19:52:37 +0000 (19:52 +0000)
in ap_new_connection, but that is bogus, because then other modules can't
put their own filter in.  Now, we do this in a new pre-connection hook
function.  Later, we will want to add some checking to make sure that this
is really an HTTP request that we are adding the filter for.

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

include/http_connection.h
modules/http/http_core.c
server/connection.c

index 2b204bd6fc8da26765e7ad8ecee830a188f9e017..22415a08d9c91dd26e1025e0b17bb73794bd118d 100644 (file)
@@ -101,7 +101,15 @@ conn_rec *ap_new_apr_connection(apr_pool_t *p, server_rec *server, BUFF *inout,
 CORE_EXPORT(void) ap_process_connection(conn_rec *);
 
 /**
- * The http protocol handler.  This makes Apache server http requests
+ * The http pre-protocol handler.  This makes sets up Apache to serve http
+ * requests
+ * @param c The connection on which the request is read
+ * @return OK or DECLINED
+ */
+int ap_pre_http_connection(conn_rec *);
+
+/**
+ * The http protocol handler.  This makes Apache serve http requests
  * @param c The connection on which the request is read
  * @return OK or DECLINED
  */
index 2709fd6ee96e81728a6b7cba8a76fa865a5d9512..eb493ca759b8f3877ab52b0ddd4118e3006855b8 100644 (file)
@@ -3467,6 +3467,8 @@ static void register_hooks(void)
 {
     ap_hook_post_config(core_post_config,NULL,NULL,AP_HOOK_REALLY_FIRST);
     ap_hook_translate_name(ap_core_translate,NULL,NULL,AP_HOOK_REALLY_LAST);
+    ap_hook_pre_connection(ap_pre_http_connection,NULL,NULL,
+                              AP_HOOK_REALLY_LAST);
     ap_hook_process_connection(ap_process_http_connection,NULL,NULL,
                               AP_HOOK_REALLY_LAST);
     ap_hook_http_method(core_method,NULL,NULL,AP_HOOK_REALLY_LAST);
index d36ff7064d5cb080a7b946ccfe00bd7fea52a990..9b1e04942ec08617ebc50e55785285769df879de 100644 (file)
@@ -214,6 +214,12 @@ CORE_EXPORT(void) ap_process_connection(conn_rec *c)
 
 }
 
+int ap_pre_http_connection(conn_rec *c)
+{
+    ap_add_input_filter("CORE_IN", NULL, c);
+    return OK;
+}
+
 int ap_process_http_connection(conn_rec *c)
 {
     request_rec *r;
@@ -276,8 +282,6 @@ conn_rec *ap_new_connection(apr_pool_t *p, server_rec *server, BUFF *inout,
     
     conn->id = id;
 
-    ap_add_input_filter("CORE_IN", NULL, conn);
-
     return conn;
 }