#NEWLINE# def __init__( self , environ ) : #NEWLINE# #INDENT# script_name = base . get_script_name ( environ ) #NEWLINE# path_info = force_unicode ( environ . get ( 'PATH_INFO' , '/' ) ) #NEWLINE# if ( ( not path_info ) or ( path_info == script_name ) ) : #NEWLINE# #INDENT# path_info = '/' #NEWLINE# #UNINDENT# self . environ = environ #NEWLINE# self . path_info = path_info #NEWLINE# self . path = ( '%s%s' % ( script_name , path_info ) ) #NEWLINE# self . META = environ #NEWLINE# self . META [ 'PATH_INFO' ] = path_info #NEWLINE# self . META [ 'SCRIPT_NAME' ] = script_name #NEWLINE# self . method = environ [ 'REQUEST_METHOD' ] . upper ( ) #NEWLINE# self . _post_parse_error = False #NEWLINE# if ( ( type ( socket . _fileobject ) is type ) and isinstance ( self . environ [ 'wsgi.input' ] , socket . _fileobject ) ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# content_length = int ( self . environ . get ( 'CONTENT_LENGTH' , 0 ) ) #NEWLINE# #UNINDENT# except ( ValueError , TypeError ) : #NEWLINE# #INDENT# content_length = 0 #NEWLINE# #UNINDENT# self . _stream = LimitedStream ( self . environ [ 'wsgi.input' ] , content_length ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _stream = self . environ [ 'wsgi.input' ] #NEWLINE# #UNINDENT# self . _read_started = False