diff options
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/http/url.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/http/url.rb b/actionpack/lib/action_dispatch/http/url.rb index 6444fa6f78..86915cfc27 100644 --- a/actionpack/lib/action_dispatch/http/url.rb +++ b/actionpack/lib/action_dispatch/http/url.rb @@ -73,13 +73,14 @@ module ActionDispatch end def build_host_url(options) + protocol = options[:protocol] if match = options[:host].match(HOST_REGEXP) - options[:protocol] ||= match[1] unless options[:protocol] == false + protocol ||= match[1] unless protocol == false options[:host] = match[2] options[:port] = match[3] unless options.key?(:port) end - protocol = normalize_protocol options[:protocol] + protocol = normalize_protocol protocol options[:host] = normalize_host(options) result = protocol.dup |