Open cbiedl opened 3 years ago
So we should increment feature version (0.x.0) of this gem when we upgrade to http-parser 2.9.3 or later.
BTW because http-parser isn't maintained anymore, I'll also not actively maintain this after resolving major remaining issues.
From https://github.com/nodejs/http-parser
http-parser is not actively maintained. New projects and projects looking to migrate should consider llhttp.
Little surprised nobody has reported this earlier ...
Re-building http_parser.rb with the latest version of http-parser (2.9.4) I noticed the "post identity body world" check fails:
After a lengthy research I think the test is indeed flawed, i.e. in violation of RFC 7320 3.3.1. ("Transfer-Encoding").
The check sets
Transfer-Encoding: identity
and alsoContent-Length: 5
About the first, the RFC states:
...so this is not acceptable.
According to 3.3.3. ("Message Body Length"), combining Transfer-Encoding: and Content-Length: indicate "request smuggling" which "ought to be handled as an error" - which is what the http-parser library now does: It implemented a stricter check in commit https://github.com/nodejs/http-parser/commit/7d5c99d09f6743b055d53fc3f642746d9801479b.
Reproducer (could possibly be shorter):
Solution: Please rewrite or disable that test.