From 2378f69e69f98460f426d2c4e0fbb967b4fa5ddf Mon Sep 17 00:00:00 2001 From: Andrew White Date: Sun, 11 May 2014 12:56:33 +0100 Subject: Always use the provided port for protocol relative urls There may be situations where you need to tunnel SSL connections over port 80 so we shouldn't remove it if it has been explicitly provided. --- actionpack/lib/action_dispatch/http/url.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'actionpack/lib/action_dispatch/http') diff --git a/actionpack/lib/action_dispatch/http/url.rb b/actionpack/lib/action_dispatch/http/url.rb index 77ea0cf658..c9860af909 100644 --- a/actionpack/lib/action_dispatch/http/url.rb +++ b/actionpack/lib/action_dispatch/http/url.rb @@ -135,6 +135,8 @@ module ActionDispatch return nil if options[:port].nil? || options[:port] == false case options[:protocol] + when "//" + options[:port] when "https://" options[:port].to_i == 443 ? nil : options[:port] else -- cgit v1.2.3