From: Ian Holsman Date: Mon, 16 Jul 2001 17:54:38 +0000 (+0000) Subject: applies change in APR function apr_socket_create, which added a new parameter. X-Git-Tag: 2.0.21~55 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eef8a5ccff043c25e20a79e1ebdd8fa91a4ad7ba;p=apache applies change in APR function apr_socket_create, which added a new parameter. I defaulted these to APR_INHERIT. Also.. the connection-close was being merged, insted of 'set' PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89559 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/proxy_connect.c b/modules/proxy/proxy_connect.c index e238c66fdc..766073c089 100644 --- a/modules/proxy/proxy_connect.c +++ b/modules/proxy/proxy_connect.c @@ -216,7 +216,7 @@ int ap_proxy_connect_handler(request_rec *r, proxy_server_conf *conf, } /* create a new socket */ - if ((rv = apr_socket_create(&sock, APR_INET, SOCK_STREAM, r->pool)) != APR_SUCCESS) { + if ((rv = apr_socket_create(&sock, APR_INET, SOCK_STREAM,APR_INHERIT, r->pool)) != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "proxy: error creating socket"); return HTTP_INTERNAL_SERVER_ERROR; diff --git a/modules/proxy/proxy_ftp.c b/modules/proxy/proxy_ftp.c index a6fca34980..7e25bbdff2 100644 --- a/modules/proxy/proxy_ftp.c +++ b/modules/proxy/proxy_ftp.c @@ -673,7 +673,7 @@ int ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf, } - if ((rv = apr_socket_create(&sock, APR_INET, SOCK_STREAM, r->pool)) != APR_SUCCESS) { + if ((rv = apr_socket_create(&sock, APR_INET, SOCK_STREAM, APR_INHERIT, r->pool)) != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "proxy: FTP: error creating socket"); return HTTP_INTERNAL_SERVER_ERROR; @@ -1038,7 +1038,7 @@ int ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf, "proxy: FTP: EPSV contacting remote host on port %d", remote_port); - if ((rv = apr_socket_create(&remote_sock, APR_INET, SOCK_STREAM, r->pool)) != APR_SUCCESS) { + if ((rv = apr_socket_create(&remote_sock, APR_INET, SOCK_STREAM, APR_INHERIT, r->pool)) != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "proxy: FTP: error creating EPSV socket"); return HTTP_INTERNAL_SERVER_ERROR; @@ -1132,7 +1132,7 @@ int ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf, "proxy: FTP: PASV contacting host %d.%d.%d.%d:%d", h3, h2, h1, h0, pasvport); - if ((rv = apr_socket_create(&remote_sock, APR_INET, SOCK_STREAM, r->pool)) != APR_SUCCESS) { + if ((rv = apr_socket_create(&remote_sock, APR_INET, SOCK_STREAM, APR_INHERIT, r->pool)) != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "proxy: error creating PASV socket"); return HTTP_INTERNAL_SERVER_ERROR; @@ -1174,7 +1174,7 @@ int ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf, apr_port_t local_port; unsigned int h0, h1, h2, h3, p0, p1; - if ((rv = apr_socket_create(&local_sock, APR_INET, SOCK_STREAM, r->pool)) != APR_SUCCESS) { + if ((rv = apr_socket_create(&local_sock, APR_INET, SOCK_STREAM, APR_INHERIT, r->pool)) != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "proxy: FTP: error creating local socket"); return HTTP_INTERNAL_SERVER_ERROR; diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index e5ba4824d8..2d899c7f32 100644 --- a/modules/proxy/proxy_http.c +++ b/modules/proxy/proxy_http.c @@ -363,7 +363,7 @@ int ap_proxy_http_handler(request_rec *r, proxy_server_conf *conf, backend->connection = NULL; /* see memory note above */ - if ((rv = apr_socket_create(&sock, APR_INET, SOCK_STREAM, c->pool)) != APR_SUCCESS) { + if ((rv = apr_socket_create(&sock, APR_INET, SOCK_STREAM, APR_INHERIT, c->pool)) != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server, "proxy: error creating socket"); return HTTP_INTERNAL_SERVER_ERROR; @@ -466,7 +466,7 @@ int ap_proxy_http_handler(request_rec *r, proxy_server_conf *conf, close += ap_proxy_liststr(apr_table_get(r->headers_in, "Connection"), "close"); ap_proxy_clear_connection(p, r->headers_in); if (close) { - apr_table_mergen(r->headers_in, "Connection", "close"); + apr_table_setn(r->headers_in, "Connection", "close"); origin->keepalive = 0; }