httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r111304 - /httpd/httpd/trunk/CHANGES /httpd/httpd/trunk/modules/proxy/proxy_ftp.c /httpd/httpd/trunk/modules/proxy/proxy_util.c
Date Wed, 08 Dec 2004 20:19:05 GMT
Author: trawick
Date: Wed Dec  8 12:19:04 2004
New Revision: 111304

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

Modified:
   httpd/httpd/trunk/CHANGES
   httpd/httpd/trunk/modules/proxy/proxy_ftp.c
   httpd/httpd/trunk/modules/proxy/proxy_util.c

Modified: httpd/httpd/trunk/CHANGES
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/CHANGES?view=diff&rev=111304&p1=httpd/httpd/trunk/CHANGES&r1=111303&p2=httpd/httpd/trunk/CHANGES&r2=111304
==============================================================================
--- httpd/httpd/trunk/CHANGES	(original)
+++ httpd/httpd/trunk/CHANGES	Wed Dec  8 12:19:04 2004
@@ -2,6 +2,9 @@
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) mod_proxy: Respect errors reported by pre_connection hooks.
+     [Jeff Trawick]
+
   *) worker MPM: Fix a problem which could cause httpd processes to
      remain active after shutdown.  [Jeff Trawick]
 

Modified: httpd/httpd/trunk/modules/proxy/proxy_ftp.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/proxy/proxy_ftp.c?view=diff&rev=111304&p1=httpd/httpd/trunk/modules/proxy/proxy_ftp.c&r1=111303&p2=httpd/httpd/trunk/modules/proxy/proxy_ftp.c&r2=111304
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_ftp.c	(original)
+++ httpd/httpd/trunk/modules/proxy/proxy_ftp.c	Wed Dec  8 12:19:04 2004
@@ -1725,7 +1725,15 @@
     }
 
     /* 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) {
+        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
+                     "proxy: FTP: pre_connection setup failed (%d)",
+                     rc);
+        data->aborted = 1;
+        proxy_ftp_cleanup(r, backend);
+        return rc;
+    }
 
     /*
      * VI: Receive the Response ------------------------

Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/proxy/proxy_util.c?view=diff&rev=111304&p1=httpd/httpd/trunk/modules/proxy/proxy_util.c&r1=111303&p2=httpd/httpd/trunk/modules/proxy/proxy_util.c&r2=111304
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_util.c	(original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c	Wed Dec  8 12:19:04 2004
@@ -1819,6 +1819,7 @@
                                               server_rec *s)
 {
     apr_sockaddr_t *backend_addr = conn->addr;
+    int rc;
 
     /* The socket is now open, create a new backend server connection 
     * 
@@ -1867,7 +1868,14 @@
                  proxy_function, backend_addr, conn->hostname);
 
     /* set up the connection filters */
-    ap_run_pre_connection(conn->connection, conn->sock);
+    rc = ap_run_pre_connection(conn->connection, conn->sock);
+    if (rc != OK && rc != DONE) {
+        conn->connection->aborted = 1;
+        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
+                     "proxy: %s: pre_connection setup failed (%d)",
+                     proxy_function, rc);
+        return rc;
+    }
 
     return OK;
 }

Mime
View raw message