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/test/controller | |
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/test/controller')
-rw-r--r-- | actionpack/test/controller/force_ssl_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/controller/force_ssl_test.rb b/actionpack/test/controller/force_ssl_test.rb index 3ea3c06ac4..b681a19fe0 100644 --- a/actionpack/test/controller/force_ssl_test.rb +++ b/actionpack/test/controller/force_ssl_test.rb @@ -50,6 +50,12 @@ class ForceSSLControllerLevelTest < ActionController::TestCase assert_equal "https://test.host/force_ssl_controller_level/banana", redirect_to_url end + def test_banana_redirects_to_https_with_extra_params + get :banana, :token => "secret" + assert_response 301 + assert_equal "https://test.host/force_ssl_controller_level/banana?token=secret", redirect_to_url + end + def test_cheeseburger_redirects_to_https get :cheeseburger assert_response 301 |