Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read not uff-8 header or body panic #263

Closed
pi-pi-miao opened this issue Sep 27, 2024 · 7 comments
Closed

read not uff-8 header or body panic #263

pi-pi-miao opened this issue Sep 27, 2024 · 7 comments

Comments

@pi-pi-miao
Copy link

2024-09-27T07:46:57.899488Z critical envoy wasm external/envoy/source/extensions/common/wasm/context.cc:1157 wasm log en-888.filter-ratelimit-im-api-automesh-36864: panicked at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/proxy-wasm-0.2.2/src/hostcalls.rs:1220:42:
called Result::unwrap() on an Err value: FromUtf8Error { bytes: [77, 111, 122, 105, 108, 108, 97, 47, 53, 46, 48, 32, 40, 99, 111, 109, 112, 97, 116, 105, 98, 108, 101, 59, 32, 89, 111, 100, 97, 111, 66, 111, 116, 47, 49, 46, 48, 59, 32, 104, 116, 116, 112, 58, 47, 47, 119, 119, 119, 46, 121, 111, 100, 97, 111, 46, 99, 111, 109, 47, 104, 101, 108, 112, 47, 119, 101, 98, 109, 97, 115, 116, 101, 114, 47, 115, 112, 105, 100, 101, 114, 47, 161, 177, 59, 32, 41], error: Utf8Error { valid_up_to: 82, error_len: Some(1) } } thread=74
2024-09-27T07:46:57.899652Z error envoy wasm external/envoy/source/extensions/common/wasm/wasm_vm.cc:38 Function: proxy_on_request_headers failed: Uncaught RuntimeError: unreachable thread=74

@pi-pi-miao
Copy link
Author

手动修复了底层逻辑

@pi-pi-miao
Copy link
Author

手动修复了底层逻辑

把底层转utf8 的 unwraper 去掉了,直接返回Err(status)

@PiotrSikora
Copy link
Member

You should use the variants ending with _bytes() (get_http_request_headers_bytes(), etc.).

@pi-pi-miao
Copy link
Author

You should use the variants ending with _bytes() (get_http_request_headers_bytes(), etc.).

ok,thank you

@pi-pi-miao
Copy link
Author

手动修复了底层逻辑

#264

@pi-pi-miao
Copy link
Author

You should use the variants ending with _bytes() (get_http_request_headers_bytes(), etc.).

I modify code in #264

@pi-pi-miao
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants