This is an automated email from the ASF dual-hosted git repository. nickva pushed a commit to branch fix-stale-body-time in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 7a842aa8d87ee750eea2dae884b3484a162abafa Author: Nick Vatamaniuc <[email protected]> AuthorDate: Thu Nov 5 15:20:29 2026 -0500 Make sure to reset body_time after handling each request Otherwise if keep-alive the connection we might not clear this and get wrong value returned with the next request --- src/chttpd/src/chttpd.erl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/chttpd/src/chttpd.erl b/src/chttpd/src/chttpd.erl index 645083591..80f15005c 100644 --- a/src/chttpd/src/chttpd.erl +++ b/src/chttpd/src/chttpd.erl @@ -230,6 +230,9 @@ stop() -> handle_request(MochiReq0) -> erlang:put(?REWRITE_COUNT, 0), + % Mochiweb handles all requests on a keep-alive connection in the same + % process, so don't report the previous request's body time. + erlang:erase(body_time), MochiReq = couch_httpd_vhost:dispatch_host(MochiReq0), handle_request_int(MochiReq).
