fix host header name
This commit is contained in:
parent
a81573d02d
commit
6354d8dde1
2 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "wstunnel"
|
||||
version = "9.2.3"
|
||||
version = "9.2.2"
|
||||
edition = "2021"
|
||||
repository = "https://github.com/erebe/wstunnel.git"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
|
|
@ -113,7 +113,7 @@ pub async fn connect(
|
|||
let headers = headers_from_file(headers_file_path);
|
||||
let host = headers
|
||||
.iter()
|
||||
.find(|(h, _)| h == HeaderName::from_static("HOST"))
|
||||
.find(|(h, _)| h == HeaderName::from_static("host"))
|
||||
.and_then(|(_, v)| v.to_str().ok())
|
||||
.map(|v| v.to_string());
|
||||
(Some(headers), host)
|
||||
|
@ -126,8 +126,8 @@ pub async fn connect(
|
|||
.uri(format!(
|
||||
"{}://{}/{}/events",
|
||||
client_cfg.remote_addr.scheme(),
|
||||
authority.as_deref()
|
||||
|
||||
authority
|
||||
.as_deref()
|
||||
.unwrap_or(client_cfg.http_header_host.to_str().unwrap_or("")),
|
||||
&client_cfg.http_upgrade_path_prefix
|
||||
))
|
||||
|
|
Loading…
Reference in a new issue