From: Yann Ylavic Date: Wed, 10 Dec 2014 18:45:24 +0000 (+0000) Subject: mod_proxy: don't add the default port to the name of proxy workers. PR 57259. X-Git-Tag: 2.5.0-alpha~3613 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c5d74a177b2b84c6b15b3a0c2058ab6885bd258;p=apache mod_proxy: don't add the default port to the name of proxy workers. PR 57259. ap_proxy_port_of_scheme() knows more default ports than apr_unparse_uri(). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1644503 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index fbb5c16b5a..0d3b32024c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) mod_proxy_ajp: Fix handling of the default port (8009) in the + ProxyPass and configurations. PR 57259. [Yann Ylavic]. + *) mod_ssl: Fix renegotiation failures redirected to an ErrorDocument. PR 57334. [Yann Ylavic]. diff --git a/docs/log-message-tags/next-number b/docs/log-message-tags/next-number index 9c1f8fc60e..b3a37ac4b7 100644 --- a/docs/log-message-tags/next-number +++ b/docs/log-message-tags/next-number @@ -1 +1 @@ -2823 +2825 diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 0f969d3c02..5a9379cf54 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -1732,6 +1732,9 @@ PROXY_DECLARE(char *) ap_proxy_define_worker(apr_pool_t *p, memset(wshared, 0, sizeof(proxy_worker_shared)); + if (uri.port && uri.port == ap_proxy_port_of_scheme(uri.scheme)) { + uri.port = 0; + } ptr = apr_uri_unparse(p, &uri, APR_URI_UNP_REVEALPASSWORD); if (PROXY_STRNCPY(wshared->name, ptr) != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(02808) @@ -2725,6 +2728,13 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function, worker->s->hostname); break; } + + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02823) + "%s: connection established with Unix domain socket " + "%s (%s)", + proxy_function, + conn->uds_path, + worker->s->hostname); } else #endif @@ -2817,6 +2827,12 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function, backend_addr = backend_addr->next; continue; } + + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02824) + "%s: connection established with %pI (%s)", + proxy_function, + backend_addr, + worker->s->hostname); } /* Set a timeout on the socket */