#NEWLINE# def _wsgi_get( self , path_info , **kwargs ) : #NEWLINE# #INDENT# if path_info . startswith ( '/' ) : #NEWLINE# #INDENT# if ( 'app' in status ) : #NEWLINE# #INDENT# app = kwargs . pop ( 'app' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . app is not no_default ) : #NEWLINE# #INDENT# app = self . app #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ValueError ( 'There is no app available' ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( HostProxy is not no_default ) : #NEWLINE# #INDENT# app = HostProxy ( path_info ) #NEWLINE# path_info = '/' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ImportError ( 'restkit is not installed' ) #NEWLINE# #UNINDENT# #UNINDENT# environ = kwargs . pop ( 'environ' ) . copy ( ) #NEWLINE# environ . update ( kwargs ) #NEWLINE# for key in [ 'HTTP_ACCEPT_ENCODING' , 'HTTP_IF_MATCH' , 'HTTP_IF_UNMODIFIED_SINCE' , 'HTTP_RANGE' , 'HTTP_IF_RANGE' ] : #NEWLINE# #INDENT# if ( key in environ ) : #NEWLINE# #INDENT# del environ [ key ] #NEWLINE# #UNINDENT# #UNINDENT# req = Request . blank ( path_info ) #NEWLINE# req . environ . update ( environ ) #NEWLINE# resp = req . get_response ( app ) #NEWLINE# status = resp . status . split ( ) #NEWLINE# ctype = resp . content_type . split ( ';' ) [ 0 ] #NEWLINE# if ( ( status [ 0 ] not in '45' ) and ( ctype == 'text/html' ) ) : #NEWLINE# #INDENT# body = resp . body #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# body = [ ] #NEWLINE# #UNINDENT# result = self . __class__ ( body , parent = self . _parent , app = self . app , response = resp ) #NEWLINE# return result