mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-27 05:51:30 +00:00
The read timeout applied to each read of the request line and headers, so a client that sent them a byte now and then held a worker for as long as it liked, and enough such clients left no worker for anyone else. Bound the whole head by the read timeout, as the TLS handshake already is, through a new Stream::set_max_timeout() that the socket streams implement with their existing max timeout. A request body is still bounded per read, and a WebSocket holds its worker for its whole life. The README says so, and points to a reverse proxy and the pre-request handler for untrusted clients.