diff --git a/python-ecosys/requests/requests/__init__.py b/python-ecosys/requests/requests/__init__.py index a9a183619..d9bc86530 100644 --- a/python-ecosys/requests/requests/__init__.py +++ b/python-ecosys/requests/requests/__init__.py @@ -180,6 +180,9 @@ def request( if redirect: s.close() + # use the Host in the redirect URL + if "Host" in headers: + headers.pop("Host") if status in [301, 302, 303]: return request("GET", redirect, None, None, headers, stream) else: