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

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

Issue 809663003: net: Add SetUploadStream method to URLFetcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | net/url_request/test_url_fetcher_factory.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 93de5cab3970c5ccfce3f9c588d34753125fe3fb..0592b4a151993640a3177a46a8889185cf682315 100755
--- a/net/tools/testserver/testserver.py
+++ b/net/tools/testserver/testserver.py
@@ -674,7 +674,12 @@ class TestPageHandler(testserver_base.BasePageHandler):
if not self._ShouldHandleRequest("/echo"):
return False
- self.send_response(200)
+ _, _, _, _, query, _ = urlparse.urlparse(self.path)
+ query_params = cgi.parse_qs(query, True)
+ if 'status' in query_params:
+ self.send_response(int(query_params['status'][0]))
+ else:
+ self.send_response(200)
self.send_header('Content-Type', 'text/html')
self.end_headers()
self.wfile.write(self.ReadRequestBody())
« no previous file with comments | « no previous file | net/url_request/test_url_fetcher_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698