Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3a31cca4
Commit
3a31cca4
authored
Apr 29, 2016
by
Berker Peksag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #24902: Print server URL on http.server startup
Initial patch by Felix Kaiser.
parent
955bc38b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
Lib/http/server.py
Lib/http/server.py
+2
-1
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/http/server.py
View file @
3a31cca4
...
@@ -1177,7 +1177,8 @@ def test(HandlerClass=BaseHTTPRequestHandler,
...
@@ -1177,7 +1177,8 @@ def test(HandlerClass=BaseHTTPRequestHandler,
HandlerClass
.
protocol_version
=
protocol
HandlerClass
.
protocol_version
=
protocol
with
ServerClass
(
server_address
,
HandlerClass
)
as
httpd
:
with
ServerClass
(
server_address
,
HandlerClass
)
as
httpd
:
sa
=
httpd
.
socket
.
getsockname
()
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
:
try
:
httpd
.
serve_forever
()
httpd
.
serve_forever
()
except
KeyboardInterrupt
:
except
KeyboardInterrupt
:
...
...
Misc/NEWS
View file @
3a31cca4
...
@@ -256,6 +256,9 @@ Core and Builtins
...
@@ -256,6 +256,9 @@ Core and Builtins
Library
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
-
Issue
#
25788
:
fileinput
.
hook_encoded
()
now
supports
an
"errors"
argument
for
passing
to
open
.
Original
patch
by
Joseph
Hackman
.
for
passing
to
open
.
Original
patch
by
Joseph
Hackman
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment