]> git.kaiwu.me - nginx.git/commit
SCGI: fixed passing CONTENT_LENGTH in unbuffered mode.
authorSergey Kandaurov <pluknet@nginx.com>
Fri, 30 Jan 2026 13:06:38 +0000 (17:06 +0400)
committerSergey Kandaurov <s.kandaurov@f5.com>
Tue, 17 Feb 2026 13:45:29 +0000 (17:45 +0400)
commitec714d52bd4914d52a113234c16e1855d9ac7dcf
tree6256282177d526a0cd885b14f78cce13f8c8bfea
parentbf0508fabfbfa2fa778edbf5b94d5c54a952156d
SCGI: fixed passing CONTENT_LENGTH in unbuffered mode.

Passing requests to SCGI uses a recalculated size of a request body
as per changes made in d60b8d10f (1.3.9) to support CONTENT_LENGTH
with chunked body requests.  This, however, is not compatible with
unbuffered mode introduced later in 7ec559df5 (1.7.11), where such
an approach may not always represent complete request body.

The fix is to use r->headers_in.content_length_n representing either
original Content-Length, if any, or a recalculated value from request
body filters, such as chunked body filter.

Reported by Mufeed VH.
src/http/modules/ngx_http_scgi_module.c