Browse Source

fixing process_response

Flask.process_response will throw away functions is receives from ctx._after_request_functions if there is a Blueprint that has used @after_request.
pull/708/head
Trey Long 12 years ago
parent
commit
f74f446961
  1. 2
      flask/app.py

2
flask/app.py

@ -1679,7 +1679,7 @@ class Flask(_PackageBoundObject):
bp = ctx.request.blueprint
funcs = ctx._after_request_functions
if bp is not None and bp in self.after_request_funcs:
funcs = reversed(self.after_request_funcs[bp])
funcs = chain(funcs, reversed(self.after_request_funcs[bp]))
if None in self.after_request_funcs:
funcs = chain(funcs, reversed(self.after_request_funcs[None]))
for handler in funcs:

Loading…
Cancel
Save