(request)
return host.lower()
Return request-host, as defined by RFC 2965.

    Variation from RFC: returned value is lowercased, for convenient
    comparison.
Return request-host, as defined by RFC 2965.
Return request - host as defined by RFC 2965 .
def request_host(request):
    """Return request-host, as defined by RFC 2965.

    Variation from RFC: returned value is lowercased, for convenient
    comparison.

    """
    url = request.full_url
    host = urlparse(url)[1]
    if host == "":
        host = request.get_header("Host", "")

    # remove port, if present
    host = _cut_port_re.sub("", host, 1)
    return host.lower()
def request_host ( request ) : url = request . full_url host = urlparse ( url ) [ 1 ] if host == "" : host = request . get_header ( "Host" , "" ) # remove port, if present host = _cut_port_re . sub ( "" , host , 1 ) return host . lower ( )