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

Support multiple headers sharing the same name (#1190)

* Support multiple headers sharing the same name

* Apply suggestions

* Don't normalize HTTP header names

* apply visual suggestions

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>

* bump down multidict to 4.7.0

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
This commit is contained in:
Batuhan Taskaya
2021-10-31 15:04:39 +01:00
committed by GitHub
parent d40f06687f
commit 7cdd74fece
11 changed files with 221 additions and 13 deletions

View File

@@ -96,7 +96,7 @@ class HTTPRequest(HTTPMessage):
query=f'?{url.query}' if url.query else ''
)
headers = dict(self._orig.headers)
headers = self._orig.headers.copy()
if 'Host' not in self._orig.headers:
headers['Host'] = url.netloc.split('@')[-1]