We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
headers_raw_to_dict
1 parent 0db3f3f commit 789e5deCopy full SHA for 789e5de
w3lib/http.py
@@ -49,10 +49,9 @@ def headers_raw_to_dict(headers_raw: bytes | None) -> HeadersDictOutput | None:
49
if not headers_raw:
50
return {}
51
52
- headers = iter(BytesIO(headers_raw).readline, b"")
53
result_dict: HeadersDictOutput = {}
54
55
- for header in headers:
+ for header in BytesIO(headers_raw):
56
key, sep, value = header.partition(b":")
57
if not sep:
58
continue
0 commit comments