[2.7] closes bpo-8450: a better error message when http status line i… · python/cpython@ee78ba2 (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit ee78ba2

Shoham Pellermiss-islington

authored and

committed

File tree

1 file changed

lines changed

1 file changed

lines changed

Original file line number Diff line number Diff line change
@@ -399,7 +399,7 @@ def _read_status(self):
399 399 if not line:
400 400 # Presumably, the server closed the connection before
401 401 # sending a valid response.
402 -raise BadStatusLine(line)
402 +raise BadStatusLine("No status line received - the server has closed the connection")
403 403 try:
404 404 [version, status, reason] = line.split(None, 2)
405 405 except ValueError: