]> git.kaiwu.me - nginx.git/commit
Improved ngx_http_subrequest() error handling.
authorSergey Kandaurov <pluknet@nginx.com>
Tue, 11 Feb 2025 18:54:04 +0000 (22:54 +0400)
committerpluknet <pluknet@nginx.com>
Thu, 20 Feb 2025 20:04:12 +0000 (00:04 +0400)
commitd25139db01b636a8212c13e1feeca37eaadad0b5
tree9552074bbf881a314a1ad50d4f3514451f39321e
parentf51e2de6fe303506538ba939e9071a11387d8275
Improved ngx_http_subrequest() error handling.

Previously, request might be left in inconsistent state in case of error,
which manifested in "http request count is zero" alerts when used by SSI
filter.

The fix is to reshuffle initialization order to postpone committing state
changes until after any potentially failing parts.

Found by bad memory allocator simulation.
src/http/ngx_http_core_module.c