[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:
Jeremy Kersten 2015-06-01 10:14:25 +02:00
parent 7f8cd01431
commit daa69fb838
1 changed files with 1 additions and 1 deletions

View File

@ -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()