Skip to content

Responses with HTTP status 204/ 304 must not set the Content-Type header#2298

Open
kryptychon wants to merge 1 commit intoFriendsOfSymfony:3.xfrom
kryptychon:3.x
Open

Responses with HTTP status 204/ 304 must not set the Content-Type header#2298
kryptychon wants to merge 1 commit intoFriendsOfSymfony:3.xfrom
kryptychon:3.x

Conversation

@kryptychon
Copy link

@kryptychon kryptychon commented Mar 16, 2021

Hi there,

IMHO the Content-Type header must not be set if the ViewHandler is dealing with an empty Response.

I'm aware this might break BC but nevertheless, a Content-Type header does not really make sense in an empty response.

@goetas
Copy link
Member

goetas commented Oct 9, 2021

makes sense, could you please add a test for this change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants