Skip to content

When call ProxyOnRequestHeaders get wrong action  #14

Open
@Taction

Description

action

cd example and replace the wasm file to new file which handles HTTP headers like this. Then go run . run the example.

expected behaviour

If the header hit, Action::Pause will be returned from wasm side. ActionPause will be returned by the function ProxyOnRequestHeaders.

actual behaviour

Regardless of whether the expected header appears. ActionContinue will be returned by the function ProxyOnRequestHeaders

about the code

I noticed that the action ProxyOnRequestHeaders returned is actually from CallWasmFunction, and res is ignored.

Whether action should be ignored, the value of res should be converted into action format and returned. And what is a.Imports.Wait() actually do, is there any example for it?

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions