apache / apisix-java-plugin-runner

APISIX Plugin Runner in Java
https://apisix.apache.org/
Apache License 2.0
129 stars 95 forks source link

bug: request设置新的body替换客户端原请求body无效 #172

Closed wodingyang closed 2 years ago

wodingyang commented 2 years ago

Issue description

在插件中将客户端发送的body内容替换成新的body无效,后端接受的还是客户端内容

Environment

io.github.ericluoliu apisix-runner-core 0.5.0

Minimal test code / Steps to reproduce the issue

1.客户端发送原始请求,body内容如下: image 2.apisix命中路由后调用java插件,修改body内容 image image 3.查看上游接收到的请求,body内容为客户端发送的原始数据,插件没有替换成功 image

What's the actual result? (including assertion message & call stack if applicable)

日志打印:请求体------------>aaa

What's the expected result?

日志打印:请求体------------>abcdefghijklmnopqrstuvwxyz

tzssangglass commented 2 years ago

ref: https://github.com/apache/apisix-java-plugin-runner/issues/143#issuecomment-1127353544