diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-04-09 14:20:56 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-04-09 14:20:56 -0300 |
commit | 7b75b678cf11a1aed7927a9db42fb60a38726450 (patch) | |
tree | 4635ab3771706f7a22e1ea09c4487879f0122185 /actionpack/test | |
parent | 7142ff8f3dd0eda4c3cabd5d2ca5eefc0aebb22b (diff) | |
parent | 85e424de6c9dea71edeb51d966014673c9631df3 (diff) | |
download | rails-7b75b678cf11a1aed7927a9db42fb60a38726450.tar.gz rails-7b75b678cf11a1aed7927a9db42fb60a38726450.tar.bz2 rails-7b75b678cf11a1aed7927a9db42fb60a38726450.zip |
Merge pull request #14665 from andrielfn/avoid-uri-parsing
Avoid URI parsing
Diffstat (limited to 'actionpack/test')
-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" |