From: Ben Laurie Date: Thu, 22 Jul 1999 19:17:21 +0000 (+0000) Subject: And with one bound, he was free! This seemingly minor change allows modules X-Git-Tag: 1.3.7~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec84a171efab2eeb5e5290fbe83708960115ebb9;p=thirdparty%2Fapache%2Fhttpd.git And with one bound, he was free! This seemingly minor change allows modules 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 --- diff --git a/include/http_connection.h b/include/http_connection.h index 90f284133c2..cb5a04d4869 100644 --- a/include/http_connection.h +++ b/include/http_connection.h @@ -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 } diff --git a/server/connection.c b/server/connection.c index 357f5a26711..3c81e12eb05 100644 --- a/server/connection.c +++ b/server/connection.c @@ -66,9 +66,11 @@ 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