This commit is contained in:
Jun Kurihara 2025-05-13 19:28:48 +09:00
commit 4761439338
No known key found for this signature in database
GPG key ID: D992B3E3DE1DED23
20 changed files with 104 additions and 48 deletions

96
Cargo.lock generated
View file

@ -24,7 +24,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"getrandom 0.3.2", "getrandom 0.3.3",
"once_cell", "once_cell",
"version_check", "version_check",
"zerocopy", "zerocopy",
@ -412,9 +412,9 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
[[package]] [[package]]
name = "cc" name = "cc"
version = "1.2.21" version = "1.2.22"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8691782945451c1c383942c4874dbe63814f61cb57ef773cda2972682b7bb3c0" checksum = "32db95edf998450acc7881c932f94cd9b05c87b4b2599e8bab064753da4acfd1"
dependencies = [ dependencies = [
"jobserver", "jobserver",
"libc", "libc",
@ -767,7 +767,7 @@ version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "27cea6e7f512d43b098939ff4d5a5d6fe3db07971e1d05176fe26c642d33f5b8" checksum = "27cea6e7f512d43b098939ff4d5a5d6fe3db07971e1d05176fe26c642d33f5b8"
dependencies = [ dependencies = [
"getrandom 0.3.2", "getrandom 0.3.3",
"rand 0.9.1", "rand 0.9.1",
"siphasher", "siphasher",
"wide", "wide",
@ -970,9 +970,9 @@ dependencies = [
[[package]] [[package]]
name = "getrandom" name = "getrandom"
version = "0.3.2" version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"js-sys", "js-sys",
@ -1434,7 +1434,7 @@ version = "0.1.33"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a"
dependencies = [ dependencies = [
"getrandom 0.3.2", "getrandom 0.3.3",
"libc", "libc",
] ]
@ -1468,12 +1468,12 @@ checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa"
[[package]] [[package]]
name = "libloading" name = "libloading"
version = "0.8.6" version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" checksum = "6a793df0d7afeac54f95b471d3af7f0d4fb975699f972341a4b76988d49cdf0c"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"windows-targets 0.52.6", "windows-targets 0.53.0",
] ]
[[package]] [[package]]
@ -1900,7 +1900,7 @@ checksum = "49df843a9161c85bb8aae55f101bc0bac8bcafd637a620d9122fd7e0b2f7422e"
dependencies = [ dependencies = [
"bytes", "bytes",
"fastbloom", "fastbloom",
"getrandom 0.3.2", "getrandom 0.3.3",
"lru-slab", "lru-slab",
"rand 0.9.1", "rand 0.9.1",
"ring", "ring",
@ -2002,7 +2002,7 @@ version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38"
dependencies = [ dependencies = [
"getrandom 0.3.2", "getrandom 0.3.3",
] ]
[[package]] [[package]]
@ -2751,12 +2751,12 @@ dependencies = [
[[package]] [[package]]
name = "tempfile" name = "tempfile"
version = "3.19.1" version = "3.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1"
dependencies = [ dependencies = [
"fastrand", "fastrand",
"getrandom 0.3.2", "getrandom 0.3.3",
"once_cell", "once_cell",
"rustix 1.0.7", "rustix 1.0.7",
"windows-sys 0.59.0", "windows-sys 0.59.0",
@ -3442,13 +3442,29 @@ dependencies = [
"windows_aarch64_gnullvm 0.52.6", "windows_aarch64_gnullvm 0.52.6",
"windows_aarch64_msvc 0.52.6", "windows_aarch64_msvc 0.52.6",
"windows_i686_gnu 0.52.6", "windows_i686_gnu 0.52.6",
"windows_i686_gnullvm", "windows_i686_gnullvm 0.52.6",
"windows_i686_msvc 0.52.6", "windows_i686_msvc 0.52.6",
"windows_x86_64_gnu 0.52.6", "windows_x86_64_gnu 0.52.6",
"windows_x86_64_gnullvm 0.52.6", "windows_x86_64_gnullvm 0.52.6",
"windows_x86_64_msvc 0.52.6", "windows_x86_64_msvc 0.52.6",
] ]
[[package]]
name = "windows-targets"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b"
dependencies = [
"windows_aarch64_gnullvm 0.53.0",
"windows_aarch64_msvc 0.53.0",
"windows_i686_gnu 0.53.0",
"windows_i686_gnullvm 0.53.0",
"windows_i686_msvc 0.53.0",
"windows_x86_64_gnu 0.53.0",
"windows_x86_64_gnullvm 0.53.0",
"windows_x86_64_msvc 0.53.0",
]
[[package]] [[package]]
name = "windows_aarch64_gnullvm" name = "windows_aarch64_gnullvm"
version = "0.42.2" version = "0.42.2"
@ -3461,6 +3477,12 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764"
[[package]] [[package]]
name = "windows_aarch64_msvc" name = "windows_aarch64_msvc"
version = "0.42.2" version = "0.42.2"
@ -3473,6 +3495,12 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_aarch64_msvc"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c"
[[package]] [[package]]
name = "windows_i686_gnu" name = "windows_i686_gnu"
version = "0.42.2" version = "0.42.2"
@ -3485,12 +3513,24 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnu"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3"
[[package]] [[package]]
name = "windows_i686_gnullvm" name = "windows_i686_gnullvm"
version = "0.52.6" version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_gnullvm"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11"
[[package]] [[package]]
name = "windows_i686_msvc" name = "windows_i686_msvc"
version = "0.42.2" version = "0.42.2"
@ -3503,6 +3543,12 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_i686_msvc"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d"
[[package]] [[package]]
name = "windows_x86_64_gnu" name = "windows_x86_64_gnu"
version = "0.42.2" version = "0.42.2"
@ -3515,6 +3561,12 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnu"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba"
[[package]] [[package]]
name = "windows_x86_64_gnullvm" name = "windows_x86_64_gnullvm"
version = "0.42.2" version = "0.42.2"
@ -3527,6 +3579,12 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57"
[[package]] [[package]]
name = "windows_x86_64_msvc" name = "windows_x86_64_msvc"
version = "0.42.2" version = "0.42.2"
@ -3539,6 +3597,12 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "windows_x86_64_msvc"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486"
[[package]] [[package]]
name = "winnow" name = "winnow"
version = "0.7.10" version = "0.7.10"

View file

@ -1,2 +1,2 @@
#[allow(unused)] #[allow(unused)]
pub use anyhow::{anyhow, bail, ensure, Context}; pub use anyhow::{Context, anyhow, bail, ensure};

View file

@ -1,9 +1,9 @@
use crate::{certs::SingleServerCertsKeys, error::*, log::*}; use crate::{certs::SingleServerCertsKeys, error::*, log::*};
use ahash::HashMap; use ahash::HashMap;
use rustls::{ use rustls::{
RootCertStore, ServerConfig,
crypto::CryptoProvider, crypto::CryptoProvider,
server::{ResolvesServerCertUsingSni, WebPkiClientVerifier}, server::{ResolvesServerCertUsingSni, WebPkiClientVerifier},
RootCertStore, ServerConfig,
}; };
use std::sync::Arc; use std::sync::Arc;

View file

@ -1,8 +1,8 @@
use crate::{ use crate::{
AppConfig, AppConfigList,
error::*, error::*,
log::*, log::*,
name_exp::{ByteName, ServerName}, name_exp::{ByteName, ServerName},
AppConfig, AppConfigList,
}; };
use ahash::HashMap; use ahash::HashMap;
use derive_builder::Builder; use derive_builder::Builder;

View file

@ -7,8 +7,8 @@ pub use super::{
use derive_builder::Builder; use derive_builder::Builder;
use rand::Rng; use rand::Rng;
use std::sync::{ use std::sync::{
atomic::{AtomicUsize, Ordering},
Arc, Arc,
atomic::{AtomicUsize, Ordering},
}; };
/// Constants to specify a load balance option /// Constants to specify a load balance option

View file

@ -1,7 +1,7 @@
use super::{ use super::{
Upstream,
load_balance_main::{LoadBalanceContext, LoadBalanceWithPointer, PointerToUpstream}, load_balance_main::{LoadBalanceContext, LoadBalanceWithPointer, PointerToUpstream},
sticky_cookie::StickyCookieConfig, sticky_cookie::StickyCookieConfig,
Upstream,
}; };
use crate::{constants::STICKY_COOKIE_NAME, log::*}; use crate::{constants::STICKY_COOKIE_NAME, log::*};
use ahash::HashMap; use ahash::HashMap;
@ -9,8 +9,8 @@ use derive_builder::Builder;
use std::{ use std::{
borrow::Cow, borrow::Cow,
sync::{ sync::{
atomic::{AtomicUsize, Ordering},
Arc, Arc,
atomic::{AtomicUsize, Ordering},
}, },
}; };

View file

@ -8,7 +8,7 @@ use super::upstream::Upstream;
use thiserror::Error; use thiserror::Error;
pub use load_balance_main::{ pub use load_balance_main::{
load_balance_options, LoadBalance, LoadBalanceContext, LoadBalanceRandomBuilder, LoadBalanceRoundRobinBuilder, LoadBalance, LoadBalanceContext, LoadBalanceRandomBuilder, LoadBalanceRoundRobinBuilder, load_balance_options,
}; };
#[cfg(feature = "sticky-cookie")] #[cfg(feature = "sticky-cookie")]
pub use load_balance_sticky::LoadBalanceStickyBuilder; pub use load_balance_sticky::LoadBalanceStickyBuilder;

View file

@ -91,12 +91,7 @@ impl<'a> StickyCookieBuilder {
self self
} }
/// Set the meta information of sticky cookie /// Set the meta information of sticky cookie
pub fn info( pub fn info(&mut self, domain: impl Into<Cow<'a, str>>, path: impl Into<Cow<'a, str>>, duration_secs: i64) -> &mut Self {
&mut self,
domain: impl Into<Cow<'a, str>>,
path: impl Into<Cow<'a, str>>,
duration_secs: i64,
) -> &mut Self {
let info = StickyCookieInfoBuilder::default() let info = StickyCookieInfoBuilder::default()
.domain(domain) .domain(domain)
.path(path) .path(path)

View file

@ -1,7 +1,7 @@
#[cfg(feature = "sticky-cookie")] #[cfg(feature = "sticky-cookie")]
use super::load_balance::LoadBalanceStickyBuilder; use super::load_balance::LoadBalanceStickyBuilder;
use super::load_balance::{ use super::load_balance::{
load_balance_options as lb_opts, LoadBalance, LoadBalanceContext, LoadBalanceRandomBuilder, LoadBalanceRoundRobinBuilder, LoadBalance, LoadBalanceContext, LoadBalanceRandomBuilder, LoadBalanceRoundRobinBuilder, load_balance_options as lb_opts,
}; };
// use super::{BytesName, LbContext, PathNameBytesExp, UpstreamOption}; // use super::{BytesName, LbContext, PathNameBytesExp, UpstreamOption};
use super::upstream_opts::UpstreamOption; use super::upstream_opts::UpstreamOption;
@ -13,7 +13,7 @@ use crate::{
}; };
use ahash::{HashMap, HashSet}; use ahash::{HashMap, HashSet};
#[cfg(feature = "sticky-cookie")] #[cfg(feature = "sticky-cookie")]
use base64::{engine::general_purpose, Engine as _}; use base64::{Engine as _, engine::general_purpose};
use derive_builder::Builder; use derive_builder::Builder;
#[cfg(feature = "sticky-cookie")] #[cfg(feature = "sticky-cookie")]
use sha2::{Digest, Sha256}; use sha2::{Digest, Sha256};

View file

@ -2,4 +2,4 @@ mod cache_error;
mod cache_main; mod cache_main;
pub use cache_error::CacheError; pub use cache_error::CacheError;
pub(crate) use cache_main::{get_policy_if_cacheable, RpxyCache}; pub(crate) use cache_main::{RpxyCache, get_policy_if_cacheable};

View file

@ -9,13 +9,13 @@ use async_trait::async_trait;
use http::{Request, Response, Version}; use http::{Request, Response, Version};
use hyper::body::{Body, Incoming}; use hyper::body::{Body, Incoming};
use hyper_util::client::legacy::{ use hyper_util::client::legacy::{
connect::{Connect, HttpConnector},
Client, Client,
connect::{Connect, HttpConnector},
}; };
use std::sync::Arc; use std::sync::Arc;
#[cfg(feature = "cache")] #[cfg(feature = "cache")]
use super::cache::{get_policy_if_cacheable, RpxyCache}; use super::cache::{RpxyCache, get_policy_if_cacheable};
#[async_trait] #[async_trait]
/// Definition of the forwarder that simply forward requests from downstream client to upstream app servers. /// Definition of the forwarder that simply forward requests from downstream client to upstream app servers.

View file

@ -1,7 +1,7 @@
use super::watch; use super::watch;
use crate::error::*; use crate::error::*;
use futures_channel::{mpsc, oneshot}; use futures_channel::{mpsc, oneshot};
use futures_util::{stream::FusedStream, Future, Stream}; use futures_util::{Future, Stream, stream::FusedStream};
use http::HeaderMap; use http::HeaderMap;
use hyper::body::{Body, Bytes, Frame, SizeHint}; use hyper::body::{Body, Bytes, Frame, SizeHint};
use std::{ use std::{

View file

@ -1,7 +1,7 @@
use super::body::IncomingLike; use super::body::IncomingLike;
use crate::error::RpxyError; use crate::error::RpxyError;
use futures::channel::mpsc::UnboundedReceiver; use futures::channel::mpsc::UnboundedReceiver;
use http_body_util::{combinators, BodyExt, Empty, Full, StreamBody}; use http_body_util::{BodyExt, Empty, Full, StreamBody, combinators};
use hyper::body::{Body, Bytes, Frame, Incoming}; use hyper::body::{Body, Bytes, Frame, Incoming};
use std::pin::Pin; use std::pin::Pin;

View file

@ -12,5 +12,5 @@ pub(crate) mod rt {
#[allow(unused)] #[allow(unused)]
pub(crate) mod body { pub(crate) mod body {
pub(crate) use super::body_incoming_like::IncomingLike; pub(crate) use super::body_incoming_like::IncomingLike;
pub(crate) use super::body_type::{empty, full, BoxBody, RequestBody, ResponseBody, UnboundedStreamBody}; pub(crate) use super::body_type::{BoxBody, RequestBody, ResponseBody, UnboundedStreamBody, empty, full};
} }

View file

@ -7,8 +7,8 @@
use futures_util::task::AtomicWaker; use futures_util::task::AtomicWaker;
use std::sync::{ use std::sync::{
atomic::{AtomicUsize, Ordering},
Arc, Arc,
atomic::{AtomicUsize, Ordering},
}; };
use std::task; use std::task;

View file

@ -44,10 +44,7 @@ mod tests {
} }
#[test] #[test]
fn ipv6_to_canonical() { fn ipv6_to_canonical() {
let socket = SocketAddr::new( let socket = SocketAddr::new(IpAddr::V6(Ipv6Addr::new(0x2001, 0x0db8, 0, 0, 0, 0, 0xdead, 0xbeef)), 8080);
IpAddr::V6(Ipv6Addr::new(0x2001, 0x0db8, 0, 0, 0, 0, 0xdead, 0xbeef)),
8080,
);
assert_eq!(socket.to_canonical(), socket); assert_eq!(socket.to_canonical(), socket);
} }
#[test] #[test]

View file

@ -1,7 +1,7 @@
use super::http_result::{HttpError, HttpResult}; use super::http_result::{HttpError, HttpResult};
use crate::{ use crate::{
error::*, error::*,
hyper_ext::body::{empty, ResponseBody}, hyper_ext::body::{ResponseBody, empty},
name_exp::ServerName, name_exp::ServerName,
}; };
use http::{Request, Response, StatusCode, Uri}; use http::{Request, Response, StatusCode, Uri};

View file

@ -3,9 +3,9 @@ use crate::{
backend::{UpstreamCandidates, UpstreamOption}, backend::{UpstreamCandidates, UpstreamOption},
log::*, log::*,
}; };
use anyhow::{anyhow, ensure, Result}; use anyhow::{Result, anyhow, ensure};
use bytes::BufMut; use bytes::BufMut;
use http::{header, HeaderMap, HeaderName, HeaderValue, Uri}; use http::{HeaderMap, HeaderName, HeaderValue, Uri, header};
use std::{borrow::Cow, net::SocketAddr}; use std::{borrow::Cow, net::SocketAddr};
#[cfg(feature = "sticky-cookie")] #[cfg(feature = "sticky-cookie")]

View file

@ -2,8 +2,8 @@ use crate::{
backend::{Upstream, UpstreamCandidates, UpstreamOption}, backend::{Upstream, UpstreamCandidates, UpstreamOption},
log::*, log::*,
}; };
use anyhow::{anyhow, ensure, Result}; use anyhow::{Result, anyhow, ensure};
use http::{header, uri::Scheme, Request, Version}; use http::{Request, Version, header, uri::Scheme};
/// Trait defining parser of hostname /// Trait defining parser of hostname
/// Inspect and extract hostname from either the request HOST header or request line /// Inspect and extract hostname from either the request HOST header or request line

View file

@ -11,7 +11,7 @@ use crate::{
message_handler::HttpMessageHandler, message_handler::HttpMessageHandler,
name_exp::ServerName, name_exp::ServerName,
}; };
use futures::{select, FutureExt}; use futures::{FutureExt, select};
use http::{Request, Response}; use http::{Request, Response};
use hyper::{ use hyper::{
body::Incoming, body::Incoming,