Commit 3a31cca4 authored by Berker Peksag's avatar Berker Peksag

Issue #24902: Print server URL on http.server startup

Initial patch by Felix Kaiser.
parent 955bc38b
......@@ -1177,7 +1177,8 @@ def test(HandlerClass=BaseHTTPRequestHandler,
HandlerClass.protocol_version = protocol
with ServerClass(server_address, HandlerClass) as httpd:
sa = httpd.socket.getsockname()
print("Serving HTTP on", sa[0], "port", sa[1], "...")
serve_message = "Serving HTTP on {host} port {port} (http://{host}:{port}/) ..."
print(serve_message.format(host=sa[0], port=sa[1]))
try:
httpd.serve_forever()
except KeyboardInterrupt:
......
......@@ -256,6 +256,9 @@ Core and Builtins
Library
-------
- Issue #24902: Print server URL on http.server startup. Initial patch by
Felix Kaiser.
- Issue #25788: fileinput.hook_encoded() now supports an "errors" argument
for passing to open. Original patch by Joseph Hackman.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment