feat(server): implement forgotten settings for case preserving

This commit is contained in:
Anthony Ramine
2021-04-22 09:13:51 +02:00
committed by Sean McArthur
parent a303b3c329
commit 4fd6c4cb0b
3 changed files with 41 additions and 2 deletions

View File

@@ -244,6 +244,19 @@ impl<I, E> Builder<I, E> {
self
}
/// Set whether HTTP/1 connections will write header names as provided
/// at the socket level.
///
/// Note that this setting does not affect HTTP/2.
///
/// Default is false.
#[cfg(feature = "http1")]
#[cfg_attr(docsrs, doc(cfg(feature = "http1")))]
pub fn http1_preserve_header_case(mut self, val: bool) -> Self {
self.protocol.http1_preserve_header_case(val);
self
}
/// Sets whether HTTP/1 is required.
///
/// Default is `false`.