Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[HttpClient] Fix sending content-length when streaming the body#45998
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
fabpot commentedApr 12, 2022
Thank you@nicolas-grekas. |
Gregoire-M commentedJul 21, 2022
For the record, I had strange and random HTTP errors that I could not explain with Upgrading to 5.4.9 has fixed the issue, thanks to this PR I think. So thank you@nicolas-grekas! |
…as-grekas)This PR was merged into the 5.4 branch.Discussion----------[HttpClient] Let curl handle content-length headers| Q | A| ------------- | ---| Branch? | 5.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets |Fix#47973,#46499,#46823| License | MIT| Doc PR | -I'm not sure why (maybe some older and buggy curl versions?) but it looks like curl might send content-length headers to proxies.This didn't happen before#45261 so I'm trying to use curl in the same was as we did by the time, aka letting it handle content-length header when possible.This is something that I already attempted in#45814 but was partly reverted in#45998. The attached patch is free from such issue.Commits-------5b27dc2 [HttpClient] Let curl handle content-length headers
Follows#45906 and previous PRs on the topic.
This PR partly reverts previous changes but keeps tests added to cover how we manage content-related headers when redirecting.
Relying on curl doesn't work in all cases, so we need to manage them on our own.