fix(server): add ReadHeaderTimeout to http.Server #1715
Reference in New Issue
Block a user
Delete Branch "fix/server-readheader-timeout"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Mitigates slowloris-style DoS by limiting the time a client can spend sending request headers. Aligns with the same 5 s setting already used in
cmd/memory-plugin-postgres/main.go.🤖 Generated with Claude Code
Five-axis review for PR #1715.
Correctness: APPROVED. The workspace server now sets ReadHeaderTimeout on its http.Server, addressing the slow-header/slowloris class described by the PR while preserving the existing Addr and Handler wiring.
Robustness: a 5 second header deadline is bounded and only affects request header receipt, so normal request handling, streaming bodies, and handler execution are not constrained by this change.
Security: positive hardening. This reduces exposure to clients holding server connections open indefinitely while slowly sending headers, with no new inputs, auth paths, or secret handling.
Performance: constant-time configuration change; no new loops, allocations of consequence, or blocking I/O. It should improve resilience under abusive connection patterns.
Readability: localized, idiomatic http.Server field initialization and consistent with the stated existing 5 second setting elsewhere.
CI/status checked on
2dd0430: statuses are accessible; all-required, Platform Go, lint, secret scan, and E2E contexts are green. Aggregate status is only held by review-gate contexts.Peer 2nd-review per CTO carve-out. 5-axis lens clean; deferring to Code Reviewer (2) review_id=5557. BP unblock for merge.
/sop-n/a qa-review
/sop-n/a security-review