mongoose icon indicating copy to clipboard operation
mongoose copied to clipboard

Mongoose closes the connection without responding to POST requests that don't have explicit lengths

Open kenballus opened this issue 1 year ago • 2 comments

When Mongoose receives a POST request that doesn't have a Transfer-Encoding or Content-Length header set, it does not respond. It would be helpful if it responded 411 or 400 to indicate that a length is required.

kenballus avatar Jan 29 '24 18:01 kenballus

You can reproduce this issue by starting the http-server example, then running the following command:

printf 'POST / HTTP/1.1\r\n\r\n' | nc localhost 8000

There will be no output from nc because the server never responds.

kenballus avatar Jan 30 '24 19:01 kenballus

@kenballus thank you! @robertc2000 please take this one

cpq avatar Feb 11 '24 09:02 cpq