Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added new MIME types #61

Merged
merged 2 commits into from

2 participants

@kardan

Added MIME types for eot, m4v, svg, svgz, ttc, ttf, vcf, webm, webp, woff & otf files. Started with webfonts but added some more types when at it. I used Paul Irish's Html5boilerplate as reference for the webfonts https://github.com/paulirish/html5-boilerplate/blob/master/.htaccess#L92.

@etrepum etrepum merged commit 57f6d12 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 22 additions and 0 deletions.
  1. +22 −0 src/mochiweb_mime.erl
View
22 src/mochiweb_mime.erl
@@ -368,6 +368,28 @@ from_extension(".m4a") ->
"audio/mpeg";
from_extension(".csv") ->
"text/csv";
+from_extension(".eot") ->
+ "application/vnd.ms-fontobject";
+from_extension(".m4v") ->
+ "video/mp4";
+from_extension(".svg") ->
+ "image/svg+xml";
+from_extension(".svgz") ->
+ "image/svg+xml";
+from_extension(".ttc") ->
+ "application/x-font-ttf";
+from_extension(".ttf") ->
+ "application/x-font-ttf";
+from_extension(".vcf") ->
+ "text/x-vcard";
+from_extension(".webm") ->
+ "video/web";
+from_extension(".webp") ->
+ "image/web";
+from_extension(".woff") ->
+ "application/x-font-woff";
+from_extension(".otf") ->
+ "font/opentype";
from_extension(_) ->
undefined.
Something went wrong with that request. Please try again.