From: William A. Rowe Jr Date: Wed, 11 Aug 2004 23:30:54 +0000 (+0000) Subject: Fix setting of hostname for backend. X-Git-Tag: post_ajp_proxy~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bf25755997cd9e87bfec7249402cf582d1610042;p=apache 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 --- 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;