You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I turn on kafka-logger and body-transformer at the same time, the response body conversion of body-transformer plugin will fail. After turning off kafka-logger, body-transformer plug-in will fail
Expected Behavior
I hope that when I turn on kafka-logger and body-transformer at the same time, both will work properly at the same time
Error Logs
When I turn on kafka-logger and body-transformer at the same time,By tracking the source code log,I found that when the body-transformer plugin code went to body_filter, it got an empty response table, so the conversion failed, but the request was still successful, but no response body was returned
function M.body_filter(, ctx)
local conf = ctx.body_transformer_conf
if conf.response then
local body = core.response.hold_body_chunk(ctx)
core.log.error(cjson.encode(body))
if ngx.arg[2] == false and not body then
return
end
local out = transform(conf, body, "response", ctx)
if not out then
core.log.error("failed to transform response body: ", body)
return
end
ngx.arg[1] = out
end
end
Steps to Reproduce
1.Enable plug-ins kafka-logger and body-transformer at the same time
2.The upstream service is a webservice
3.By configuring body-transformer, you mainly convert the xml response body to the json response body
Environment
APISIX version (run apisix version):apache/apisix-3.2.0-debian
Operating system (run uname -a):Linux new 3.10.0-1127.el7.x86_64 change: added doc of how to load plugin. #1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
OpenResty / Nginx version (run openresty -V or nginx -V):nginx version: openresty/1.21.4.1
etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):3.5.0
APISIX Dashboard version, if relevant:apache/apisix-dashboard 3.0.0-alpine
Plugin runner version, for issues related to plugin runners:
LuaRocks version, for installation issues (run luarocks --version):
The text was updated successfully, but these errors were encountered:
Current Behavior
When I turn on kafka-logger and body-transformer at the same time, the response body conversion of body-transformer plugin will fail. After turning off kafka-logger, body-transformer plug-in will fail
Expected Behavior
I hope that when I turn on kafka-logger and body-transformer at the same time, both will work properly at the same time
Error Logs
When I turn on kafka-logger and body-transformer at the same time,By tracking the source code log,I found that when the body-transformer plugin code went to body_filter, it got an empty response table, so the conversion failed, but the request was still successful, but no response body was returned
function M.body_filter(, ctx)
local conf = ctx.body_transformer_conf
if conf.response then
local body = core.response.hold_body_chunk(ctx)
core.log.error(cjson.encode(body))
if ngx.arg[2] == false and not body then
return
end
end
Steps to Reproduce
1.Enable plug-ins kafka-logger and body-transformer at the same time
2.The upstream service is a webservice
3.By configuring body-transformer, you mainly convert the xml response body to the json response body
Environment
apisix version
):apache/apisix-3.2.0-debianuname -a
):Linux new 3.10.0-1127.el7.x86_64 change: added doc of how to load plugin. #1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linuxopenresty -V
ornginx -V
):nginx version: openresty/1.21.4.1curl http://127.0.0.1:9090/v1/server_info
):3.5.0luarocks --version
):The text was updated successfully, but these errors were encountered: