Use RFC-compliant HeaderValue type.
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.
@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.
@mpwarres could we get someone from Google to convert Rust tests in Envoy to use the
header-valuefeature (it's already exposed via@proxy_wasm_rust_sdk//:proxy_wasm_header_valueBazel 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.
Sorry, I somehow missed this earlier. Yes, we will work on this now.
Thanks!