# HG changeset patch # User Maxim Dounin # Date 1711764624 -10800 # Node ID 07ca679842def8e3f346116e7d60df4c4876c23a # Parent f3df785649aebf967a428b4d736b1317a94f815b HTTP/3: synced request body reading changes to reduce diffs. diff --git a/src/http/v3/ngx_http_v3_request.c b/src/http/v3/ngx_http_v3_request.c --- a/src/http/v3/ngx_http_v3_request.c +++ b/src/http/v3/ngx_http_v3_request.c @@ -1329,6 +1329,7 @@ ngx_http_v3_do_read_client_request_body( c = r->connection; rb = r->request_body; flush = 1; + n = NGX_AGAIN; ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http3 read client request body"); @@ -1432,7 +1433,7 @@ ngx_http_v3_do_read_client_request_body( break; } - if (rb->buf->last < rb->buf->end) { + if (!c->read->ready) { break; } } @@ -1452,7 +1453,7 @@ ngx_http_v3_do_read_client_request_body( break; } - if (!c->read->ready || rb->rest == 0) { + if (n == NGX_AGAIN || !c->read->ready || rb->rest == 0) { clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); ngx_add_timer(c->read, clcf->client_body_timeout);