Skip to content

feature: ngx.get_phase(): add the server_name_resolver phase. - #549

Draft
climagabriel wants to merge 1 commit into
openresty:masterfrom
climagabriel:server-name-resolver-phase
Draft

climagabriel wants to merge 1 commit into
openresty:masterfrom
climagabriel:server-name-resolver-phase

Conversation

@climagabriel

Copy link
Copy Markdown
Contributor

Adds the phase name server_name_resolver to ngx.get_phase(), for the context NGX_HTTP_LUA_CONTEXT_SERVER_NAME_RESOLVER that openresty/lua-nginx-module#2548 (lua-nginx-module) adds for server_name_resolver_by_lua_block. openresty/lua-nginx-module#2548 depends on an nginx core change, nginx/nginx#1972. Neither is merged; this one should not merge first.

The change is one entry in lib/resty/core/phase.lua and one test, TEST 2 in t/phase.t. The value, 0x00080000, must match openresty/lua-nginx-module#2548.

Without the entry, ngx.get_phase() in the directive's chunk raises unknown phase: 524288 (0x00080000).

Testing, on plain nginx 1.31.8 (not an OpenResty release); only t/phase.t was run:

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

This is the context of the server_name_resolver_by_lua_block directive of
lua-nginx-module, NGX_HTTP_LUA_CONTEXT_SERVER_NAME_RESOLVER (0x00080000).
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.

1 participant