Permalink
Browse files

Fix regression introduced in pull request 8812

  • Loading branch information...
1 parent 7738222 commit c692774bbae528d83925d04e1c3cebb73e3f8ae5 @rubys rubys committed Jan 11, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 actionpack/lib/action_dispatch/middleware/static.rb
View
3 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 c692774

Please sign in to comment.