Skip to content

Commit

Permalink
httplib - minor update to check empty response
Browse files Browse the repository at this point in the history
  • Loading branch information
orsenthil committed Apr 29, 2012
1 parent 9c29f86 commit 7e70a5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/http/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ def _read_chunked(self, amt):
# a vanishingly small number of sites EOF without
# sending the trailer
break
if line == b"\r\n":
if line in (b'\r\n', b'\n', b''):
break

# we read everything; close the "file"
Expand Down Expand Up @@ -718,7 +718,7 @@ def _tunnel(self):
if not line:
# for sites which EOF without sending a trailer
break
if line == b'\r\n':
if line in (b'\r\n', b'\n', b''):
break

def connect(self):
Expand Down

0 comments on commit 7e70a5c

Please sign in to comment.