nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
106.46k stars 29.01k forks source link

Inconsistent behavior handling malformed HTTP requests in HTTP Module #54130

Open ComputerScienceGirl12 opened 1 month ago

ComputerScienceGirl12 commented 1 month ago

Version

20.12.2

Platform

Windows 64-bit

Subsystem

http

What steps will reproduce the bug?

Create a server using the http module. Send a malformed HTTP request to the server. Observe the server's response and behavior.

How often does it reproduce? Is there a required condition?

The issue reproduces consistently with malformed HTTP requests.

What is the expected behavior? Why is that the expected behavior?

The server should handle malformed requests gracefully without crashing. This is necessary to avoid security crashes.

What do you see instead?

The server exhibits inconsistent behavior and may crash, depending on the nature of the request.

Additional information

This issue was identified during unit testing using the Mocha testing framework and Chai assertion library.

marco-ippolito commented 1 month ago

can you try to update to the latest version of v20 and provide a repro?