-
Notifications
You must be signed in to change notification settings - Fork 108
Use RFC-compliant HeaderValue type. #287
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
9e1c348
0542a78
3e9b789
9bf47e6
17b8b75
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,13 @@ | |
[license-badge]: https://img.shields.io/github/license/proxy-wasm/proxy-wasm-rust-sdk | ||
[license-link]: https://github.com/proxy-wasm/proxy-wasm-rust-sdk/blob/main/LICENSE | ||
|
||
## Crate features | ||
|
||
This crate supports the following optional features: | ||
|
||
- `header-value` - uses RFC-compliant `HeaderValue` instead of UTF-8 `String` for HTTP header and trailer values. | ||
This will become the default in future releases. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that this PR doesn't introduce any changes or restrictions on header names in the SDK, since all valid HTTP field names are also valid UTF-8 strings, and proxies are very strict about this, so we never panic deserializing header names. Having said that, I'm tempted to use Unfortunately, because we're passing HTTP/2 pseudo-headers (
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's unfortunate that If there isn't any good external precedent, maybe (1), in the form of an enum type that can either be an http::HeaderName or a pseudo-header? Or would There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Pseudo-headers are a wire-format detail, and they are not intermixed with HTTP headers in any library or language that I'm aware of (other than Envoy), so that's not an issue that other people run into.
My other concern was that even if we "patch" I think we should separate them, at the very least at the SDK level, otherwise we're just propagating this Envoy-ism and making it hard-to-impossible to interoperate with the generic HTTP libraries available in various languages. I'm sure this isn't helpful in Go SDK either. |
||
|
||
## Examples | ||
|
||
- [Hello World](./examples/hello_world/) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
############################################################################### | ||
# @generated | ||
# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To | ||
# regenerate this file, run the following: | ||
# | ||
# bazel run @//bazel/cargo:crates_vendor | ||
############################################################################### | ||
|
||
load("@rules_rust//rust:defs.bzl", "rust_library") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
rust_library( | ||
name = "bytes", | ||
srcs = glob( | ||
include = ["**/*.rs"], | ||
allow_empty = True, | ||
), | ||
compile_data = glob( | ||
include = ["**"], | ||
allow_empty = True, | ||
exclude = [ | ||
"**/* *", | ||
".tmp_git_root/**/*", | ||
"BUILD", | ||
"BUILD.bazel", | ||
"WORKSPACE", | ||
"WORKSPACE.bazel", | ||
], | ||
), | ||
crate_features = [ | ||
"default", | ||
"std", | ||
], | ||
crate_root = "src/lib.rs", | ||
edition = "2018", | ||
rustc_flags = [ | ||
"--cap-lints=allow", | ||
], | ||
tags = [ | ||
"cargo-bazel", | ||
"crate-name=bytes", | ||
"manual", | ||
"noclippy", | ||
"norustfmt", | ||
], | ||
target_compatible_with = select({ | ||
"@rules_rust//rust/platform:aarch64-apple-darwin": [], | ||
"@rules_rust//rust/platform:aarch64-apple-ios": [], | ||
"@rules_rust//rust/platform:aarch64-apple-ios-sim": [], | ||
"@rules_rust//rust/platform:aarch64-fuchsia": [], | ||
"@rules_rust//rust/platform:aarch64-linux-android": [], | ||
"@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], | ||
"@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], | ||
"@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [], | ||
"@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [], | ||
"@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], | ||
"@rules_rust//rust/platform:armv7-linux-androideabi": [], | ||
"@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], | ||
"@rules_rust//rust/platform:i686-apple-darwin": [], | ||
"@rules_rust//rust/platform:i686-linux-android": [], | ||
"@rules_rust//rust/platform:i686-pc-windows-msvc": [], | ||
"@rules_rust//rust/platform:i686-unknown-freebsd": [], | ||
"@rules_rust//rust/platform:i686-unknown-linux-gnu": [], | ||
"@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], | ||
"@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], | ||
"@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], | ||
"@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], | ||
"@rules_rust//rust/platform:thumbv7em-none-eabi": [], | ||
"@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], | ||
"@rules_rust//rust/platform:wasm32-unknown-unknown": [], | ||
"@rules_rust//rust/platform:wasm32-wasi": [], | ||
"@rules_rust//rust/platform:x86_64-apple-darwin": [], | ||
"@rules_rust//rust/platform:x86_64-apple-ios": [], | ||
"@rules_rust//rust/platform:x86_64-fuchsia": [], | ||
"@rules_rust//rust/platform:x86_64-linux-android": [], | ||
"@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], | ||
"@rules_rust//rust/platform:x86_64-unknown-freebsd": [], | ||
"@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], | ||
"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [], | ||
"@rules_rust//rust/platform:x86_64-unknown-none": [], | ||
"//conditions:default": ["@platforms//:incompatible"], | ||
}), | ||
version = "1.8.0", | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
############################################################################### | ||
# @generated | ||
# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To | ||
# regenerate this file, run the following: | ||
# | ||
# bazel run @//bazel/cargo:crates_vendor | ||
############################################################################### | ||
|
||
load("@rules_rust//rust:defs.bzl", "rust_library") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
rust_library( | ||
name = "fnv", | ||
srcs = glob( | ||
include = ["**/*.rs"], | ||
allow_empty = True, | ||
), | ||
compile_data = glob( | ||
include = ["**"], | ||
allow_empty = True, | ||
exclude = [ | ||
"**/* *", | ||
".tmp_git_root/**/*", | ||
"BUILD", | ||
"BUILD.bazel", | ||
"WORKSPACE", | ||
"WORKSPACE.bazel", | ||
], | ||
), | ||
crate_features = [ | ||
"default", | ||
"std", | ||
], | ||
crate_root = "lib.rs", | ||
edition = "2015", | ||
rustc_flags = [ | ||
"--cap-lints=allow", | ||
], | ||
tags = [ | ||
"cargo-bazel", | ||
"crate-name=fnv", | ||
"manual", | ||
"noclippy", | ||
"norustfmt", | ||
], | ||
target_compatible_with = select({ | ||
"@rules_rust//rust/platform:aarch64-apple-darwin": [], | ||
"@rules_rust//rust/platform:aarch64-apple-ios": [], | ||
"@rules_rust//rust/platform:aarch64-apple-ios-sim": [], | ||
"@rules_rust//rust/platform:aarch64-fuchsia": [], | ||
"@rules_rust//rust/platform:aarch64-linux-android": [], | ||
"@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], | ||
"@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], | ||
"@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [], | ||
"@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [], | ||
"@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], | ||
"@rules_rust//rust/platform:armv7-linux-androideabi": [], | ||
"@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], | ||
"@rules_rust//rust/platform:i686-apple-darwin": [], | ||
"@rules_rust//rust/platform:i686-linux-android": [], | ||
"@rules_rust//rust/platform:i686-pc-windows-msvc": [], | ||
"@rules_rust//rust/platform:i686-unknown-freebsd": [], | ||
"@rules_rust//rust/platform:i686-unknown-linux-gnu": [], | ||
"@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], | ||
"@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], | ||
"@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], | ||
"@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], | ||
"@rules_rust//rust/platform:thumbv7em-none-eabi": [], | ||
"@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], | ||
"@rules_rust//rust/platform:wasm32-unknown-unknown": [], | ||
"@rules_rust//rust/platform:wasm32-wasi": [], | ||
"@rules_rust//rust/platform:x86_64-apple-darwin": [], | ||
"@rules_rust//rust/platform:x86_64-apple-ios": [], | ||
"@rules_rust//rust/platform:x86_64-fuchsia": [], | ||
"@rules_rust//rust/platform:x86_64-linux-android": [], | ||
"@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], | ||
"@rules_rust//rust/platform:x86_64-unknown-freebsd": [], | ||
"@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], | ||
"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [], | ||
"@rules_rust//rust/platform:x86_64-unknown-none": [], | ||
"//conditions:default": ["@platforms//:incompatible"], | ||
}), | ||
version = "1.0.7", | ||
) |
Uh oh!
There was an error while loading. Please reload this page.