3.2 - Fix for Issue13684 - httplib tunnel infinite loop · python/cpython@b12771a (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit b12771a
3.2 - Fix for Issue13684 - httplib tunnel infinite loop
File tree
1 file changed
lines changed
1 file changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -715,6 +715,9 @@ def _tunnel(self): | ||
715 | 715 | line = response.fp.readline(_MAXLINE + 1) |
716 | 716 | if len(line) > _MAXLINE: |
717 | 717 | raise LineTooLong("header line") |
718 | +if not line: | |
719 | +# for sites which EOF without sending a trailer | |
720 | +break | |
718 | 721 | if line == b'\r\n': |
719 | 722 | break |
720 | 723 |