]> granicus.if.org Git - apache/commitdiff
mod_proxy: don't add the default port to the name of proxy workers. PR 57259.
authorYann Ylavic <ylavic@apache.org>
Wed, 10 Dec 2014 18:45:24 +0000 (18:45 +0000)
committerYann Ylavic <ylavic@apache.org>
Wed, 10 Dec 2014 18:45:24 +0000 (18:45 +0000)
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

CHANGES
docs/log-message-tags/next-number
modules/proxy/proxy_util.c

diff --git a/CHANGES b/CHANGES
index fbb5c16b5ab75339319a0527647e9972f434edfd..0d3b32024cbeb950ca98cb13f85023e90594b63b 100644 (file)
--- 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 <Proxy> configurations.  PR 57259.  [Yann Ylavic].
+
   *) mod_ssl: Fix renegotiation failures redirected to an ErrorDocument.
      PR 57334.  [Yann Ylavic].
 
index 9c1f8fc60e5c0bf715ac0eae25cf198c43fde087..b3a37ac4b74edb7058a56b0067858144d5d6cc26 100644 (file)
@@ -1 +1 @@
-2823
+2825
index 0f969d3c02fff39a82b8472d1fdafadf7afa7387..5a9379cf54f7d6c878d3aeae74077d33e727cd5a 100644 (file)
@@ -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 */