summary refs log tree commit
diff options
context:
space:
mode:
authorMichael Fellinger <m.fellinger@gmail.com>2009-06-23 22:46:48 +0900
committerMichael Fellinger <m.fellinger@gmail.com>2009-06-23 22:46:48 +0900
commit889d4d6c3186e2fffeea112a43f37766c6ccec19 (patch)
tree8335f39095f4d178bab64cd77c6a2c35dba3df04
parentfd1c1d2e494d9a7d15e0458602ef121f244addc3 (diff)
downloadrack-889d4d6c3186e2fffeea112a43f37766c6ccec19.tar.gz
Use #to_s and #downcase on the ext passed to Rack::Mime::mime_type
-rw-r--r--lib/rack/mime.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rack/mime.rb b/lib/rack/mime.rb
index 5a6a73a9..d0d208e8 100644
--- a/lib/rack/mime.rb
+++ b/lib/rack/mime.rb
@@ -14,7 +14,7 @@ module Rack
     #     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