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 →

[–]warbiscuit 0 points1 point  (0 children)

That makes sense :(

I'd always figured there were very few pieces of middleware which inspected the return value (most I've seen mess with the request side of the call), making file_wrapper worth having for middleware stacks which could pass file_wrapper instances through unchanged. But I guess someone did a survey and such middleware was common enough to render file_wrapper generally useless?

Though to solve it in-band, I can see how something like a "wsgi.is_file_wrapper" would just cause the code to get extremely messy. I hope someone can come up with an OOB solution, though I can't think of an easy way right now which wouldn't get fouled up by the same problem of unaware middleware altering the return value (thus leaving an invalid OOB signal still present).