Jeff Trawick wrote:
Stas Bekman wrote:

Index: server/connection.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/connection.c,v
retrieving revision 1.106
diff -u -r1.106 connection.c
--- server/connection.c 15 Jul 2002 08:05:10 -0000      1.106
+++ server/connection.c 18 Feb 2003 01:11:38 -0000
@@ -199,11 +199,12 @@

 AP_CORE_DECLARE(void) ap_process_connection(conn_rec *c, void *csd)
 {
+    apr_status_t rc;
     ap_update_vhost_given_ip(c);

-    ap_run_pre_connection(c, csd);
-
-    if (!c->aborted) {
+    rc = ap_run_pre_connection(c, csd);
+
+    if ((rc == OK || rc == DONE) && !c->aborted) {
         ap_run_process_connection(c);


maybe patch should set c->aborted if some pre_connection hook fails, in case some other code wants to look at that?

rc = ap_run_pre_connection()
if (rc != OK && rc != DONE) {
    c->aborted = 1;
}

if (!c->aborted) {
  ap_run_process_connection()
}

You mean the code running after ap_process_connection() has returned? Yes, that works for me. Here is a new patch:


Index: server/connection.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/connection.c,v
retrieving revision 1.107
diff -u -r1.107 connection.c
--- server/connection.c 3 Feb 2003 17:53:18 -0000       1.107
+++ server/connection.c 24 Feb 2003 23:07:46 -0000
@@ -199,10 +199,14 @@

 AP_CORE_DECLARE(void) ap_process_connection(conn_rec *c, void *csd)
 {
+    apr_status_t rc;
     ap_update_vhost_given_ip(c);

-    ap_run_pre_connection(c, csd);
-
+    rc = ap_run_pre_connection(c, csd);
+    if (rc != OK && rc != DONE) {
+        c->aborted = 1;
+    }
+
     if (!c->aborted) {
         ap_run_process_connection(c);
     }

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



Reply via email to