-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Changing the parsing of headers reflects in trouble in laravel projects #47747
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
Comments
Please share what "does not work" means and how you know that this is related to the HttpFoundation component (as you say you can only reproduce in a Laravel project and the code example you showed is not from Symfony). |
I don't think passing strings like |
I agree with @stof here and closing here as the referenced PR has been merged. I recommend you still update your projects to use the associative array, as the code you show does indeed not work as intended (in any version of Symfony). |
Abolutely not true. Before:
will add an header named After the upgrade it create an header name We were (wrongly, ok,...) using this sintax in a few projects, and was working. Upgrading laravel bring with itself the upgrade of your package and so we digged until we discovered which specific package upgrade broke the things. I know it's not your fault... but I think it could be usefull for future googler to know. Also I opened an issue with same goal on laravel/framework, Also, I asked laravel doc team to documented the right way to pass headers because it's not documented at all. In the last 3 days we corrected, and upgraded, all of our project having this misuse. But absolutely, our syntax worked, and laravel was not altering headers before passing down to |
As stated, and modified in the first post, it worked. Ok. Was an error. But worked. I was not lossing my and out time if it was not working :) |
Uh oh!
There was an error while loading. Please reload this page.
Symfony version(s) affected
6.1.5 (version of symfony/http-foundation)
Description
this was the sintax we used to use.
Note $headers
This code adds an header named
Content-Type
with value:application/pdf
This will not work anymore since 6.1.5 of this package
After the upgrade it create an header named
0
with valueContent-Type: application/pdf
Since now, only this following syntax works . But we must fix EVERY SINGLE LARAVEL PROJECT
How to reproduce
I am able to reproduce only in a laravel project
Possible Solution
I ask for a revert
Additional Context
No response
The text was updated successfully, but these errors were encountered: