]> 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)
committerSergey Kandaurov <pluknet@nginx.com>
Wed, 11 Nov 2026 18:08:26 +0000 (22:08 +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 7bb61311d95e97138687d11fad9cf92cef44ff22..2685af53f717bb07e41080890ab40e0e526eb8c8 100644 (file)
@@ -1351,6 +1351,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");
@@ -1474,7 +1475,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);