Skip to content

Commit

Permalink
Fix regression introduced in pull request 8812
Browse files Browse the repository at this point in the history
  • Loading branch information
rubys committed Jan 11, 2013
1 parent 7738222 commit c692774
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion actionpack/lib/action_dispatch/middleware/static.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c692774

Please sign in to comment.