Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8107)

Unified Diff: chrome/browser/prerender/tools/prerender_test_server/prerender_test_server.py

Issue 2257523002: prerender_test_server.py: bind to loopback interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/tools/prerender_test_server/prerender_test_server.py
diff --git a/chrome/browser/prerender/tools/prerender_test_server/prerender_test_server.py b/chrome/browser/prerender/tools/prerender_test_server/prerender_test_server.py
index 4874b8f3267da8a61ca258482b6aa02a06fbc9d6..91aada76557800febb65deb24c7616100285b3f8 100755
--- a/chrome/browser/prerender/tools/prerender_test_server/prerender_test_server.py
+++ b/chrome/browser/prerender/tools/prerender_test_server/prerender_test_server.py
@@ -54,10 +54,11 @@ def main(argv):
parser.add_argument('-p', '--port', type=int, default=8080,
help='port to run on (default = %(default)s)')
args = parser.parse_args(argv)
+ server_name = 'localhost'
- s = BaseHTTPServer.HTTPServer(('', args.port), Handler)
+ s = BaseHTTPServer.HTTPServer((server_name, args.port), Handler)
try:
- print("Listening on http://localhost:%d/" % args.port)
+ print('Listening on http://{}:{}/'.format(server_name, args.port))
s.serve_forever()
return 0
except KeyboardInterrupt:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698