feat(http1): add options to preserve header casing (#2480)
Decouple preserving header case from FFI: The feature is now supported in both the server and the client and can be combined with the title case feature, for headers which don't have entries in the header case map. Closes #2313
This commit is contained in:
@@ -106,8 +106,11 @@ unsafe impl AsTaskType for hyper_clientconn {
|
||||
ffi_fn! {
|
||||
/// Creates a new set of HTTP clientconn options to be used in a handshake.
|
||||
fn hyper_clientconn_options_new() -> *mut hyper_clientconn_options {
|
||||
let mut builder = conn::Builder::new();
|
||||
builder.h1_preserve_header_case(true);
|
||||
|
||||
Box::into_raw(Box::new(hyper_clientconn_options {
|
||||
builder: conn::Builder::new(),
|
||||
builder,
|
||||
exec: WeakExec::new(),
|
||||
}))
|
||||
} ?= std::ptr::null_mut()
|
||||
|
||||
Reference in New Issue
Block a user