From bf25755997cd9e87bfec7249402cf582d1610042 Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Wed, 11 Aug 2004 23:30:54 +0000 Subject: [PATCH] Fix setting of hostname for backend. The now reflects the real name withouth scheme:// prefix. Submitted by: mturk git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104628 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/proxy_util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index bc1b96164a..e03637b801 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -1129,9 +1129,11 @@ PROXY_DECLARE(const char *) ap_proxy_add_worker(proxy_worker **worker, ap_str_tolower(uri); *worker = apr_array_push(conf->workers); memset(*worker, 0, sizeof(proxy_worker)); - (*worker)->name = (*worker)->hostname = apr_pstrdup(p, uri); + (*worker)->name = apr_pstrdup(p, uri); *c = '\0'; (*worker)->scheme = uri; + (*worker)->hostname = c + 3; + if (port == -1) port = apr_uri_port_of_scheme((*worker)->scheme); (*worker)->port = port; -- 2.40.0