mirror of
https://gitee.com/iresty/apisix.git
synced 2024-12-02 03:58:02 +08:00
typo: fixed typo about function. (#2007)
This commit is contained in:
parent
ac69ad3e3a
commit
23bc76b5a0
@ -126,9 +126,9 @@ local function run_plugin(phase, plugins, api_ctx)
|
||||
and phase ~= "body_filter"
|
||||
then
|
||||
for i = 1, #plugins, 2 do
|
||||
local phase_fun = plugins[i][phase]
|
||||
if phase_fun then
|
||||
local code, body = phase_fun(plugins[i + 1], api_ctx)
|
||||
local phase_func = plugins[i][phase]
|
||||
if phase_func then
|
||||
local code, body = phase_func(plugins[i + 1], api_ctx)
|
||||
if code or body then
|
||||
core.response.exit(code, body)
|
||||
end
|
||||
@ -138,9 +138,9 @@ local function run_plugin(phase, plugins, api_ctx)
|
||||
end
|
||||
|
||||
for i = 1, #plugins, 2 do
|
||||
local phase_fun = plugins[i][phase]
|
||||
if phase_fun then
|
||||
phase_fun(plugins[i + 1], api_ctx)
|
||||
local phase_func = plugins[i][phase]
|
||||
if phase_func then
|
||||
phase_func(plugins[i + 1], api_ctx)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -47,9 +47,9 @@ function _M.run(phase, api_ctx)
|
||||
|
||||
core.log.info("loaded script_obj: ", core.json.delay_encode(obj, true))
|
||||
|
||||
local phase_fun = obj[phase]
|
||||
if phase_fun then
|
||||
phase_fun(api_ctx)
|
||||
local phase_func = obj[phase]
|
||||
if phase_func then
|
||||
phase_func(api_ctx)
|
||||
end
|
||||
|
||||
return api_ctx
|
||||
|
@ -74,11 +74,11 @@ hello world
|
||||
[error]
|
||||
--- error_log
|
||||
string "route#1"
|
||||
phase_fun(): hit access phase
|
||||
phase_fun(): hit header_filter phase
|
||||
phase_fun(): hit body_filter phase
|
||||
phase_fun(): hit body_filter phase
|
||||
phase_fun(): hit log phase while
|
||||
phase_func(): hit access phase
|
||||
phase_func(): hit header_filter phase
|
||||
phase_func(): hit body_filter phase
|
||||
phase_func(): hit body_filter phase
|
||||
phase_func(): hit log phase while
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user