def request_host(request):
 url = request.get_full_url()
 host = _rfc3986.urlsplit(url)[1]
 if (host is None):
  host = request.get_header('Host', '')
 return cut_port_re.sub('', host, 1)

def request_host ( request ) : url = request . get_full_url ( ) host = _rfc3986 . urlsplit ( url ) [ 1 ] if ( host is None ) : host = request . get_header ( 'Host' , '' ) return cut_port_re . sub ( '' , host , 1 )
return request-host .