]> granicus.if.org Git - apache/commitdiff
Only assume localhost in the special case where the person
authorJim Jagielski <jim@apache.org>
Thu, 17 Oct 2013 15:24:44 +0000 (15:24 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 17 Oct 2013 15:24:44 +0000 (15:24 +0000)
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

modules/proxy/proxy_util.c

index 405c41e58ae6f44f787ce49768a0f9b5bdde6348..3ebe00142eca5d735e81cf2545506a03a19b886b 100644 (file)
@@ -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);