[FIX] http: avoid that request.not_found crash
return request.not_found crash with a internal error, because get_response takes a environment as param. Werkzeug Documentation: Keep in mind that you have to pass an environment to get_response() because some errors fetch additional information from the WSGI environment.
This commit is contained in:
+1
-1
@@ -407,7 +407,7 @@ def route(route=None, **kw):
|
||||
return Response(response)
|
||||
|
||||
if isinstance(response, werkzeug.exceptions.HTTPException):
|
||||
response = response.get_response()
|
||||
response = response.get_response(request.httprequest.environ)
|
||||
if isinstance(response, werkzeug.wrappers.BaseResponse):
|
||||
response = Response.force_type(response)
|
||||
response.set_default()
|
||||
|
||||
Reference in New Issue
Block a user