Merge pull request #191 from solidsnack/wip-no-auth-in-host-header

Expunge user:pass@... from Host header.
This commit is contained in:
Jakub Roztočil 2014-01-08 02:28:19 -08:00
commit b1074ccb4f

View File

@ -155,7 +155,7 @@ class HTTPRequest(HTTPMessage):
headers = dict(self._orig.headers)
if 'Host' not in headers:
headers['Host'] = url.netloc
headers['Host'] = url.netloc.split('@')[-1]
headers = ['%s: %s' % (name, value)
for name, value in headers.items()]