Closed
Description
Currently the hashing system in the new BinaryFileResponse has known limitations. It will be greatly beneficial if these are addressed by offering means to overcome these.
An option is to simplify the logic for hashing, by separating the hashing from the setting of the entity tag and from the file-input. This can be done simply by putting sha1_file() in a different method, that can be easily overridden, or by allowing a more OO approach by injecting the hashing strategy. The latter might be a bit more bulky but allows the most flexibility while maintaining clean separation of concerns.