10000 [HttpFoundation] Set content-type header in RedirectResponse by smnandre · Pull Request #54506 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[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

Merged
merged 1 commit into from
Apr 6, 2024

Conversation

smnandre
Copy link
Member
@smnandre smnandre commented Apr 5, 2024
Q A
Branch? 5.4
Bug fix? no
New feature? no
Deprecations? no
Issues Fix #54434
License MIT

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)

Copy link
Member
@nicolas-grekas nicolas-grekas left a 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 :)

@smnandre
Copy link
Member Author
smnandre commented Apr 6, 2024

Looks like a bugfix to me :)

So i target 5.4 ?

@derrabus derrabus modified the milestones: 7.1, 5.4 Apr 6, 2024
@derrabus derrabus added the Bug label Apr 6, 2024
@smnandre smnandre changed the base branch from 7.1 to 5.4 April 6, 2024 11:02
@smnandre smnandre changed the base branch from 5.4 to 7.1 April 6, 2024 11:06
@smnandre
Copy link
Member Author
smnandre commented Apr 6, 2024

🤦 sorry guys for the notifications .... @xabbuh @nicolas-grekas if you can target 5.4 ... or i think i will make more mess....

Copy link
Member
@dunglas dunglas left a 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.

@chalasr chalasr changed the base branch from 7.1 to 5.4 April 6, 2024 13:06
@chalasr chalasr force-pushed the fix/redirect-response-content-type branch from eccd932 to 954f1af Compare April 6, 2024 13:06
@chalasr
Copy link
Member
chalasr commented Apr 6, 2024

Thank you @smnandre.

@chalasr chalasr merged commit 07b279c into symfony:5.4 Apr 6, 2024
10 of 12 checks passed
@chalasr chalasr removed the request for review from lyrixx April 6, 2024 13:11
@chalasr chalasr removed the request for review from yceruto April 6, 2024 13:11
This was referenced Apr 29, 2024
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.

RedirectResponse is sent with invalid content-type when route has non-html default format
7 participants
0