Skip to content

Commit 106c28a

Browse files
andrewleechdpgeorge
authored andcommitted
urequests: Fix raising unsupported Transfer-Encoding exception.
Would lead to recursive TypeError because of str + bytes.
1 parent d978e24 commit 106c28a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python-ecosys/urequests/urequests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def request(method, url, data=None, json=None, headers={}, stream=None, parse_he
9999
# print(l)
100100
if l.startswith(b"Transfer-Encoding:"):
101101
if b"chunked" in l:
102-
raise ValueError("Unsupported " + l)
102+
raise ValueError("Unsupported " + str(l, "utf-8"))
103103
elif l.startswith(b"Location:") and not 200 <= status <= 299:
104104
raise NotImplementedError("Redirects not yet supported")
105105
if parse_headers is False:

0 commit comments

Comments
 (0)