diff --git a/mirrord/agent/src/steal/connections/filtered.rs b/mirrord/agent/src/steal/connections/filtered.rs index 3fd7a4cb27d..9dcc16b39e9 100644 --- a/mirrord/agent/src/steal/connections/filtered.rs +++ b/mirrord/agent/src/steal/connections/filtered.rs @@ -117,7 +117,7 @@ impl FilteringService { /// Also, it does not retry the request upon failure. async fn send_request( to: SocketAddr, - request: Request, + mut request: Request, ) -> Result, Box> { let tcp_stream = TcpStream::connect(to).await.inspect_err(|error| { tracing::error!(?error, address = %to, "Failed connecting to request destination"); @@ -142,6 +142,12 @@ impl FilteringService { } }); + // fixes https://github.com/metalbear-co/mirrord/issues/2497 + // inspired by https://github.com/linkerd/linkerd2-proxy/blob/c5d9f1c1e7b7dddd9d75c0d1a0dca68188f38f34/linkerd/proxy/http/src/h2.rs#L175 + if request.uri().authority().is_none() { + *request.version_mut() = hyper::http::Version::HTTP_11; + } + request_sender .send_request(request) .await