diff --git a/splunklib/binding.py b/splunklib/binding.py index 327d4fed7..4d04745ea 100644 --- a/splunklib/binding.py +++ b/splunklib/binding.py @@ -1457,7 +1457,7 @@ def request(url, message, **kwargs): body = message.get("body", "") head = { "Content-Length": str(len(body)), - "Host": host, + "Host": f"{host}:{port}" "User-Agent": "splunk-sdk-python/%s" % __version__, "Accept": "*/*", "Connection": "Close",