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

Unified Diff: mojo/devtools/common/devtoolslib/http_server.py

Issue 1157993010: Add --sky support in mojo_shell.py. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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 | mojo/tools/mojo_shell.py » ('j') | mojo/tools/mojo_shell.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/devtools/common/devtoolslib/http_server.py
diff --git a/mojo/devtools/common/devtoolslib/http_server.py b/mojo/devtools/common/devtoolslib/http_server.py
index 6db07173a1db1215d3cc214faf3915fbff77ce03..0038392536f4f73d85f90e8c4e97d463781adbeb 100644
--- a/mojo/devtools/common/devtoolslib/http_server.py
+++ b/mojo/devtools/common/devtoolslib/http_server.py
@@ -140,6 +140,13 @@ def _GetHandlerClassForPath(mappings):
# prefix at the end of |mappings|.
assert False
+ def guess_type(self, path):
+ if path.endswith('.dart'):
+ return 'application/dart'
+ elif path.endswith('.sky'):
+ return 'text/sky'
+ return SimpleHTTPServer.SimpleHTTPRequestHandler.guess_type(self, path)
+
def log_message(self, *_):
"""Override the base class method to disable logging."""
pass
« no previous file with comments | « no previous file | mojo/tools/mojo_shell.py » ('j') | mojo/tools/mojo_shell.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698