-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpFoundation] Set content-type header in RedirectResponse #54506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HttpFoundation] Set content-type header in RedirectResponse #54506
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a bugfix to me :)
So i target 5.4 ? |
🤦 sorry guys for the notifications .... @xabbuh @nicolas-grekas if you can target 5.4 ... or i think i will make more mess.... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 as a bug fix too.
src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php
Outdated
Show resolved
Hide resolved
eccd932
to
954f1af
Compare
Thank you @smnandre. |
The RedirectResponse has no content-type set, leading to the response using the "current" one (see issue #54434)
As
setTargetUrl
set response body with HTML/UTF-8 content, it seems fair to add the matching header at this moment.(not sure if really a bug or not so i'm targetting 7.1 for now)