-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpFoundation] Send Content-Length
when calling Response::send()
and the content is a non-empty string
#45092
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
Conversation
To add some context: I've a problem somewhere in my stack that truncate my big json response (2.5mo). I expected Symfony to add the header |
This |
And very early versions of Symfony used to put that header, which has been removed to fix an issue with gzip: #1846 |
a4c0fa4
to
7054e9c
Compare
Thanks for link @stof, PR updated to update the header in |
fd0de27
to
2d59966
Compare
Given the potential impact (the old ticket also mentions that adding the |
Also, the PR description looks wrong. It is not fixing the bug from 2011 (which was already fixed by removing the content-length header at that time) |
2d59966
to
a9a3f26
Compare
a9a3f26
to
026b82f
Compare
OK to target 6.1 |
026b82f
to
0baab34
Compare
0baab34
to
cedd3d5
Compare
Review welcome @symfony/mergers |
…` and the content is a non-empty string
Content-Length
when calling Response::send()
and the content is a non-empty string
cedd3d5
to
1f07581
Compare
Thank you @nicolas-grekas. |
…g `Response::send()` and the content is a non-empty string" (nicolas-grekas) This PR was merged into the 6.1 branch. Discussion ---------- [HttpFoundation] Revert "Send `Content-Length` when calling `Response::send()` and the content is a non-empty string" | Q | A | ------------- | --- | Branch? | 6.1 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #46449 | License | MIT | Doc PR | - Let's revert #45092 as it's breaking BC. It's not worth it. Commits ------- 7e24e5d Revert "feature #45092 [HttpFoundation] Send `Content-Length` when calling `Response::send()` and the content is a non-empty string (nicolas-grekas)"
* 6.1: [Workflow] Add ZEturf as backer [Serializer] code cleanup [Serializer] Forget partially collected traces Added missing __call to TraceableEncoder Revert "feature #45092 [HttpFoundation] Send `Content-Length` when calling `Response::send()` and the content is a non-empty string (nicolas-grekas)" [PropertyInfo] Fix extracting int range type [FrameworkBundle] Add alximy as backer of version 6.1 [WebProfilerBundle] Fix AJAX requests info are truncated in the WDT
More hints for the client and the webserver are always good.
As discussed on Slack with @bastnic