[Python-checkins] cpython (merge 3.2 -> default): 3.2 - Fix for Issue13684 - httplib tunnel infinite loop
senthil.kumaran
python-checkins at python.org
Mon Apr 23 17:57:08 CEST 2012
http://hg.python.org/cpython/rev/1acb252a3858
changeset: 76494:1acb252a3858
parent: 76488:9a84cab7ff9d
parent: 76491:7787a9aebdc6
user: Senthil Kumaran <senthil at uthcode.com>
date: Mon Apr 23 23:53:51 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
@@ -786,6 +786,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