aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/cgi_process.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/cgi_process.rb')
-rw-r--r--actionpack/lib/action_controller/cgi_process.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/cgi_process.rb b/actionpack/lib/action_controller/cgi_process.rb
index adc594f03e..b3739ce399 100644
--- a/actionpack/lib/action_controller/cgi_process.rb
+++ b/actionpack/lib/action_controller/cgi_process.rb
@@ -82,7 +82,7 @@ module ActionController #:nodoc:
@cgi.cookies.freeze
end
- def host_with_port
+ def host_with_port_without_standard_port_handling
if forwarded = env["HTTP_X_FORWARDED_HOST"]
forwarded.split(/,\s?/).last
elsif http_host = env['HTTP_HOST']
@@ -95,11 +95,11 @@ module ActionController #:nodoc:
end
def host
- host_with_port.sub(/:\d+$/, '')
+ host_with_port_without_standard_port_handling.sub(/:\d+$/, '')
end
def port
- if host_with_port =~ /:(\d+)$/
+ if host_with_port_without_standard_port_handling =~ /:(\d+)$/
$1.to_i
else
standard_port