summaryrefslogtreecommitdiffstats
path: root/Lib/BaseHTTPServer.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-07-24 20:34:08 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2001-07-24 20:34:08 (GMT)
commita43c2f845e59b833b17e45994cd81c631c071236 (patch)
tree76fcd97361c26474054557e554fc548770431acf /Lib/BaseHTTPServer.py
parentd61e3eab449102834406b9026852e1db51de16bb (diff)
downloadcpython-a43c2f845e59b833b17e45994cd81c631c071236.zip
cpython-a43c2f845e59b833b17e45994cd81c631c071236.tar.gz
cpython-a43c2f845e59b833b17e45994cd81c631c071236.tar.bz2
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 3e78d8b..ecb40d0 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()