proxy-wasm-rust-sdk icon indicating copy to clipboard operation
proxy-wasm-rust-sdk copied to clipboard

Use RFC-compliant HeaderValue type.

Open PiotrSikora opened this issue 1 year ago • 3 comments

When "header-value" feature is enabled, a RFC-compliant HeaderValue type is used instead of the previously used UTF-8 String type.

Since HTTP field values aren't UTF-8 encoded, using the String type meant that a plugin would crash when valid, but obsolete, non-UTF-8 characters were present in HTTP headers and/or trailers.

This feature is currently optional to avoid breaking changes and to help with migration, but it will become a default feature in v0.3.

The HeaderValue type is re-exported from the http crate.

PiotrSikora avatar Oct 28 '24 22:10 PiotrSikora

@mpwarres could we get someone from Google to convert Rust tests in Envoy to use the header-value feature (it's already exposed via @proxy_wasm_rust_sdk//:proxy_wasm_header_value Bazel target), to verify that I didn't miss anything obvious, before we merge this PR? I converted some tests when I originally wrote this PR, which was a while ago, so the basics do work, but it wasn't a rewrite of everything.

PiotrSikora avatar Jun 05 '25 18:06 PiotrSikora

@mpwarres could we get someone from Google to convert Rust tests in Envoy to use the header-value feature (it's already exposed via @proxy_wasm_rust_sdk//:proxy_wasm_header_value Bazel target), to verify that I didn't miss anything obvious, before we merge this PR? I converted some tests when I originally wrote this PR, which was a while ago, so the basics do work, but it wasn't a rewrite of everything.

Sorry, I somehow missed this earlier. Yes, we will work on this now.

mpwarres avatar Jun 26 '25 13:06 mpwarres

Sorry, I somehow missed this earlier. Yes, we will work on this now.

Thanks!

PiotrSikora avatar Jun 26 '25 15:06 PiotrSikora