read_request called recv once for the length and once for the body. A stream socket can deliver a request in several pieces, and the server then rejected that request.
The server now uses the read loop of the client, which moves to utilities as recv_exact. The server refuses a request above 64 KiB.