Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[HttpFoundation] StreamedResponse is not compatible with setNotModified() method #27924

Closed
@rubencm

Description

@rubencm

Symfony version(s) affected: 2.8+

Description
I have found that setNotModified() method empties the content, but StreamedResponse class uses a callback for the output, so when the response returns a 304 code, it will output the content too, when it shouldn't.

Possible Solution
I think the method setNotModified() should be overriden by StreamedResponse class, and there set an empty closure as callback.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions