nodejs / node

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

Inconsistent behavior handling malformed HTTP requests in HTTP Module #54130

Open ComputerScienceGirl12 opened 4 months ago

ComputerScienceGirl12 commented 4 months 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 4 months ago

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