From 106c28a4d7f2358ae0e8c3272739aa504822aab7 Mon Sep 17 00:00:00 2001 From: Andrew Leech Date: Sat, 7 Mar 2020 16:16:39 +0200 Subject: [PATCH] urequests: Fix raising unsupported Transfer-Encoding exception. Would lead to recursive TypeError because of str + bytes. --- python-ecosys/urequests/urequests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-ecosys/urequests/urequests.py b/python-ecosys/urequests/urequests.py index 4aa2935c..11de10bb 100644 --- a/python-ecosys/urequests/urequests.py +++ b/python-ecosys/urequests/urequests.py @@ -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: