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

Unified Diff: net/tools/testserver/testserver.py

Issue 2881028: GTTF: test server cleanup: (Closed)
Patch Set: final Created 10 years, 5 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 | « net/tools/testserver/run_testserver.cc ('k') | net/url_request/url_request_unittest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/testserver/testserver.py
diff --git a/net/tools/testserver/testserver.py b/net/tools/testserver/testserver.py
index 8e3df5ea4a345996c1e86ca6b92af6ca9ad2389d..999cde729332b5a6397f06df9e118203e2851860 100644
--- a/net/tools/testserver/testserver.py
+++ b/net/tools/testserver/testserver.py
@@ -82,16 +82,6 @@ class HTTPSServer(tlslite.api.TLSSocketServerMixIn, StoppableHTTPServer):
print "Handshake failure:", str(error)
return False
-class ForkingHTTPServer(SocketServer.ForkingMixIn, StoppableHTTPServer):
- """This is a specialization of of StoppableHTTPServer which serves each
- request in a separate process"""
- pass
-
-class ForkingHTTPSServer(SocketServer.ForkingMixIn, HTTPSServer):
- """This is a specialization of of HTTPSServer which serves each
- request in a separate process"""
- pass
-
class TestPageHandler(BaseHTTPServer.BaseHTTPRequestHandler):
def __init__(self, request, client_address, socket_server):
@@ -1200,18 +1190,10 @@ def main(options, args):
if not os.path.isfile(options.cert):
print 'specified cert file not found: ' + options.cert + ' exiting...'
return
- if options.forking:
- server_class = ForkingHTTPSServer
- else:
- server_class = HTTPSServer
- server = server_class(('127.0.0.1', port), TestPageHandler, options.cert)
+ server = HTTPSServer(('127.0.0.1', port), TestPageHandler, options.cert)
print 'HTTPS server started on port %d...' % port
else:
- if options.forking:
- server_class = ForkingHTTPServer
- else:
- server_class = StoppableHTTPServer
- server = server_class(('127.0.0.1', port), TestPageHandler)
+ server = StoppableHTTPServer(('127.0.0.1', port), TestPageHandler)
print 'HTTP server started on port %d...' % port
server.data_dir = MakeDataDir()
@@ -1263,9 +1245,6 @@ if __name__ == '__main__':
const=SERVER_FTP, default=SERVER_HTTP,
dest='server_type',
help='FTP or HTTP server: default is HTTP.')
- option_parser.add_option('--forking', action='store_true', default=False,
- dest='forking',
- help='Serve each request in a separate process.')
option_parser.add_option('', '--port', default='8888', type='int',
help='Port used by the server.')
option_parser.add_option('', '--data-dir', dest='data_dir',
« no previous file with comments | « net/tools/testserver/run_testserver.cc ('k') | net/url_request/url_request_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698