1
0
mirror of https://github.com/httpie/cli.git synced 2025-08-10 22:42:05 +02:00

Fixed custom Host

Closes #235
This commit is contained in:
Jakub Roztocil
2014-06-28 13:24:14 +02:00
parent 8c892edd4f
commit 040d981f00
2 changed files with 18 additions and 2 deletions

View File

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