-
|
描述:目前有个场景,需要读取请求体,然后修改请求头,但是在onHttpRequestHeaders 返回return types.HeaderStopIteration,日志显示阻塞住,没有执行到 onHttpRequestBody,180s 后 stream timeout import ( ) const ( func main() { func onHttpRequestHeaders(ctx wrapper.HttpContext, config config.TestConfig, log wrapper.Log) types.Action { } func onHttpRequestBody(ctx wrapper.HttpContext, config config.TestConfig, body []byte, log wrapper.Log) types.Action { } func handleJsonBody(ctx wrapper.HttpContext, config config.TestConfig, body []byte, log wrapper.Log) types.Action { } go 依赖: require ( require ( higress 运行版本: v2.0.7 Description: There is currently a scenario where the request body needs to be read and then the request headers modified. However, onHttpRequestHeaders returns return types.HeaderStopIteration. The log shows that it is blocked and onHttpRequestBody is not executed. The stream timeout occurs after 180s. import ( ) const ( func main() { func onHttpRequestHeaders(ctx wrapper.HttpContext, config config.TestConfig, log wrapper.Log) types.Action { } func onHttpRequestBody(ctx wrapper.HttpContext, config config.TestConfig, body []byte, log wrapper.Log) types.Action { } func handleJsonBody(ctx wrapper.HttpContext, config config.TestConfig, body []byte, log wrapper.Log) types.Action { } go dependencies: require ( require ( higress running version: v2.0.7 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
|
You can update following dependencies to the given versions, and remove the dependency to github.com/higress-group/proxy-wasm-go-sdk v0.0.0-20251103120604-77e9cce339d2
github.com/higress-group/wasm-go v1.0.10-0.20260120033417-1c84f010156d |
Beta Was this translation helpful? Give feedback.
-
|
BTW, how do you send the test request? |
Beta Was this translation helpful? Give feedback.
我好想知道原因了,tinygo 编译的时候需要添加 EXTRA_TAGS=proxy_wasm_version_0_2_100 才会生效
I really want to know the reason. When compiling tinygo, you need to add EXTRA_TAGS=proxy_wasm_version_0_2_100 for it to take effect