rproxy: leave no visitor without an answer as the response time runs out (closes #295)
check / check (push) Successful in 3m55s

A visitor could get a closed connection and no answer when
SWRP_MAX_RESPONSE_TIME_MS ran out about when the answer started: the
write deadline passed before the first byte was written.

- An answer rproxy gives itself has at least 10 seconds to be sent.
- An app's answer that arrives once the time has run out is answered
  504.
- Otherwise the app's status and headers are sent at once, before the
  body is read, with at least 10 seconds. The exact limit applies to
  the rest.

Model: opus-5-5
This commit is contained in:
sneak committed 2026-11-10 18:47:35 +00:00
1 parent 8ab4280792
commit eb5f4016aa
5 files changed
+134 -13

No files matched your search

+3 -2
View File
@@ -436,8 +436,9 @@ A time here is a whole number of milliseconds above zero, such as `2000`.
headers, the time until the app has been sent the whole request. A time or
`off`.
- `SWRP_MAX_RESPONSE_TIME_MS` (default `1800000`): how long the answer may take,
from the end of the request to its last byte reaching the visitor. A time or
`off`.
from the end of the request to its last byte reaching the visitor. An answer
`rproxy` gives itself always has at least 10 seconds to be sent, and so do the
status and headers of the app's answer. A time or `off`.
- `SWRP_LISTEN_ADDR` (default `:8080`): where `rproxy` listens, such as `:9000`.
- `SWRP_UPSTREAM_URL` (default `http://127.0.0.1:8081`): the app. An `http` or
`https` URL with a host and an optional port, and nothing more.