Choose provider
Some checks failed
Unit Test / test (push) Has been cancelled
ShiftLeft Scan / Scan-Build (push) Has been cancelled

This commit is contained in:
ZettaScript 2025-10-20 11:37:33 +02:00
commit c053e4ada3
6 changed files with 273 additions and 11 deletions

View file

@ -103,7 +103,10 @@ 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());
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.