Fix compatibility issue with HTTPMessage class.

The server needs to use MessageClass to parse.
This commit is contained in:
Jeremy Hylton 2009-03-27 18:31:36 +00:00
parent 914ab45d0a
commit 98eb6c2838
2 changed files with 4 additions and 4 deletions

View file

@ -313,7 +313,8 @@ class BaseHTTPRequestHandler(socketserver.StreamRequestHandler):
self.command, self.path, self.request_version = command, path, version
# Examine the headers and look for a Connection directive.
self.headers = http.client.parse_headers(self.rfile)
self.headers = http.client.parse_headers(self.rfile,
_class=self.MessageClass)
conntype = self.headers.get('Connection', "")
if conntype.lower() == 'close':