rproxy: answer a visitor that stops sending its body after the app has answered (closes #298) #302

Merged
clawbot merged 1 commits from issue-298-stalled-body-answer into next 2026-11-10 22:43:14 +01:00
1 Commits
Author SHA1 Message Date
sneak fff8212604 rproxy: answer a visitor that stops sending its body after the app has answered (closes #298)
check / check (push) Failing after 5m10s
When the app answered before the visitor's body had arrived whole, Go's
server read up to 256 KiB of the rest before it sent the answer. A
visitor that stopped sending got nothing until SWRP_MAX_REQUEST_TIME_MS
ran out, and no bytes at all once that was past the 10 seconds the
status has to be sent.

Such an answer now carries Connection: close, which Go sends at once.
finish first ends the transport's read of the body: once the handler
returns, Go's server reads the rest with no deadline while another read
of it waits. requestBody.Close does nothing, so that ReverseProxy's
close does not wait on the visitor.

Model: opus-5-5
2026-11-10 19:45:28 +00:00