    # File lib/rack/request.rb, line 92
        def port
          if port = host_with_port.split(/:/)[1]
            port.to_i
          elsif port = @env['HTTP_X_FORWARDED_PORT']
            port.to_i
          elsif @env.has_key?("HTTP_X_FORWARDED_HOST")
            DEFAULT_PORTS[scheme]
          elsif @env.has_key?("HTTP_X_FORWARDED_PROTO")
            DEFAULT_PORTS[@env['HTTP_X_FORWARDED_PROTO'].split(',')[0]]
          else
            @env["SERVER_PORT"].to_i
          end
        end