Commit 111d3cc0 authored by Guido van Rossum's avatar Guido van Rossum

Patch by Tim O'Malley for servers that send a response looking just like

    HTTP/1.x 200
instead of
    HTTP/1.x 200 OK
parent 4a4f3b96
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment