Skip to content

Commit

Permalink
Send the correct MIME type for fonts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Ketterman authored and Charles Jolley committed Jan 14, 2010
1 parent 9b2792a commit ce047d6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/sproutcore/rack/builder.rb
Expand Up @@ -322,7 +322,16 @@ def normalize_url(url, target)
# a few bug fixes.
def mime_type(build_path)
ext = File.extname(build_path)
(ext == '.js') ? 'text/javascript' : ::Rack::Mime.mime_type(ext, 'text/plain')

case ext
when '.js'
'text/javascript'
when '.ttf'
'font/ttf'
else
::Rack::Mime.mime_type(ext, 'text/plain')
end

end

end
Expand Down

0 comments on commit ce047d6

Please sign in to comment.