Skip to content

Commit

Permalink
3.2 - Fix for Issue13684 - httplib tunnel infinite loop
Browse files Browse the repository at this point in the history
  • Loading branch information
orsenthil committed Apr 23, 2012
1 parent 2cc52ef commit b12771a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Lib/http/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,9 @@ def _tunnel(self):
line = response.fp.readline(_MAXLINE + 1)
if len(line) > _MAXLINE:
raise LineTooLong("header line")
if not line:
# for sites which EOF without sending a trailer
break
if line == b'\r\n':
break

Expand Down

0 comments on commit b12771a

Please sign in to comment.