| OLD | NEW |
| 1 #!/usr/bin/python2.4 | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """This is a simple HTTP server for manually testing exponential | 6 """This is a simple HTTP server for manually testing exponential |
| 7 back-off functionality in Chrome. | 7 back-off functionality in Chrome. |
| 8 """ | 8 """ |
| 9 | 9 |
| 10 | 10 |
| 11 import BaseHTTPServer | 11 import BaseHTTPServer |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 port = int(sys.argv[2]) | 105 port = int(sys.argv[2]) |
| 106 RequestHandler.port = port | 106 RequestHandler.port = port |
| 107 print "To stop the server, go to http://localhost:%d/quitquitquit" % port | 107 print "To stop the server, go to http://localhost:%d/quitquitquit" % port |
| 108 httpd = BaseHTTPServer.HTTPServer(('', port), RequestHandler) | 108 httpd = BaseHTTPServer.HTTPServer(('', port), RequestHandler) |
| 109 while RequestHandler.keep_running: | 109 while RequestHandler.keep_running: |
| 110 httpd.handle_request() | 110 httpd.handle_request() |
| 111 | 111 |
| 112 | 112 |
| 113 if __name__ == '__main__': | 113 if __name__ == '__main__': |
| 114 main() | 114 main() |
| OLD | NEW |