httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject svn commit: r151375 - in httpd/httpd/branches/2.0.x: CHANGES modules/proxy/proxy_ftp.c modules/proxy/proxy_http.c
Date Fri, 04 Feb 2005 17:34:28 GMT
Author: jerenkrantz
Date: Fri Feb  4 09:34:25 2005
New Revision: 151375

URL: http://svn.apache.org/viewcvs?view=rev&rev=151375
Log:
mod_proxy: Respect errors reported by pre_connection hooks.

MFC: 111304 (adjusted by Justin to apply against 2.0.x proxy)
Reviewed by: trawick, jerenkrantz, fielding

Modified:
    httpd/httpd/branches/2.0.x/CHANGES
    httpd/httpd/branches/2.0.x/modules/proxy/proxy_ftp.c
    httpd/httpd/branches/2.0.x/modules/proxy/proxy_http.c

Modified: httpd/httpd/branches/2.0.x/CHANGES
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.0.x/CHANGES?view=diff&r1=151374&r2=151375
==============================================================================
--- httpd/httpd/branches/2.0.x/CHANGES (original)
+++ httpd/httpd/branches/2.0.x/CHANGES Fri Feb  4 09:34:25 2005
@@ -1,5 +1,8 @@
 Changes with Apache 2.0.53
 
+  *) mod_proxy: Respect errors reported by pre_connection hooks.
+     [Jeff Trawick]
+
   *) --with-module can now take more than one module to be statically
      linked: --with-module=<modtype>:<modfile>,<modtype>:<modfile>,...
      If the <modtype>-subdirectory doesn't exist it will be created and

Modified: httpd/httpd/branches/2.0.x/modules/proxy/proxy_ftp.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.0.x/modules/proxy/proxy_ftp.c?view=diff&r1=151374&r2=151375
==============================================================================
--- httpd/httpd/branches/2.0.x/modules/proxy/proxy_ftp.c (original)
+++ httpd/httpd/branches/2.0.x/modules/proxy/proxy_ftp.c Fri Feb  4 09:34:25 2005
@@ -1027,7 +1027,14 @@
      */
 
     /* set up the connection filters */
-    ap_run_pre_connection(origin, sock);
+    rc = ap_run_pre_connection(origin, sock);
+    if (rc != OK && rc != DONE) {
+        origin->aborted = 1;
+        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
+                     "proxy: FTP: pre_connection setup failed (%d)",
+                     rc);
+        return rc;
+    }
 
     /* possible results: */
     /* 120 Service ready in nnn minutes. */
@@ -1772,7 +1779,14 @@
     }
 
     /* set up the connection filters */
-    ap_run_pre_connection(data, data_sock);
+    rc = ap_run_pre_connection(data, data_sock);
+    if (rc != OK && rc != DONE) {
+        data->aborted = 1;
+        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
+                     "proxy: FTP: pre_connection setup failed (%d)",
+                     rc);
+        return rc;
+    }
 
     /*
      * VI: Receive the Response ------------------------

Modified: httpd/httpd/branches/2.0.x/modules/proxy/proxy_http.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.0.x/modules/proxy/proxy_http.c?view=diff&r1=151374&r2=151375
==============================================================================
--- httpd/httpd/branches/2.0.x/modules/proxy/proxy_http.c (original)
+++ httpd/httpd/branches/2.0.x/modules/proxy/proxy_http.c Fri Feb  4 09:34:25 2005
@@ -304,6 +304,7 @@
         }
     }
     if (new) {
+        int rc;
 
         /* create a new socket */
         backend->connection = NULL;
@@ -370,7 +371,14 @@
                      p_conn->addr, p_conn->name);
 
         /* set up the connection filters */
-        ap_run_pre_connection(*origin, p_conn->sock);
+        rc = ap_run_pre_connection(*origin, p_conn->sock);
+        if (rc != OK && rc != DONE) {
+            (*origin)->aborted = 1;
+            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
+                         "proxy: HTTP: pre_connection setup failed (%d)",
+                         rc);
+            return rc;
+        }
     }
     return OK;
 }



Mime
View raw message