diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c index 4bfee589a..8e3fdbd17 100644 --- a/src/http/v2/ngx_http_v2.c +++ b/src/http/v2/ngx_http_v2.c @@ -4342,7 +4342,9 @@ ngx_http_v2_read_client_request_body_handler(ngx_http_request_t *r) window = buf->end - buf->start; - if (h2c->state.stream == stream) { + if (h2c->state.stream == stream + && h2c->state.handler == ngx_http_v2_state_read_data) + { window -= h2c->state.length; }