method
normalize_port
v8.1.1 -
Show latest stable
- Class:
ActionDispatch::Http::URL
normalize_port(port, protocol)private
No documentation available.
# File actionpack/lib/action_dispatch/http/url.rb, line 264
def normalize_port(port, protocol)
return unless port
case protocol
when "//" then port
when "https://"
port unless port.to_i == 443
else
port unless port.to_i == 80
end
end