    # File lib/stella.rb, line 162
        def canonical_host(host)
          return nil if host.nil?
          if host.kind_of?(URI)
            uri = host
          else
            host &&= host.to_s
            host.strip!
            host = host.to_s unless String === host
            host = "http://#{host}" unless host.match(/^https?:\/\//)
            uri = URI.parse(host)
          end
          str = "#{uri.host}".downcase
          #str << ":#{uri.port}" if uri.port && uri.port != 80
          str
        end