Skip to content

feat(prefix): update the list of yieldable phases#73

Open
HanadaLee wants to merge 1 commit intoKong:masterfrom
HanadaLee:more_can_yield_phases
Open

feat(prefix): update the list of yieldable phases#73
HanadaLee wants to merge 1 commit intoKong:masterfrom
HanadaLee:more_can_yield_phases

Conversation

@HanadaLee
Copy link
Copy Markdown

@HanadaLee HanadaLee commented Apr 8, 2026

add precontent, proxy_ssl_cert and proxy_ssl_verify phases. They are newly introduced phases.
rename ssl_certificate to ssl_cert, because the api ngx.get_phase use ssl_cert instead of ssl_certificate.

see also
https://github.com/openresty/lua-resty-core/blob/master/lib/resty/core/phase.lua

local context_names = {
    [0x00000001] = "set",
    [0x00000002] = "rewrite",
    [0x00000004] = "access",
    [0x00000008] = "content",
    [0x00000010] = "log",
    [0x00000020] = "header_filter",
    [0x00000040] = "body_filter",
    [0x00000080] = "timer",
    [0x00000100] = "init_worker",
    [0x00000200] = "balancer",
    [0x00000400] = "ssl_cert",
    [0x00000800] = "ssl_session_store",
    [0x00001000] = "ssl_session_fetch",
    [0x00002000] = "exit_worker",
    [0x00004000] = "ssl_client_hello",
    [0x00008000] = "server_rewrite",
    [0x00010000] = "proxy_ssl_verify",
    [0x00020000] = "precontent",
    [0x00040000] = "proxy_ssl_cert",
}

https://github.com/openresty/lua-nginx-module/blob/master/src/ngx_http_lua_util.h

#define NGX_HTTP_LUA_CONTEXT_YIELDABLE (NGX_HTTP_LUA_CONTEXT_REWRITE         \
                                | NGX_HTTP_LUA_CONTEXT_SERVER_REWRITE        \
                                | NGX_HTTP_LUA_CONTEXT_ACCESS                \
                                | NGX_HTTP_LUA_CONTEXT_PRECONTENT            \
                                | NGX_HTTP_LUA_CONTEXT_CONTENT               \
                                | NGX_HTTP_LUA_CONTEXT_TIMER                 \
                                | NGX_HTTP_LUA_CONTEXT_PROXY_SSL_CERT        \
                                | NGX_HTTP_LUA_CONTEXT_PROXY_SSL_VERIFY      \
                                | NGX_HTTP_LUA_CONTEXT_SSL_CLIENT_HELLO      \
                                | NGX_HTTP_LUA_CONTEXT_SSL_CERT              \
                                | NGX_HTTP_LUA_CONTEXT_SSL_SESS_FETCH)

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