Changeset #15701 breaks response middleware that inspects content.
|Reported by:||Matthew Schinckel||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
When serving a file, the new FileWrapper code is used. This uses an iterator to make the code less of a memory hog.
But it only allows for the response.content to be read once.
This is often not a problem, but I use some middleware that inspects the response.content, which means I have to alter the middleware so that it checks for a seek method on the response.content object, and go back to the start.
Is this an intended side effect? There is no mention of not being able to read from the response content in the middleware documentation.