Skip to content

http: be more aggressive to reply 400, 408 and 431

Fix https://github.com/nodejs/node/issues/37685, which is introduced in https://github.com/nodejs/node/commit/e8d7fedf7cad6e612e4f2e0456e359af57608ac7. It is too conservate (from the perspective from avoiding corrupting the client) to reply an error message.

Cases where we should reply an error message are covered in those 4 tests this PR modified, while the case where the socket should be immediately destroyed is covered in test/parallel/test-http-header-badrequest.js.

Merge request reports

Loading