]> git.kaiwu.me - nginx.git/commitdiff
HTTP/3: explicit handling of NGX_AGAIN
authorRoman Arutyunyan <arut@nginx.com>
Tue, 27 Oct 2026 11:02:12 +0000 (15:02 +0400)
committerRoman Arutyunyan <arutyunyan.roman@gmail.com>
Wed, 11 Nov 2026 12:15:24 +0000 (16:15 +0400)
Following the previous change, this change adds explicit handling
of NGX_AGAIN while reading HTTP/3 request body for the sake of
correctness.

src/http/v3/ngx_http_v3_request.c

index 6b487289ab7040669310459402ac23f3615bc9bb..8cef80b42c6dcf693e05cc2e4f6da586fd903966 100644 (file)
@@ -1391,6 +1391,7 @@ ngx_http_v3_do_read_client_request_body(ngx_http_request_t *r)
     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");
@@ -1514,7 +1515,7 @@ ngx_http_v3_do_read_client_request_body(ngx_http_request_t *r)
             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);