Upload idle bound does not enforce a minimum rate: a 1-byte-per-59-s drip still holds a receive slot #64

Open
opened 2026-10-04 20:58:04 +00:00 by mathias · 0 comments
Owner

Residual of #56 (PR #63). The fix re-arms the connection read deadline on every body read (App.UploadIdleTimeout, 60 s). That bounds silence, not throughput. A client that sends one byte every 59 s keeps its receive slot (#47) and spool file for as long as it keeps doing so. Two such bodies take a user's two slots.

Possible control: a minimum average rate checked over a window (e.g. fewer than N KiB in the last M seconds fails the read with a client-read error), or an absolute wall-clock cap derived from MaxBytes / a floor rate. Red test first: a body that drips below the floor rate is cut off and frees its slot, while a slow body above the floor is accepted.

Source pointer: internal/web/uploads.go idleDeadlineBody; ADR-033 receive-limits paragraph in DECISIONS.md (amended 2026-10-04) records this limitation. Still needs a valid session, same as #56. risk/medium (control code).


Created via git-mcp on behalf of @mathias

Residual of #56 (PR #63). The fix re-arms the connection read deadline on every body read (`App.UploadIdleTimeout`, 60 s). That bounds *silence*, not throughput. A client that sends one byte every 59 s keeps its receive slot (#47) and spool file for as long as it keeps doing so. Two such bodies take a user's two slots. **Possible control:** a minimum average rate checked over a window (e.g. fewer than N KiB in the last M seconds fails the read with a client-read error), or an absolute wall-clock cap derived from `MaxBytes` / a floor rate. Red test first: a body that drips below the floor rate is cut off and frees its slot, while a slow body above the floor is accepted. **Source pointer:** `internal/web/uploads.go` `idleDeadlineBody`; ADR-033 receive-limits paragraph in DECISIONS.md (amended 2026-10-04) records this limitation. Still needs a valid session, same as #56. risk/medium (control code). --- _Created via git-mcp on behalf of @mathias_
mathias added the risk/mediumtype/fix labels 2026-10-04 20:58:04 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mathias/tapir#64