#NEWLINE# def extract_uri( self , environ ) : #NEWLINE# #INDENT# port = None #NEWLINE# scheme = environ [ 'wsgi.url_scheme' ] #NEWLINE# host = environ [ 'HTTP_HOST' ] #NEWLINE# if ( ':' in host ) : #NEWLINE# #INDENT# ( host , port ) = host . split ( ':' ) #NEWLINE# #UNINDENT# if ( not port ) : #NEWLINE# #INDENT# port = ( ( ( scheme == 'https' ) and '443' ) or '80' ) #NEWLINE# #UNINDENT# uri = ( '%s://%s:%s' % ( uri , host , port ) ) #NEWLINE# return uri