Skip to content

Commit b12771a

Browse files
committed
3.2 - Fix for Issue13684 - httplib tunnel infinite loop
1 parent 2cc52ef commit b12771a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/http/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,9 @@ def _tunnel(self):
715715
line = response.fp.readline(_MAXLINE + 1)
716716
if len(line) > _MAXLINE:
717717
raise LineTooLong("header line")
718+
if not line:
719+
# for sites which EOF without sending a trailer
720+
break
718721
if line == b'\r\n':
719722
break
720723

0 commit comments

Comments
 (0)