[Python-checkins] cpython (3.2): httplib - minor update to check empty response

senthil.kumaran python-checkins at python.org
Sun Apr 29 04:40:44 CEST 2012


http://hg.python.org/cpython/rev/1a9d38966395
changeset: 76606:1a9d38966395
branch: 3.2
parent: 76604:afabb0635b15
user: Senthil Kumaran <senthil at uthcode.com>
date: Sun Apr 29 10:39:49 2012 +0800
summary:
 httplib - minor update to check empty response
files:
 Lib/http/client.py | 4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/http/client.py b/Lib/http/client.py
--- a/Lib/http/client.py
+++ b/Lib/http/client.py
@@ -563,7 +563,7 @@
 # a vanishingly small number of sites EOF without
 # sending the trailer
 break
- if line == b"\r\n":
+ if line in (b'\r\n', b'\n', b''):
 break
 
 # we read everything; close the "file"
@@ -718,7 +718,7 @@
 if not line:
 # for sites which EOF without sending a trailer
 break
- if line == b'\r\n':
+ if line in (b'\r\n', b'\n', b''):
 break
 
 def connect(self):
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /