Permalink
Browse files

Use #to_s and #downcase on the ext passed to Rack::Mime::mime_type

  • Loading branch information...
1 parent fd1c1d2 commit 889d4d6c3186e2fffeea112a43f37766c6ccec19 @manveru manveru committed Jun 23, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rack/mime.rb
View
@@ -14,7 +14,7 @@ module Mime
# Rack::Mime::MIME_TYPES.fetch('.foo', 'application/octet-stream')
def mime_type(ext, fallback='application/octet-stream')
- MIME_TYPES.fetch(ext, fallback)
+ MIME_TYPES.fetch(ext.to_s.downcase, fallback)
end
module_function :mime_type

0 comments on commit 889d4d6

Please sign in to comment.