From: Jim Jagielski Date: Thu, 17 Oct 2013 15:24:44 +0000 (+0000) Subject: Only assume localhost in the special case where the person X-Git-Tag: 2.5.0-alpha~4928 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d152f386a0e16d85b86b87d92a954ab14698b735;p=apache Only assume localhost in the special case where the person just has the lone scheme after the | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1533113 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 405c41e58a..3ebe00142e 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -1636,12 +1636,13 @@ PROXY_DECLARE(char *) ap_proxy_define_worker(apr_pool_t *p, return apr_pstrcat(p, "URL must be absolute!: ", url, NULL); } /* allow for unix:/path|http: */ - if (!uri.hostname && !sockpath) { - return apr_pstrcat(p, "URL must be absolute!: ", url, NULL);; - } - - if (sockpath) { - uri.hostname = "localhost"; + if (!uri.hostname) { + if (sockpath) { + uri.hostname = "localhost"; + } + else { + return apr_pstrcat(p, "URL must be absolute!: ", url, NULL); + } } else { ap_str_tolower(uri.hostname);