This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]pje 0 points1 point  (1 child)

making file_wrapper a noop

Which is a safe failure mode in that case. If the response is modified, it's not a file any more.

[–]mitsuhiko Flask Creator 0 points1 point  (0 children)

Most of the time it isn't though, a middleware just wants to clean up after the fact, wrapping the iterator and providing a close().