cesanta / mongoose

Embedded Web Server

Home Page:https://mongoose.ws

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

kenballus opened this issue · 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.

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 thank you!
@robertc2000 please take this one