Handle connection close of POST/PUT request correctly so that server can...

... close a connection after sending the response without reading the whole request body.
Does it make sense to allow configurable chunk size?