diff options
author | Sam Ruby <rubys@intertwingly.net> | 2013-01-08 07:22:48 -0500 |
---|---|---|
committer | Sam Ruby <rubys@intertwingly.net> | 2013-01-08 07:22:48 -0500 |
commit | 9cc82b77196d21a5c7021f6dca59ab9b2b158a45 (patch) | |
tree | 94cf26671b3c8127bef76652861ac9f7932989ae /actionpack/lib/action_dispatch/middleware | |
parent | c67005f221f102fe2caca231027d9b11cf630484 (diff) | |
download | rails-9cc82b77196d21a5c7021f6dca59ab9b2b158a45.tar.gz rails-9cc82b77196d21a5c7021f6dca59ab9b2b158a45.tar.bz2 rails-9cc82b77196d21a5c7021f6dca59ab9b2b158a45.zip |
Eliminate Rack::File headers deprecation warning
See http://intertwingly.net/projects/AWDwR4/checkdepot/section-6.1.html
rake test produces:
"Rack::File headers parameter replaces cache_control after Rack 1.5."
Despite what the message says, it appears that the hearders parameter change
will be effective as of Rack 1.5:
https://github.com/rack/rack/blob/rack-1.4/lib/rack/file.rb#L24
https://github.com/rack/rack/blob/master/lib/rack/file.rb#L24
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/static.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/static.rb b/actionpack/lib/action_dispatch/middleware/static.rb index e3b15b43b9..1c9512ad01 100644 --- a/actionpack/lib/action_dispatch/middleware/static.rb +++ b/actionpack/lib/action_dispatch/middleware/static.rb @@ -6,7 +6,7 @@ module ActionDispatch def initialize(root, cache_control) @root = root.chomp('/') @compiled_root = /^#{Regexp.escape(root)}/ - @file_server = ::Rack::File.new(@root, cache_control) + @file_server = ::Rack::File.new(@root, 'Cache-Control' => cache_control) end def match?(path) |