summaryrefslogtreecommitdiffstats
path: root/Lib/BaseHTTPServer.py
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2008-05-12 02:11:22 (GMT)
committerAlexandre Vassalotti <alexandre@peadrop.com>2008-05-12 02:11:22 (GMT)
commitd192c925ac0d8e7801462b71cd0be033ddb18103 (patch)
tree43eb5af5dc808d5d3c1892096ceed5fecdf3d60a /Lib/BaseHTTPServer.py
parentfb9ce65a91d674b1a80174c70a025aee83783388 (diff)
downloadcpython-d192c925ac0d8e7801462b71cd0be033ddb18103.zip
cpython-d192c925ac0d8e7801462b71cd0be033ddb18103.tar.gz
cpython-d192c925ac0d8e7801462b71cd0be033ddb18103.tar.bz2
Updated all import statements to use the new socketserver module name.
Renamed socketserver module in its own documentation. Renamed documentation references.
Diffstat (limited to 'Lib/BaseHTTPServer.py')
-rw-r--r--Lib/BaseHTTPServer.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/BaseHTTPServer.py b/Lib/BaseHTTPServer.py
index 97d800c..4f3d27a 100644
--- a/Lib/BaseHTTPServer.py
+++ b/Lib/BaseHTTPServer.py
@@ -74,7 +74,7 @@ import sys
import time
import socket # For gethostbyaddr()
import mimetools
-import SocketServer
+import socketserver
# Default error message template
DEFAULT_ERROR_MESSAGE = """\
@@ -94,19 +94,19 @@ DEFAULT_ERROR_CONTENT_TYPE = "text/html"
def _quote_html(html):
return html.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
-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.