Unverified Commit 5a2f6f11 authored by Alexander Polakov's avatar Alexander Polakov Committed by GitHub
Browse files

fix(http_server): in http2 host is not passed in headers (#866)

parent 49f260eb
Pipeline #212030 passed with stages
in 5 minutes and 15 seconds
......@@ -449,6 +449,10 @@ impl<L: Logger> ServiceData<L> {
let host = match http_helpers::read_header_value(request.headers(), "host") {
Some(origin) => origin,
None if request.version() == hyper::Version::HTTP_2 => match request.uri().host() {
Some(origin) => origin,
None => return response::malformed(),
},
None => return response::malformed(),
};
let maybe_origin = http_helpers::read_header_value(request.headers(), "origin");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment