#NEWLINE# def make_environ( self ) : #NEWLINE# #INDENT# request_url = url_parse ( self . path ) #NEWLINE# def shutdown_server( ) : #NEWLINE# #INDENT# self . server . shutdown_signal = True #NEWLINE# #UNINDENT# url_scheme = ( ( ( self . server . ssl_context is None ) and 'http' ) or 'https' ) #NEWLINE# path_info = url_unquote ( request_url . path ) #NEWLINE# environ = { #NEWLINE# #INDENT# 'wsgi.version' : ( 1 , 0 ) , #NEWLINE# 'wsgi.url_scheme' : url_scheme , #NEWLINE# 'wsgi.input' : self . rfile , #NEWLINE# 'wsgi.errors' : sys . stderr , #NEWLINE# 'wsgi.multithread' : self . server . multithread , #NEWLINE# 'wsgi.multiprocess' : self . server . multiprocess , #NEWLINE# 'wsgi.run_once' : False , #NEWLINE# 'werkzeug.server.shutdown' : shutdown_server , #NEWLINE# 'SERVER_SOFTWARE' : self . server_version , #NEWLINE# 'REQUEST_METHOD' : self . command , #NEWLINE# 'SCRIPT_NAME' : '' , #NEWLINE# 'PATH_INFO' : wsgi_encoding_dance ( path_info ) , #NEWLINE# 'QUERY_STRING' : wsgi_encoding_dance ( request_url . query ) , #NEWLINE# 'CONTENT_TYPE' : self . headers . get ( 'Content-Type' , '' ) , #NEWLINE# 'CONTENT_LENGTH' : self . headers . get ( 'Content-Length' , '' ) , #NEWLINE# 'REMOTE_ADDR' : self . client_address [ 0 ] , #NEWLINE# 'REMOTE_PORT' : self . client_address [ 1 ] , #NEWLINE# 'SERVER_NAME' : self . server . server_address [ 0 ] , #NEWLINE# 'SERVER_PORT' : str ( self . server . server_address [ 1 ] ) , #NEWLINE# 'SERVER_PROTOCOL' : self . request_version , #NEWLINE# #UNINDENT# } #NEWLINE# for ( key , value ) in self . headers . items ( ) : #NEWLINE# #INDENT# key = ( 'HTTP_' + key . upper ( ) . replace ( '-' , '_' ) ) #NEWLINE# if ( key not in ( 'HTTP_CONTENT_TYPE' , 'HTTP_CONTENT_LENGTH' ) ) : #NEWLINE# #INDENT# environ [ key ] = value #NEWLINE# #UNINDENT# #UNINDENT# if request_url . netloc : #NEWLINE# #INDENT# environ [ 'HTTP_HOST' ] = request_url . netloc #NEWLINE# #UNINDENT# return request_url