]> git.kaiwu.me - nginx.git/commitdiff
Upstream: reset early_hints_length on upstream reinit.
authorDavid Carlier <devnexen@gmail.com>
Sun, 15 Mar 2026 15:56:01 +0000 (15:56 +0000)
committerSergey Kandaurov <s.kandaurov@f5.com>
Mon, 6 Apr 2026 16:59:00 +0000 (20:59 +0400)
When a request was retried to a new upstream after receiving 103
Early Hints from the previous one, the accumulated early_hints_length
was not reset, causing valid early hints from the next upstream to be
incorrectly rejected as "too big".

src/http/ngx_http_upstream.c

index 918323d9bbaea257a598efd75112d397169f56c1..b6456136936be88569704d7910a07575224cd995 100644 (file)
@@ -2067,6 +2067,7 @@ ngx_http_upstream_reinit(ngx_http_request_t *r, ngx_http_upstream_t *u)
         return NGX_ERROR;
     }
 
+    u->early_hints_length = 0;
     u->keepalive = 0;
     u->upgrade = 0;
     u->error = 0;