Try to preserve header casing in HTTP/1.1.

Unfortunately, this doesn't actually do anything at the moment due to
what appears to be a bug in hyper.
This commit is contained in:
Sergio Benitez 2021-06-08 17:51:39 -07:00
parent 1a42009e9f
commit 6206a46222
2 changed files with 2 additions and 1 deletions

View File

@ -43,7 +43,7 @@ cookie = { version = "0.15", features = ["percent-encode"] }
state = "0.5.1"
[dependencies.hyper]
version = "0.14.5"
version = "0.14.9"
default-features = false
features = ["http1", "http2", "runtime", "server", "stream"]

View File

@ -421,6 +421,7 @@ impl Rocket<Orbit> {
let listener = CancellableListener::new(shutdown.clone(), listener, grace, mercy);
let server = hyper::Server::builder(Incoming::new(listener))
.http1_keepalive(http1_keepalive)
.http1_preserve_header_case(true)
.http2_keep_alive_interval(http2_keep_alive)
.serve(hyper::make_service_fn(service_fn))
.with_graceful_shutdown(shutdown.clone())