Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 5849 invoked from network); 8 Dec 2004 20:19:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 8 Dec 2004 20:19:09 -0000 Received: (qmail 24843 invoked by uid 500); 8 Dec 2004 20:19:09 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 24809 invoked by uid 500); 8 Dec 2004 20:19:08 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 24786 invoked by uid 99); 8 Dec 2004 20:19:08 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 08 Dec 2004 12:19:08 -0800 Received: (qmail 5800 invoked by uid 65534); 8 Dec 2004 20:19:05 -0000 Date: 8 Dec 2004 20:19:05 -0000 Message-ID: <20041208201905.5788.qmail@minotaur.apache.org> From: trawick@apache.org To: cvs@httpd.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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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; }