method

normalize_port

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