From 95ee5a21cac9d66547a9d39157396de192538561 Mon Sep 17 00:00:00 2001 From: Ivan Devat Date: Mon, 4 Nov 2019 15:30:35 +0100 Subject: [PATCH 3/4] fix communication over IPv6 --- pcs/utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pcs/utils.py b/pcs/utils.py index e274cfe5..11e3b361 100644 --- a/pcs/utils.py +++ b/pcs/utils.py @@ -474,8 +474,10 @@ def sendHTTPRequest( if port is None: port = settings.pcsd_default_port url = "https://{host}:{port}/{request}".format( - host=host, request=request, port=port - ) + host="[{0}]".format(host) if ":" in host else host, + request=request, + port=port + ) if "--debug" in pcs_options: print("Sending HTTP Request to: " + url) print("Data: {0}".format(data)) -- 2.21.0