projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eda1959
)
Fix for Issue13684 - httplib tunnel infinite loop
author
Senthil Kumaran
<senthil@uthcode.com>
Mon, 23 Apr 2012 15:46:46 +0000
(23:46 +0800)
committer
Senthil Kumaran
<senthil@uthcode.com>
Mon, 23 Apr 2012 15:46:46 +0000
(23:46 +0800)
Lib/httplib.py
patch
|
blob
|
history
diff --git
a/Lib/httplib.py
b/Lib/httplib.py
index 13629c4a965a27679e88467848450fda9fe91279..5d16e53c4c393b7c61c0438537af64dafe78dc2b 100644
(file)
--- a/
Lib/httplib.py
+++ b/
Lib/httplib.py
@@
-748,7
+748,11
@@
class HTTPConnection:
line = response.fp.readline(_MAXLINE + 1)
if len(line) > _MAXLINE:
raise LineTooLong("header line")
- if line == '\r\n': break
+ if not line:
+ # for sites which EOF without sending trailer
+ break
+ if line == '\r\n':
+ break
def connect(self):