Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix regression introduced in pull 8812 #8907

Merged
merged 1 commit into from

3 participants

Sam Ruby Rafael Mendonça França Carlos Antonio da Silva
Rafael Mendonça França rafaelfranca merged commit c1d7225 into from
Rafael Mendonça França

Thanks

Rafael Mendonça França

Done

Rafael Mendonça França rafaelfranca referenced this pull request from a commit
Rafael Mendonça França rafaelfranca Add regression test to #8907 5045455
Rafael Mendonça França rafaelfranca referenced this pull request from a commit
Rafael Mendonça França rafaelfranca Add regression test to #8907 fa0d434
Aaron Patterson tenderlove referenced this pull request from a commit in tenderlove/rails
Aaron Patterson tenderlove Merge branch 'master' into keithgabryelski-partitioned4
* master: (2054 commits)
  Change the behavior of route defaults
  Add support for other types of routing constraints
  Ensure port is set when passed via the process method
  Raise correct exception now Journey is integrated.
  Revert "Merge pull request #8930 from cordawyn/ordered_railties"
  Revert "log at debug level what line caused the redirect_to"
  Improve mysql database tasks handling to ensure we always rescue from an exception
  Revert "Merge pull request #8942 from yahonda/tested_only_with_mysql"
  ActiveRecord <-> Active Record [ci skip]
  Use Rails 4 find_by in README [ci skip]
  Account for ignored cookie set by turbolinks
  test for ActiveModel::Conversion#to_partial_path and namespaced models
  Address test_create_when_database_exists_outputs_info_to_stderr failures
  Rename :value option to :selected, in line with other select helpers Add tests for time & datetime. Add documentation.
  Revert benchmark helper regression. Use a #capture within a #benchmark block. Breaks benchmark calls that return non-String values otherwise.
  rake railties:install:migrations respects the order of railties
  Test to allow Range including DateTime and DateTime::Infinity
  Add regression test to #8907
  Allow value to be set on date_select
  Remove WIP from Working With JavaScript Guide.
  ...

Conflicts:
	activerecord/lib/active_record/model_schema.rb
	activerecord/lib/active_record/persistence.rb
3357ae9
Santiago Pastorino spastorino referenced this pull request from a commit
Sam Ruby rubys 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
9cc82b7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  actionpack/lib/action_dispatch/middleware/static.rb
3  actionpack/lib/action_dispatch/middleware/static.rb
View
@@ -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)
Something went wrong with that request. Please try again.