diff options
author | Guido van Rossum <guido@python.org> | 1997-08-12 14:46:13 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-08-12 14:46:13 (GMT) |
commit | efa683726f00f3ec0fff779f16d9ad22e4de442e (patch) | |
tree | f2d172ee3d9838adabe76bc161b7a750e7907e27 /Lib/BaseHTTPServer.py | |
parent | 2567dd6d4487f665f67fa1b19458ab587b2eaace (diff) | |
download | cpython-efa683726f00f3ec0fff779f16d9ad22e4de442e.zip cpython-efa683726f00f3ec0fff779f16d9ad22e4de442e.tar.gz cpython-efa683726f00f3ec0fff779f16d9ad22e4de442e.tar.bz2 |
Treat all HTTP/1.* versions the same.
Diffstat (limited to 'Lib/BaseHTTPServer.py')
-rw-r--r-- | Lib/BaseHTTPServer.py | 4 |
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': |