diff options
Diffstat (limited to 'Lib/BaseHTTPServer.py')
-rw-r--r-- | Lib/BaseHTTPServer.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/BaseHTTPServer.py b/Lib/BaseHTTPServer.py index fbb8108..8a099fe 100644 --- a/Lib/BaseHTTPServer.py +++ b/Lib/BaseHTTPServer.py @@ -75,7 +75,7 @@ import sys import time import socket # For gethostbyaddr() import mimetools -import SocketServer +import socketserver # Default error message template DEFAULT_ERROR_MESSAGE = """\ @@ -95,19 +95,19 @@ DEFAULT_ERROR_CONTENT_TYPE = "text/html;charset=utf-8" def _quote_html(html): return html.replace("&", "&").replace("<", "<").replace(">", ">") -class HTTPServer(SocketServer.TCPServer): +class HTTPServer(socketserver.TCPServer): allow_reuse_address = 1 # Seems to make sense in testing environment def server_bind(self): """Override server_bind to store the server name.""" - SocketServer.TCPServer.server_bind(self) + socketserver.TCPServer.server_bind(self) host, port = self.socket.getsockname()[:2] self.server_name = socket.getfqdn(host) self.server_port = port -class BaseHTTPRequestHandler(SocketServer.StreamRequestHandler): +class BaseHTTPRequestHandler(socketserver.StreamRequestHandler): """HTTP request handler base class. |