-
Notifications
You must be signed in to change notification settings - Fork 355
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
extended condition not to add the content-length header negative #4967
extended condition not to add the content-length header negative #4967
Conversation
This should fix: #4965 |
Thank you for the PR. The continuous integration check did fail because the copyright year is not updated to 2022. The PR does not seem right. Why did you exclude zero-length content? Can you provide a test that demonstrates the use-case this PR helps? |
Hi @jansupol
|
I can understand the negative number. |
@jansupol you are right, the zero length of Content-Length is a valid value. I have fixed the condition. |
This update prevents wrong adding of the Content-Length header with the value -1. Such a value is not defined in the specification. The header should not be present at all when the length is not defined.