-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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(http): fix invalid content-length header in http get (IDFGH-13571) #14459
Conversation
👋 Hello TeXniKK, 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 ...
|
§ 9.3.1 states that content within GET request is allowed if the origin server indicates that it supports such requests. Maybe there should be an option to keep the header? You could also add HEAD and DELETE requests to the check as they have the same wording within the RFC (§ 9.3.2 and § 9.3.5). |
1b46f91
to
c87cb85
Compare
Agreed. Updated PR with checks for HEAD and DELETE. Also added a check on write_len != 0 to support unlike case where these requests would actually have a body. |
sha=c87cb854f3205cb3f1c69f31ac654a4f278d5628 |
According to RFC9110 Section 8.6 "Content-Length":
A user agent SHOULD NOT send a Content-Length header field when the request message does not contain content and the method semantics do not anticipate such data.
This fix removes invalid(empty) Content-Length header for HTTP GET requests.
Presence of this header is causing error 400 to be returned by AWS services via secure connection in some cases: