From b126912a4f77555f3976697f6cc16ad1eea300e7 Mon Sep 17 00:00:00 2001 From: Mateusz Poliwczak Date: Thu, 11 Sep 2025 11:30:15 +0200 Subject: [PATCH] Don't specify Host header explicitly Just let the http lib handle that for us, we shouldn't be doing that here at all. Currently we are not handling punycode (if used) and ports, this way we don't have to care about this and just let the lib do the best thing. --- splunklib/binding.py | 1 - 1 file changed, 1 deletion(-) diff --git a/splunklib/binding.py b/splunklib/binding.py index 80aeafab7..1d0b9722f 100644 --- a/splunklib/binding.py +++ b/splunklib/binding.py @@ -1559,7 +1559,6 @@ def request(url, message, **kwargs): body = message.get("body", "") head = { "Content-Length": str(len(body)), - "Host": host, "User-Agent": "splunk-sdk-python/%s" % __version__, "Accept": "*/*", "Connection": "Close",