Dirty implementation for #4571

This commit is contained in:
Miroslav Stampar
2021-02-21 22:49:57 +01:00
parent b902cca791
commit f87aa83e9b
3 changed files with 7 additions and 1 deletions

View File

@@ -488,6 +488,9 @@ class Connect(object):
header, value = line.split(':', 1)
headers[header] = value
if conf.localhost:
headers[HTTP_HEADER.HOST] = "localhost"
for key, value in list(headers.items()):
del headers[key]
if isinstance(value, six.string_types):