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

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

Issue 9302024: Add client for background testing of HTTP pipelining. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 11 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
« chrome/test/base/run_all_unittests.cc ('K') | « net/base/net_error_list.h ('k') | no next file » | 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 b116e2ee33d75e09cce00dce63a826e84cb9852c..4f841991ebe6447b42015759643924bea15ca5b3 100755
--- a/net/tools/testserver/testserver.py
+++ b/net/tools/testserver/testserver.py
@@ -298,6 +298,7 @@ class BasePageHandler(BaseHTTPServer.BaseHTTPRequestHandler):
self, request, client_address, socket_server)
def log_request(self, *args, **kwargs):
+ print '%s %s %s' % (self.path, args, kwargs)
mmenke 2012/02/01 19:08:07 You only added this for your own debugging, right?
James Simonsen 2012/02/07 00:01:37 Oops. Yeah.
# Disable request logging to declutter test log output.
pass
@@ -378,6 +379,7 @@ class TestPageHandler(BasePageHandler):
self.MultipartHandler,
self.MultipartSlowHandler,
self.GetSSLSessionCacheHandler,
+ self.CloseSocketHandler,
self.DefaultResponseHandler]
post_handlers = [
self.EchoTitleHandler,
@@ -926,6 +928,7 @@ class TestPageHandler(BasePageHandler):
sub_path = url_path[len(prefix):]
entries = sub_path.split('/')
file_path = os.path.join(self.server.data_dir, *entries)
+ print 'file_path %s' % file_path
mmenke 2012/02/01 19:08:07 This was just for your own debugging, right?
James Simonsen 2012/02/07 00:01:37 Done.
if os.path.isdir(file_path):
file_path = os.path.join(file_path, 'index.html')
@@ -1427,6 +1430,15 @@ class TestPageHandler(BasePageHandler):
' this request')
return True
+ def CloseSocketHandler(self):
+ """Closes the socket without sending anything."""
+
+ if not self._ShouldHandleRequest('/close-socket'):
+ return False
+
+ self.wfile.close()
+ return True
+
def DefaultResponseHandler(self):
"""This is the catch-all response handler for requests that aren't handled
by one of the special handlers above.
« chrome/test/base/run_all_unittests.cc ('K') | « net/base/net_error_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698