mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
core: Add ap_create_connection() to create a server or client/proxy connection.
c->outgoing shouldn't be set by mod_ssl, ap_create_connection() allows that and this commit also replaces all the calls to ap_run_create_connection() in mod_proxy modules (not in the MPMs which create incoming connections only). * include/http_connection.h, server/connection.c: Declare and implement ap_create_connection(). * modules/proxy/proxy_util.c, modules/proxy/mod_proxy_connect.c, modules/proxy/mod_proxy_ftp.c: Use ap_create_connection() instead of ap_run_create_connection(), and don't provide a connection_id a scoreboard handle for outgoing connection. * server/log.c(do_errorlog_default): Use c->outgoing instead of c->sbh to determine if it's a "client" or "remote" connection. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893184 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1968,11 +1968,11 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
|
||||
}
|
||||
|
||||
/* the transfer socket is now open, create a new connection */
|
||||
data = ap_run_create_connection(p, r->server, data_sock, r->connection->id,
|
||||
r->connection->sbh, c->bucket_alloc);
|
||||
data = ap_create_connection(p, r->server, data_sock, 0, NULL,
|
||||
c->bucket_alloc, 1);
|
||||
if (!data) {
|
||||
/*
|
||||
* the peer reset the connection already; ap_run_create_connection() closed
|
||||
* the peer reset the connection already; ap_create_connection() closed
|
||||
* the socket
|
||||
*/
|
||||
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01054)
|
||||
|
Reference in New Issue
Block a user