summaryrefslogtreecommitdiff
path: root/Lib/BaseHTTPServer.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-07-24 20:34:08 +0000
committerMartin v. Löwis <martin@v.loewis.de>2001-07-24 20:34:08 +0000
commitb6da0006ca816d503f6b791daed9d2f96891da8f (patch)
tree6cda5178935f8fffe319aec90147c20d0834d31f /Lib/BaseHTTPServer.py
parent1d86081cd47b20f4a35224a9b494e06a65a25f25 (diff)
downloadcpython-b6da0006ca816d503f6b791daed9d2f96891da8f.tar.gz
Patch #401196: Use getaddrinfo and AF_INET6 in TCP servers and clients.
Diffstat (limited to 'Lib/BaseHTTPServer.py')
-rw-r--r--Lib/BaseHTTPServer.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/BaseHTTPServer.py b/Lib/BaseHTTPServer.py
index 3e78d8b929..ecb40d0d5b 100644
--- a/Lib/BaseHTTPServer.py
+++ b/Lib/BaseHTTPServer.py
@@ -68,8 +68,10 @@ __all__ = ["HTTPServer", "BaseHTTPRequestHandler"]
import sys
import time
import socket # For gethostbyaddr()
+import string
import mimetools
import SocketServer
+import re
# Default error message
DEFAULT_ERROR_MESSAGE = """\
@@ -474,7 +476,8 @@ def test(HandlerClass = BaseHTTPRequestHandler,
httpd = ServerClass(server_address, HandlerClass)
- print "Serving HTTP on port", port, "..."
+ sa = httpd.socket.getsockname()
+ print "Serving HTTP on", sa[0], "port", sa[1], "..."
httpd.serve_forever()