Skip to content

BinaryFileResponse - hashing strategy #6101

Closed
@Dynom

Description

@Dynom

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.

7322696#commitcomment-2193066

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good first issueIdeal for your first contribution! (some Symfony experience may be required)HttpFoundation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions