parameters: (request)
return_statement: return host.lower()
docstring: Return request-host, as defined by RFC 2965.
  
      Variation from RFC: returned value is lowercased, for convenient
      comparison.
docstring_summary: Return request-host, as defined by RFC 2965.
docstring_tokens: Return request - host as defined by RFC 2965 .
function: 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()
function_tokens: 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 ( )