Permalink
Browse files

Merge pull request #8907 from rubys/master

Fix regression introduced in pull 8812
  • Loading branch information...
rafaelfranca committed Jan 11, 2013
2 parents 7738222 + c692774 commit c1d722558ee2bd373ca4768c48b8ae944e1bdb05
Showing with 2 additions and 1 deletion.
  1. +2 −1 actionpack/lib/action_dispatch/middleware/static.rb
@@ -6,7 +6,8 @@ class FileHandler
def initialize(root, cache_control)
@root = root.chomp('/')
@compiled_root = /^#{Regexp.escape(root)}/
- @file_server = ::Rack::File.new(@root, 'Cache-Control' => cache_control)
+ headers = cache_control && { 'Cache-Control' => cache_control }
+ @file_server = ::Rack::File.new(@root, headers)
end
def match?(path)

0 comments on commit c1d7225

Please sign in to comment.