[pve-devel] [PATCH] enclose ipv6 hosts in brackets in proxy_request()

Wolfgang Bumiller w.bumiller at proxmox.com
Thu May 21 16:13:40 CEST 2015


---
 PVE/HTTPServer.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/PVE/HTTPServer.pm b/PVE/HTTPServer.pm
index b991fe9..cd5f637 100755
--- a/PVE/HTTPServer.pm
+++ b/PVE/HTTPServer.pm
@@ -583,6 +583,8 @@ sub proxy_request {
 	    $target = "http://$host:85$uri";
 	    # keep alive for localhost is not worth (connection setup is about 0.2ms)
 	    $keep_alive = 0;
+	} elsif (Net::IP::ip_is_ipv6($host)) {
+	    $target = "https://[$host]:8006$uri";
 	} else {
 	    $target = "https://$host:8006$uri";
 	}
-- 
2.1.4




More information about the pve-devel mailing list