summaryrefslogtreecommitdiffstats
path: root/Lib/BaseHTTPServer.py
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2008-05-12 02:31:37 (GMT)
committerAlexandre Vassalotti <alexandre@peadrop.com>2008-05-12 02:31:37 (GMT)
commitce261952e640b2d09ada1b160f0cfa37db32f928 (patch)
tree17b1c2129377435cbaf0169f702b78a61407b90f /Lib/BaseHTTPServer.py
parent6f1e619b414a93084efbb7244034a3546899fa4b (diff)
downloadcpython-ce261952e640b2d09ada1b160f0cfa37db32f928.zip
cpython-ce261952e640b2d09ada1b160f0cfa37db32f928.tar.gz
cpython-ce261952e640b2d09ada1b160f0cfa37db32f928.tar.bz2
Renamed the SocketServer module to 'socketserver'.
Merged revisions 63132 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r63132 | alexandre.vassalotti | 2008-05-11 22:11:22 -0400 (Sun, 11 May 2008) | 4 lines 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 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("&", "&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.