summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-08-12 14:46:13 (GMT)
committerGuido van Rossum <guido@python.org>1997-08-12 14:46:13 (GMT)
commitefa683726f00f3ec0fff779f16d9ad22e4de442e (patch)
treef2d172ee3d9838adabe76bc161b7a750e7907e27
parent2567dd6d4487f665f67fa1b19458ab587b2eaace (diff)
downloadcpython-efa683726f00f3ec0fff779f16d9ad22e4de442e.zip
cpython-efa683726f00f3ec0fff779f16d9ad22e4de442e.tar.gz
cpython-efa683726f00f3ec0fff779f16d9ad22e4de442e.tar.bz2
Treat all HTTP/1.* versions the same.
-rw-r--r--Lib/BaseHTTPServer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/BaseHTTPServer.py b/Lib/BaseHTTPServer.py
index 281ddf6..7dadd71 100644
--- a/Lib/BaseHTTPServer.py
+++ b/Lib/BaseHTTPServer.py
@@ -236,7 +236,7 @@ class BaseHTTPRequestHandler(SocketServer.StreamRequestHandler):
words = string.split(requestline)
if len(words) == 3:
[command, path, version] = words
- if version != self.protocol_version:
+ if version[:5] != 'HTTP/':
self.send_error(400, "Bad request version (%s)" % `version`)
return
elif len(words) == 2:
@@ -297,7 +297,7 @@ class BaseHTTPRequestHandler(SocketServer.StreamRequestHandler):
self.log_request(code)
if message is None:
if self.responses.has_key(code):
- message = self.responses[code][1]
+ message = self.responses[code][0]
else:
message = ''
if self.request_version != 'HTTP/0.9':