You've already forked httpie-cli
mirror of
https://github.com/httpie/cli.git
synced 2025-08-10 22:42:05 +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:
@@ -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()]
|
||||
|
Reference in New Issue
Block a user