Permalink
Browse files

No need to double call #mime_type

Signed-off-by: Konstantin Haase <konstantin.mailinglists@googlemail.com>
  • Loading branch information...
1 parent 3ef3c09 commit a3cff23054dbea77bc8b6061387f94b4b0c38dcb @krekoten krekoten committed with rkh Oct 19, 2010
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/sinatra/base.rb
View
@@ -154,9 +154,8 @@ def send_file(path, opts={})
stat = File.stat(path)
last_modified stat.mtime
- content_type mime_type(opts[:type]) ||
- opts[:type] ||
- mime_type(File.extname(path)) ||
+ content_type opts[:type] ||
+ File.extname(path) ||
response['Content-Type'] ||
'application/octet-stream'

0 comments on commit a3cff23

Please sign in to comment.