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

Unified Diff: test_http_server.py

Issue 4667002: AU: Change test http server port from 8080 to 8088. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git@master
Patch Set: whitespace Created 10 years, 1 month 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 | « test_http_server.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test_http_server.py
diff --git a/test_http_server.py b/test_http_server.py
deleted file mode 100755
index 404e0e0634c206e23aca05306da23c278facb7c1..0000000000000000000000000000000000000000
--- a/test_http_server.py
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# This is a simple HTTP server that's used by the
-# libcurl_http_fetcher_unittest, though it could be used by others. In
-# general, you can fork off this server, repeatedly request /test or
-# some URL until that URL succeeds; then you know the server is
-# running. The url /big returns 100,000 bytes of predictable data. The
-# url /quitquitquit causes the server to exit.
-
-import SimpleHTTPServer, BaseHTTPServer, httplib
-
-class TestHttpRequestHandler (SimpleHTTPServer.SimpleHTTPRequestHandler):
- def do_GET(self):
- # Exit the server
- if self.path == '/quitquitquit':
- self.server.stop = True
-
- # Write 100,000 bytes out
- if self.path == '/big':
- self.send_response(200, 'OK')
- self.send_header('Content-type', 'text/html')
- self.end_headers()
- for i in range(0, 10000):
- try:
- self.wfile.write('abcdefghij'); # 10 characters
- except IOError:
- return
- return
-
- # Everything else
- self.send_response(200, 'OK')
- self.send_header('Content-type', 'text/html')
- self.end_headers()
- self.wfile.write('unhandled path')
-
-class TestHttpServer (BaseHTTPServer.HTTPServer):
- def serve_forever(self):
- self.stop = False
- while not self.stop:
- self.handle_request()
-
-def main():
- # TODO(adlr): Choose a port that works with build bots and report it to
- # caller.
- # WARNING, if you update this, you must also update http_fetcher_unittest.cc
- port = 8080
- server = TestHttpServer(('', 8080), TestHttpRequestHandler)
- server.serve_forever()
-
-if __name__ == '__main__':
- main()
« no previous file with comments | « test_http_server.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698