You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2015/01/07 17:31:21 UTC

svn commit: r1650108 - /myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/MimeTypeUtils.java

Author: lofwyr
Date: Wed Jan  7 16:31:20 2015
New Revision: 1650108

URL: http://svn.apache.org/r1650108
Log:
TOBAGO-1368: Create a new theme which uses Bootstrap
 - Mime Type support for svg and ttf

Modified:
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/MimeTypeUtils.java

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/MimeTypeUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/MimeTypeUtils.java?rev=1650108&r1=1650107&r2=1650108&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/MimeTypeUtils.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/MimeTypeUtils.java Wed Jan  7 16:31:20 2015
@@ -36,6 +36,9 @@ public final class MimeTypeUtils {
         if (file.regionMatches(length - 3, "jpg", 0, 2)) {
           return "image/jpeg";
         }
+        if (file.endsWith("svg")) {
+          return "image/svg+xml";
+        }
       } else {
         if (file.endsWith("css")) {
           return "text/css";
@@ -52,6 +55,9 @@ public final class MimeTypeUtils {
         if (file.endsWith("map")) {
           return "application/json";
         }
+        if (file.endsWith("ttf")) {
+          return "application/x-font-ttf";
+        }
       }
     } else if (file.charAt(length - 3) == '.') {
       if (file.endsWith("js")) {