Skip to content

Commit 64feed0

Browse files
authored
Fix type of aiohttp raw headers (#161)
1 parent 5ead2a8 commit 64feed0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pook/interceptors/aiohttp.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ async def _on_request(
139139
_res.reason = http_reasons.get(res._status)
140140

141141
# Add response headers
142-
_res._raw_headers = tuple(headers)
142+
_res._raw_headers = tuple(
143+
[(bytes(k, "utf-8"), bytes(v, "utf-8")) for k, v in headers]
144+
)
143145
_res._headers = multidict.CIMultiDictProxy(multidict.CIMultiDict(headers))
144146

145147
if res._body:

0 commit comments

Comments
 (0)