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

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

Issue 3353015: Implement gallery install API (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: erik comments Created 10 years, 3 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 | « chrome/test/data/extensions/api_test/extension_gallery_install/test.html ('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 099f351c8942829d256da55e891b7b21498510d0..4f30b2c37592e431da7e4f7d3338c6a42eda0697 100644
--- a/net/tools/testserver/testserver.py
+++ b/net/tools/testserver/testserver.py
@@ -151,6 +151,7 @@ class TestPageHandler(BaseHTTPServer.BaseHTTPRequestHandler):
self.EchoHandler] + self._get_handlers
self._mime_types = {
+ 'crx' : 'application/x-chrome-extension',
'gif': 'image/gif',
'jpeg' : 'image/jpeg',
'jpg' : 'image/jpeg',
@@ -180,7 +181,7 @@ class TestPageHandler(BaseHTTPServer.BaseHTTPRequestHandler):
"""Returns the mime type for the specified file_name. So far it only looks
at the file extension."""
- (shortname, extension) = os.path.splitext(file_name)
+ (shortname, extension) = os.path.splitext(file_name.split("?")[0])
if len(extension) == 0:
# no extension.
return self._default_mime_type
« no previous file with comments | « chrome/test/data/extensions/api_test/extension_gallery_install/test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698