You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2014/01/22 20:38:50 UTC

[39/50] [abbrv] git commit: Fix incorrect MIME type for .js files loaded through CordovaResourceAPI.

Fix incorrect MIME type for .js files loaded through CordovaResourceAPI.

This fixes devtools complaining about .js files being served as "text/plain"
when they have gone through remapUrl().


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/629ac532
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/629ac532
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/629ac532

Branch: refs/heads/master
Commit: 629ac53217514289034cbec2009b8bb5f3936b47
Parents: dbd01fa
Author: Andrew Grieve <ag...@chromium.org>
Authored: Mon Dec 23 15:04:54 2013 -0500
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:22 2014 -0800

----------------------------------------------------------------------
 framework/src/org/apache/cordova/CordovaResourceApi.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/629ac532/framework/src/org/apache/cordova/CordovaResourceApi.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaResourceApi.java b/framework/src/org/apache/cordova/CordovaResourceApi.java
index 96f3d25..ea2a90d 100644
--- a/framework/src/org/apache/cordova/CordovaResourceApi.java
+++ b/framework/src/org/apache/cordova/CordovaResourceApi.java
@@ -188,6 +188,9 @@ public class CordovaResourceApi {
         extension = extension.toLowerCase(Locale.getDefault());
         if (extension.equals("3ga")) {
             return "audio/3gpp";
+        } else if (extension.equals("js")) {
+            // Missing from the map :(.
+            return "text/javascript";
         }
         return MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
     }