Changeset #15701 breaks response middleware that inspects content.
|Reported by:||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.
Change History (5)
comment:1 Changed 3 years ago by schinckel
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:3 Changed 3 years ago by lukeplant
- Resolution set to duplicate
- Status changed from new to closed
comment:4 Changed 3 years ago by jezdez
- Resolution duplicate deleted
- Status changed from closed to reopened