]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
And with one bound, he was free! This seemingly minor change allows modules
authorBen Laurie <ben@apache.org>
Thu, 22 Jul 1999 19:17:21 +0000 (19:17 +0000)
committerBen Laurie <ben@apache.org>
Thu, 22 Jul 1999 19:17:21 +0000 (19:17 +0000)
to take over connection processing, thus making Apache multiprotocol. Woo!

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

include/http_connection.h
server/connection.c

index 90f284133c2d3548e94a96198d23d047c3e2cbd8..cb5a04d48693b9102fdd3de2c9028a4745ae16ab 100644 (file)
@@ -69,9 +69,11 @@ conn_rec *ap_new_connection(pool *p, server_rec *server, BUFF *inout,
                            const struct sockaddr_in *saddr,
                            int child_num, int thread_num);
 CORE_EXPORT(void) ap_process_connection(conn_rec *);
+int ap_process_http_connection(conn_rec *);
 
   /* Hooks */
 DECLARE_HOOK(void,pre_connection,(conn_rec *))
+DECLARE_HOOK(int,process_connection,(conn_rec *))
 
 #ifdef __cplusplus
 }
index 357f5a2671199c9ce9dbb8db0d7640bc36f51d88..3c81e12eb05aad382c487903ace50c538346cd3e 100644 (file)
 
 HOOK_STRUCT(
            HOOK_LINK(pre_connection)
+           HOOK_LINK(process_connection)
 );
 
 IMPLEMENT_VOID_HOOK(pre_connection,(conn_rec *c),(c),RUN_ALL)
+IMPLEMENT_HOOK(int,process_connection,(conn_rec *c),(c),RUN_FIRST,OK,DECLINED)
 
 /* TODO: re-implement the lingering close stuff */
 #define NO_LINGCLOSE
@@ -190,12 +192,17 @@ static void lingering_close(request_rec *r)
 
 CORE_EXPORT(void) ap_process_connection(conn_rec *c)
 {
-    request_rec *r;
-
     ap_update_vhost_given_ip(c);
 
     ap_run_pre_connection(c);
 
+    ap_run_process_connection(c);
+}
+
+int ap_process_http_connection(conn_rec *c)
+    {
+    request_rec *r;
+
     /*
      * Read and process each request found on our connection
      * until no requests are left or we decide to close.
@@ -216,7 +223,7 @@ CORE_EXPORT(void) ap_process_connection(conn_rec *c)
        if (ap_graceful_stop_signalled()) {
            /* XXX: hey wait, this should do a lingering_close! */
            ap_bclose(c->client);
-           return;
+           return OK;
        }
     }
 
@@ -241,6 +248,8 @@ CORE_EXPORT(void) ap_process_connection(conn_rec *c)
        ap_bclose(c->client);
     }
 #endif
+
+    return OK;
 }
 
 /* Clearly some of this stuff doesn't belong in a generalised connection