-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
fix(esp_http_client): Fix invalid content length header (IDFGH-14528) #15291
base: master
Are you sure you want to change the base?
fix(esp_http_client): Fix invalid content length header (IDFGH-14528) #15291
Conversation
👋 Hello chris-durand, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
In case a request with no content is sent after one with the content length header set the header of the previous request is sent with the subsequent one. For instance, an empty GET request after a PUT request will still indicate the non-zero content length of the previous request. This is fixed by clearing the content length header when it shouldn't be set.
912304b
to
c0590f5
Compare
Hello @chris-durand , Could you please let me know the steps you have followed to reproduce the issue. |
sha=c0590f5b50556ae4decf237aa8715375096a2402 |
Using same HTTP connection to send a request with |
In case a request with no content (e.g GET) is sent after one containing data the incorrect content length header of the previous request is sent with the subsequent one.
For instance, an empty GET request after a PUT request will still have the non-zero content length header set.
This is fixed by clearing the header in that case.
The bug was introduced as a side effect of #14459