Skip to content

bugfix: change return values to NGX_DECLINED in precontent_by_lua#2510

Merged
zhuizhuhaomeng merged 1 commit into
openresty:masterfrom
HanadaLee:fixed_precontent_by_lua_no_postpone
Jun 20, 2026
Merged

bugfix: change return values to NGX_DECLINED in precontent_by_lua#2510
zhuizhuhaomeng merged 1 commit into
openresty:masterfrom
HanadaLee:fixed_precontent_by_lua_no_postpone

Conversation

@HanadaLee

Copy link
Copy Markdown
Contributor

NGX_HTTP_PRECONTENT_PHASE uses ngx_http_core_generic_phase. Previous implementations were ported from access_by_lua*, and the handler would return NGX_OK at the end. If "preaccess_by_lua_no_postpone on;" is configured, subsequent handlers in the same phase would be skipped. Therefore, it should return NGX_DECLINED instead.

I hereby granted the copyright of the changes in this pull request
to the authors of this lua-nginx-module project.

@HanadaLee HanadaLee force-pushed the fixed_precontent_by_lua_no_postpone branch 2 times, most recently from c0b3de3 to a5b695f Compare June 20, 2026 07:30
NGX_HTTP_PRECONTENT_PHASE uses ngx_http_core_generic_phase.
Previous implementations were ported from access_by_lua*, and the handler
would return NGX_OK at the end. If "preaccess_by_lua_no_postpone on;"
is configured, subsequent handlers in the same phase would be skipped.
Therefore, it should return NGX_DECLINED instead.
@HanadaLee HanadaLee force-pushed the fixed_precontent_by_lua_no_postpone branch from a5b695f to b808a29 Compare June 20, 2026 08:02
@zhuizhuhaomeng zhuizhuhaomeng merged commit 9afd7d0 into openresty:master Jun 20, 2026
7 checks passed
@HanadaLee HanadaLee deleted the fixed_precontent_by_lua_no_postpone branch June 20, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants