exp
Some checks are pending
Unit Test / test (push) Waiting to run
ShiftLeft Scan / Scan-Build (push) Waiting to run

This commit is contained in:
ZettaScript 2025-10-13 15:25:15 +02:00
commit d9efeb42d6
11 changed files with 778 additions and 54 deletions

View file

@ -103,6 +103,7 @@ where
<B1 as Body>::Error: Into<Box<dyn std::error::Error + Send + Sync + 'static>>,
{
async fn request_directly(&self, req: Request<B1>) -> RpxyResult<Response<Incoming>> {
debug!("About to send request with Host header: {}", req.headers().get(hyper::header::HOST).unwrap().to_str().unwrap());
// TODO: This 'match' condition is always evaluated at every 'request' invocation. So, it is inefficient.
// Needs to be reconsidered. Currently, this is a kind of work around.
// This possibly relates to https://github.com/hyperium/hyper/issues/2417.
@ -228,6 +229,7 @@ where
let inner = Client::builder(LocalExecutor::new(_globals.runtime_handle.clone())).build::<_, B1>(connector);
let inner_h2 = Client::builder(LocalExecutor::new(_globals.runtime_handle.clone()))
.http2_only(true)
.set_host(false)
.build::<_, B1>(connector_h2);
Ok(Self {