]> git.kaiwu.me - njs.git/commit
HTTP: fixed internalRedirect() in js_access.
authorDmitry Volyntsev <xeioex@nginx.com>
Thu, 14 May 2026 23:10:33 +0000 (16:10 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Fri, 15 May 2026 01:17:31 +0000 (18:17 -0700)
commitf6afbf3733766a2a224d3cd9867afdc0f7179721
treeba4b9e53482811cd6193b5935445e51f0c8f9f5a
parent26a79e5307a07a2c4ec92acbd9d978f1a7b991cc
HTTP: fixed internalRedirect() in js_access.

Previously, r.internalRedirect() only stored the redirect URI and set
ctx->status to NGX_DONE.  The stored URI was handled only by the js_content
finalization path.

As a result, when internalRedirect() was called from js_access, the access
handler returned NGX_DONE to the phase engine without starting the redirect,
leaving the request unfinished.

Now the internal redirect handling is shared by js_access and js_content, so
internalRedirect() works consistently in both handlers.
nginx/ngx_http_js_module.c
nginx/t/js_access.t