kopia lustrzana https://github.com/micropython/micropython-lib
urequests: Fix raising unsupported Transfer-Encoding exception.
Would lead to recursive TypeError because of str + bytes.pull/502/head
rodzic
d978e246d5
commit
106c28a4d7
|
@ -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:
|
||||
|
|
Ładowanie…
Reference in New Issue