Skip to content

Commit

Permalink
fix(http_server): in http2 host is not passed in headers
Browse files Browse the repository at this point in the history
  • Loading branch information
polachok committed Aug 29, 2022
1 parent 42930f0 commit fa3b653
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion http-server/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ impl<L: Logger> ServiceData<L> {

let request_start = logger.on_request(remote_addr, &request);

let host = match http_helpers::read_header_value(request.headers(), "host") {
let host = match http_helpers::read_header_value(request.headers(), "host").or_else(|| request.uri().host()) {
Some(origin) => origin,
None => return response::malformed(),
};
Expand Down

0 comments on commit fa3b653

Please sign in to comment.