diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2001-07-24 20:34:08 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2001-07-24 20:34:08 (GMT) |
commit | a43c2f845e59b833b17e45994cd81c631c071236 (patch) | |
tree | 76fcd97361c26474054557e554fc548770431acf /Lib/BaseHTTPServer.py | |
parent | d61e3eab449102834406b9026852e1db51de16bb (diff) | |
download | cpython-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.py | 5 |
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() |