Skip to content

Commit 553558e

Browse files
committed
http.py: Handle unsupported case
1 parent a98392f commit 553558e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

python/http.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ def _get_headers_and_body(sock, host, port, path):
7777
encoding = headers["transfer-encoding"]
7878
if encoding == "chunked":
7979
body = unchunked(response)
80+
else:
81+
raise RuntimeError(f"Unsupported transfer-encoding: {encoding}")
8082
else:
8183
body = response.read()
8284

0 commit comments

Comments
 (0)