Files
soundcraft/apps
SteamSmithandClaude Opus 5.5 4fd015f836 control server: bound request lines and concurrent connections
Request lines were read with BufRead::lines, which buffers a whole line
before anything looks at its length, and every accepted connection got its
own thread with no limit.

- Read each line with a bounded read: a line longer than MAX_LINE
  (256 MiB) is refused with an error reply and the connection
  closed, without buffering the rest of it.
- Serve at most MAX_CONNECTIONS (16) connections at once; further ones get
  an error line and are closed. A slot is released when its connection
  ends, including when its thread can't start or panics.

Request handling is otherwise unchanged. Adds tests for the line limit,
CRLF and final-line handling, an end-to-end request over loopback, and the
connection cap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:13:09 -04:00
..