Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd filter to get the host or :authority #432
Comments
|
hum, doesn't seem to me this is a bug, when warp is serving using TLS, clients offer Http2 using ALPN, hyper then upgrades the connection to Http2, and per the Http2 spec:
accessing the host via |
|
Thanks, I will try both when I get home. |
|
I first tried extracting
Other info:
However, |
|
Oops, nevermind. It looks like |
|
ah! you are right! struct FulllPath(String)instead pub fn full() -> impl Filter<Extract = One<FullPath>, Error = Infallible> + Copy {
filter_fn(move |route| {
future::ok(one(FullPath(route.uri().to_string())))
})
}cc @seanmonstar |
|
We could add a Probably return some newtype |
|
ah yeah, totally forgot that changing |
It appears that when using TLS with Warp, the HTTP Host header is stripped. Therefore,
warp::header<String>("host")on a TLS server will fail.Ironically, the Haskell framework with the same name had an identical bug: yesodweb/wai#478