[Python-checkins] cpython (3.2): 3.2 - Fix for Issue13684 - httplib tunnel infinite loop
senthil.kumaran
python-checkins at python.org
Mon Apr 23 17:57:06 CEST 2012
http://hg.python.org/cpython/rev/7787a9aebdc6
changeset: 76491:7787a9aebdc6
branch: 3.2
parent: 76486:505828be1711
user: Senthil Kumaran <senthil at uthcode.com>
date: Mon Apr 23 23:50:07 2012 +0800
summary:
3.2 - Fix for Issue13684 - httplib tunnel infinite loop
files:
Lib/http/client.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Lib/http/client.py b/Lib/http/client.py
--- a/Lib/http/client.py
+++ b/Lib/http/client.py
@@ -715,6 +715,9 @@
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
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list