#NEWLINE# @ webob . dec . wsgify #NEWLINE# def __call__( self , request ) : #NEWLINE# #INDENT# '\n        Handles all requests to the application.\n        ' #NEWLINE# base = ( 'http://%s' % request . host ) #NEWLINE# path = request . path_qs #NEWLINE# if ( path == '/' ) : #NEWLINE# #INDENT# return 'root' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( path == '/302' ) : #NEWLINE# #INDENT# url = ( '%s/success' % base ) #NEWLINE# raise webob . exc . HTTPFound ( location = url ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( path == '/302?with_qs=yes' ) : #NEWLINE# #INDENT# url = ( '%s/success?with_qs=yes' % base ) #NEWLINE# raise webob . exc . HTTPFound ( location = url ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( path == '/infinite_302' ) : #NEWLINE# #INDENT# raise webob . exc . HTTPFound ( location = request . url ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if path . startswith ( '/redirect-to' ) : #NEWLINE# #INDENT# url = ( 'http://127.0.0.1:%s/success' % path . split ( '-' ) [ ( - 1 ) ] ) #NEWLINE# raise webob . exc . HTTPFound ( location = url ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( path == '/success' ) : #NEWLINE# #INDENT# return ( 'success_from_host_%s' % base . name ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( path == '/success?with_qs=yes' ) : #NEWLINE# #INDENT# return 'success_with_qs' #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return 'fail'