# HG changeset patch # User Maxim Dounin <mdou...@mdounin.ru> # Date 1710526258 -10800 # Fri Mar 15 21:10:58 2024 +0300 # Node ID 9580cb3029058154973dd7b28c9da709c5bc3e31 # Parent ece1df3184a22241682cb5ee8402dbb79015b204 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); -- nginx-devel mailing list nginx-devel@freenginx.org https://freenginx.org/mailman/listinfo/nginx-devel