summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/httplib.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py
index 7081bd1..05289b3 100644
--- a/Lib/httplib.py
+++ b/Lib/httplib.py
@@ -123,8 +123,12 @@ class HTTP:
try:
[ver, code, msg] = string.split(line, None, 2)
except ValueError:
- self.headers = None
- return -1, line, self.headers
+ try:
+ [ver, code] = string.split(line, None, 1)
+ msg = ""
+ except ValueError:
+ self.headers = None
+ return -1, line, self.headers
if ver[:5] != 'HTTP/':
self.headers = None
return -1, line, self.headers