From 0b2e5a10146b6acbb97c19378ee19a09af4be3c1 Mon Sep 17 00:00:00 2001 From: pch3 Date: Fri, 22 Sep 2023 22:19:10 +0200 Subject: [PATCH] Update binding.py Updated Host HTTP header value --- splunklib/binding.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/splunklib/binding.py b/splunklib/binding.py index 327d4fed..a4458c66 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": "%s:%d" % (host, port), "User-Agent": "splunk-sdk-python/%s" % __version__, "Accept": "*/*", "Connection": "Close",