diff options
author | Ryan McGeary <ryan@mcgeary.org> | 2012-02-06 17:47:17 -0500 |
---|---|---|
committer | Ryan McGeary <ryan@mcgeary.org> | 2012-02-07 13:28:29 -0500 |
commit | 6efb849b32f672d9c26f36d2c823b134f49bd892 (patch) | |
tree | a770cda85563ba9c693b54f503f8235c57c6e35d /actionpack/lib/action_controller/metal | |
parent | 275c3a1cb3d0f38d1a28b1a8d6145a4d7e379acc (diff) | |
download | rails-6efb849b32f672d9c26f36d2c823b134f49bd892.tar.gz rails-6efb849b32f672d9c26f36d2c823b134f49bd892.tar.bz2 rails-6efb849b32f672d9c26f36d2c823b134f49bd892.zip |
Fixed force_ssl redirects to include original query params
`ActionController.force_ssl` redirects http URLs to their https equivalent;
however, when a URL contains a query string, the resulting redirect lacked the
original query string.
Conflicts:
actionpack/lib/action_controller/metal/force_ssl.rb
Diffstat (limited to 'actionpack/lib/action_controller/metal')
-rw-r--r-- | actionpack/lib/action_controller/metal/force_ssl.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/metal/force_ssl.rb b/actionpack/lib/action_controller/metal/force_ssl.rb index b45f211e83..69e37d8713 100644 --- a/actionpack/lib/action_controller/metal/force_ssl.rb +++ b/actionpack/lib/action_controller/metal/force_ssl.rb @@ -29,6 +29,7 @@ module ActionController if !request.ssl? && !Rails.env.development? redirect_options = {:protocol => 'https://', :status => :moved_permanently} redirect_options.merge!(:host => host) if host + redirect_options.merge!(:params => request.query_parameters) flash.keep redirect_to redirect_options end |