diff options
author | Andriel Nuernberg <andriel.nuernberg@plataformatec.com.br> | 2014-04-09 13:48:53 -0300 |
---|---|---|
committer | Andriel Nuernberg <andriel.nuernberg@plataformatec.com.br> | 2014-04-09 14:19:53 -0300 |
commit | 85e424de6c9dea71edeb51d966014673c9631df3 (patch) | |
tree | 3efaf7d6920585a0e5e41cdf544eb37fad04b476 /actionpack/test/dispatch | |
parent | 040a1dbb11495490ca3f7c882cda1815316e7256 (diff) | |
download | rails-85e424de6c9dea71edeb51d966014673c9631df3.tar.gz rails-85e424de6c9dea71edeb51d966014673c9631df3.tar.bz2 rails-85e424de6c9dea71edeb51d966014673c9631df3.zip |
Avoid URI parsing
This parsing is unecessary once the Request object already has the
needed information.
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/ssl_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/ssl_test.rb b/actionpack/test/dispatch/ssl_test.rb index 94969f795a..c3598c5e8e 100644 --- a/actionpack/test/dispatch/ssl_test.rb +++ b/actionpack/test/dispatch/ssl_test.rb @@ -196,6 +196,13 @@ class SSLTest < ActionDispatch::IntegrationTest response.headers['Location'] end + def test_redirect_to_host_with_port + self.app = ActionDispatch::SSL.new(default_app, :host => "ssl.example.org:443") + get "http://example.org/path?key=value" + assert_equal "https://ssl.example.org:443/path?key=value", + response.headers['Location'] + end + def test_redirect_to_secure_host_when_on_subdomain self.app = ActionDispatch::SSL.new(default_app, :host => "ssl.example.org") get "http://ssl.example.org/path?key=value" |