Refactor HTTP client construction and request execution (#57575)

## What changed

Construct the direct transport explicitly in `HttpClient::new` and reuse `without_request_logging` in `new_without_request_logging`.

Bind awaited request results before matching them in transport execution and the Windows proxy retry path.

GitOrigin-RevId: 58b2524491db80ff4d7a954868c1e030a1643a9d
This commit is contained in:
ben zhang
2026-10-27 22:03:01 +00:00
committed by copyberry
parent 83747ccc71
commit e343a12d5c
4 changed files with 14 additions and 4 deletions
@@ -322,7 +322,8 @@ impl RouteAwareClientPool {
let client = self.windows_proxy_client(current_route, selected_tls_backend, &pipe)?;
set_remaining_timeout(&mut request, timeout_deadline)?;
// Keep the listener alive through a possible TLS retry.
match client.execute_without_request_logging(request).await {
let result = client.execute_without_request_logging(request).await;
match result {
Ok(response) => Ok(response),
Err(error) => {
self.retry_with_rustls(