Permalink
Browse files

deliver content length to browser

  • Loading branch information...
1 parent 8aeee4f commit 4e0d461477089e73ef244b4f6d5b55491ff6b117 @tobi committed Aug 17, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/send_file.rb
View
@@ -13,6 +13,6 @@ def send_file(file)
cache_control = file.respond_to?(:cache_control) ? file.cache_control : 'public, max-age: 31557600'
content_type = file.respond_to?(:content_type) ? file.content_type || ContentTypes[file.ext] || raise(ArgumentError, 'illegal content type') : 'application/octet-stream'
- [200, {'Content-Type' => content_type, 'Cache-Control' => cache_control}, [file.content]]
+ [200, {'Content-Type' => content_type, 'Cache-Control' => cache_control, 'Content-Length' => file.content.length}, [file.content]]
end
end

0 comments on commit 4e0d461

Please sign in to comment.