Commit Graph

2 Commits

Author SHA1 Message Date
Santiago Gimeno
ef7a686ed9
http: don't write empty data on req/res end()
When calling OutgoingMessage.end() with empty data argument, avoid
writing to the socket unless there's still pending data to be sent.

Fixes: https://github.com/nodejs/node/issues/41062

PR-URL: https://github.com/nodejs/node/pull/41116
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-12-10 19:44:24 +00:00
Anna Henningsen
18667ac6f5
test: add regression tests for HTTP parser crash
Since the tests only crash on v12.x, this commit adds separate
regression tests.

Refs: https://github.com/nodejs/node/issues/15102

PR-URL: https://github.com/nodejs/node/pull/34250
Refs: https://github.com/nodejs/node/issues/34016
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-07-14 15:02:36 +02:00