This is an automated email from the ASF dual-hosted git repository.
mochen pushed a commit to branch 9.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.2.x by this push:
new b789398dd3 Fix connection-level window mismatch causing 408/504
timeouts (#12910)
b789398dd3 is described below
commit b789398dd30e2dbffffdf754df9f0bedf0d2bb88
Author: Katsutoshi Ikenoya <[email protected]>
AuthorDate: Tue Mar 17 05:11:22 2026 +0900
Fix connection-level window mismatch causing 408/504 timeouts (#12910)
---
proxy/http2/Http2ConnectionState.cc | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/proxy/http2/Http2ConnectionState.cc
b/proxy/http2/Http2ConnectionState.cc
index 1999011659..ff1aafe01d 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -93,6 +93,9 @@ rcv_data_frame(Http2ConnectionState &cstate, const Http2Frame
&frame)
Http2StreamDebug(cstate.session, id, "Received DATA frame");
+ // Update connection window size, before any stream specific handling
+ cstate.decrement_server_rwnd(payload_length);
+
if (cstate.get_zombie_event()) {
Warning("Data frame for zombied session %" PRId64,
cstate.session->get_connection_id());
}
@@ -162,7 +165,8 @@ rcv_data_frame(Http2ConnectionState &cstate, const
Http2Frame &frame)
}
// Check whether Window Size is acceptable
- if (!cstate.server_rwnd_is_shrinking && cstate.server_rwnd() <
payload_length) {
+ // compare to 0 because we already decreased the connection rwnd with
payload_length
+ if (!cstate.server_rwnd_is_shrinking && cstate.server_rwnd() < 0) {
return Http2Error(Http2ErrorClass::HTTP2_ERROR_CLASS_CONNECTION,
Http2ErrorCode::HTTP2_ERROR_FLOW_CONTROL_ERROR,
"recv data cstate.server_rwnd < payload_length");
}
@@ -171,8 +175,7 @@ rcv_data_frame(Http2ConnectionState &cstate, const
Http2Frame &frame)
"recv data stream->server_rwnd < payload_length");
}
- // Update Window size
- cstate.decrement_server_rwnd(payload_length);
+ // Update stream window size
stream->decrement_server_rwnd(payload_length);
if (is_debug_tag_set("http2_con")) {