forked from extern/httpie-cli
Expunge user:pass@... from Host header.
In verbose mode, the basic auth user and password would show up in colored output reporting the Host header, as reported in https://github.com/jkbr/httpie/issues/169
This commit is contained in:
parent
6af42b1827
commit
5a037b2e13
@ -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()]
|
||||
|
Loading…
Reference in New Issue
Block a user