Skip to content
This repository

Serve *.woff as application/x-font-woff #435

Closed
wants to merge 1 commit into from

2 participants

Johan Sundström Gioele
Johan Sundström

Since Chrome / WebKit wails about woff fonts served with content-type
application/octet-stream, use a more accurate legal MIME type instead:

http://code.google.com/p/chromium/issues/detail?id=70283#c6
http://stackoverflow.com/questions/10149659/resource-interpreted-as-font-but-transferred-with-mime-type-application-octet-st

Johan Sundström Update lib/rack/mime.rb
Since Chrome / WebKit wails about woff fonts served with content-type
application/octet-stream, use a more accurate legal MIME type instead:

http://code.google.com/p/chromium/issues/detail?id=70283#c6
http://stackoverflow.com/questions/10149659/resource-interpreted-as-font-but-transferred-with-mime-type-application-octet-st
802e967
Gioele

This pull request is a dupe of pull request #405. Have a look at all the comments on that issue.

Johan Sundström

Thanks; closing dup.

Johan Sundström johan closed this October 05, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Sep 26, 2012
Johan Sundström Update lib/rack/mime.rb
Since Chrome / WebKit wails about woff fonts served with content-type
application/octet-stream, use a more accurate legal MIME type instead:

http://code.google.com/p/chromium/issues/detail?id=70283#c6
http://stackoverflow.com/questions/10149659/resource-interpreted-as-font-but-transferred-with-mime-type-application-octet-st
802e967
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  lib/rack/mime.rb
2  lib/rack/mime.rb
@@ -598,7 +598,7 @@ def mime_type(ext, fallback='application/octet-stream')
598 598
       ".wmv"       => "video/x-ms-wmv",
599 599
       ".wmx"       => "video/x-ms-wmx",
600 600
       ".wmz"       => "application/x-ms-wmz",
601  
-      ".woff"      => "application/octet-stream",
  601
+      ".woff"      => "application/x-font-woff",
602 602
       ".wpd"       => "application/vnd.wordperfect",
603 603
       ".wpl"       => "application/vnd.ms-wpl",
604 604
       ".wps"       => "application/vnd.ms-works",
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.