diff options
| author | Martin v. Löwis <martin@v.loewis.de> | 2001-07-24 20:34:08 +0000 |
|---|---|---|
| committer | Martin v. Löwis <martin@v.loewis.de> | 2001-07-24 20:34:08 +0000 |
| commit | b6da0006ca816d503f6b791daed9d2f96891da8f (patch) | |
| tree | 6cda5178935f8fffe319aec90147c20d0834d31f /Lib/BaseHTTPServer.py | |
| parent | 1d86081cd47b20f4a35224a9b494e06a65a25f25 (diff) | |
| download | cpython-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.py | 5 |
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() |
