urequests: Fix raising unsupported Transfer-Encoding exception.

Would lead to recursive TypeError because of str + bytes.
pull/502/head
Andrew Leech 2020-03-07 16:16:39 +02:00 zatwierdzone przez Damien George
rodzic d978e246d5
commit 106c28a4d7
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -99,7 +99,7 @@ def request(method, url, data=None, json=None, headers={}, stream=None, parse_he
# print(l)
if l.startswith(b"Transfer-Encoding:"):
if b"chunked" in l:
raise ValueError("Unsupported " + l)
raise ValueError("Unsupported " + str(l, "utf-8"))
elif l.startswith(b"Location:") and not 200 <= status <= 299:
raise NotImplementedError("Redirects not yet supported")
if parse_headers is False: