Skip to content

Commit 09f756e

Browse files
committed
requests: Unify BodyStream EOF error message.
Use one error string for Content-Length and chunked read paths to reduce __init__.mpy size without changing behaviour. Signed-off-by: Pablo Ventura <pablogventura@gmail.com>
1 parent 4dafe6c commit 09f756e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

python-ecosys/requests/requests/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def read(self, n=-1):
1616
data = self._sock.read(n)
1717
self._remaining -= len(data)
1818
if not data:
19-
raise ValueError("Connection closed before Content-Length satisfied")
19+
raise ValueError("Connection closed before body complete")
2020
return data
2121
buf = bytearray(n if n >= 0 else 256)
2222
result = b""

0 commit comments

Comments
 (0)