File tree 1 file changed +9
-7
lines changed
1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -848,17 +848,19 @@ def default_error_handler(self, res):
848
848
return tob (template (ERROR_PAGE_TEMPLATE , e = res ))
849
849
850
850
def _handle (self , environ ):
851
- path = environ ['bottle.raw_path' ] = environ ['PATH_INFO' ]
852
- if py3k :
853
- try :
854
- environ ['PATH_INFO' ] = path .encode ('latin1' ).decode ('utf8' )
855
- except UnicodeError :
856
- return HTTPError (400 , 'Invalid path string. Expected UTF-8' )
857
-
858
851
try :
852
+
859
853
environ ['bottle.app' ] = self
860
854
request .bind (environ )
861
855
response .bind ()
856
+
857
+ path = environ ['bottle.raw_path' ] = environ ['PATH_INFO' ]
858
+ if py3k :
859
+ try :
860
+ environ ['PATH_INFO' ] = path .encode ('latin1' ).decode ('utf8' )
861
+ except UnicodeError :
862
+ return HTTPError (400 , 'Invalid path string. Expected UTF-8' )
863
+
862
864
try :
863
865
self .trigger_hook ('before_request' )
864
866
route , args = self .router .match (environ )
You can’t perform that action at this time.
0 commit comments