mirror of
https://github.com/httpie/cli.git
synced 2025-06-20 09:37:45 +02:00
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)
|
headers = dict(self._orig.headers)
|
||||||
|
|
||||||
if 'Host' not in headers:
|
if 'Host' not in headers:
|
||||||
headers['Host'] = url.netloc
|
headers['Host'] = url.netloc.split('@')[-1]
|
||||||
|
|
||||||
headers = ['%s: %s' % (name, value)
|
headers = ['%s: %s' % (name, value)
|
||||||
for name, value in headers.items()]
|
for name, value in headers.items()]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user