Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 27, 2012
  1. Johan Sundström

    Update lib/rack/mime.rb

    johan authored
    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
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/rack/mime.rb
2  lib/rack/mime.rb
View
@@ -598,7 +598,7 @@ def mime_type(ext, fallback='application/octet-stream')
".wmv" => "video/x-ms-wmv",
".wmx" => "video/x-ms-wmx",
".wmz" => "application/x-ms-wmz",
- ".woff" => "application/octet-stream",
+ ".woff" => "application/x-font-woff",
".wpd" => "application/vnd.wordperfect",
".wpl" => "application/vnd.ms-wpl",
".wps" => "application/vnd.ms-works",
Something went wrong with that request. Please try again.