diff options
author | shadi@chromium.org <shadi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-05 21:46:16 +0000 |
---|---|---|
committer | shadi@chromium.org <shadi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-05 21:46:16 +0000 |
commit | a5f99d12e5af6d1b4a60a9bf22b3bf3a1fa1ca24 (patch) | |
tree | 12b409ed14d3a7d681af7af28d972b6918ab2eb6 /media | |
parent | 58f7f962f3922507403dff181bfe55f3283d440b (diff) | |
download | chromium_src-a5f99d12e5af6d1b4a60a9bf22b3bf3a1fa1ca24.zip chromium_src-a5f99d12e5af6d1b4a60a9bf22b3bf3a1fa1ca24.tar.gz chromium_src-a5f99d12e5af6d1b4a60a9bf22b3bf3a1fa1ca24.tar.bz2 |
Fix mime-type for webm files served on CNS.
When using CNS to server files without using <video> tag, webm files are served
as text files.
This CL adds type 'video/webm' to webm file types when served.
BUG=
TEST=manual tests.
Review URL: http://codereview.chromium.org/9108016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116564 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rwxr-xr-x | media/tools/constrained_network_server/cns.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/media/tools/constrained_network_server/cns.py b/media/tools/constrained_network_server/cns.py index 70e68163..835ecdb 100755 --- a/media/tools/constrained_network_server/cns.py +++ b/media/tools/constrained_network_server/cns.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -12,6 +12,7 @@ TODO(dalecurtis): Add some more docs here. """ +import mimetypes import optparse import os import signal @@ -27,6 +28,8 @@ except ImportError: 'and try again. On Linux: sudo apt-get install python-cherrypy3\n') sys.exit(1) +# Add webm file types to mimetypes map since cherrypy's default type is text. +mimetypes.types_map['.webm'] = 'video/webm' # Default port to serve the CNS on. _DEFAULT_SERVING_PORT = 9000 |