mirror of
https://github.com/openai/codex.git
synced 2026-10-29 19:08:43 +00:00
Decouple exec-server HTTP from reqwest types (#35059)
## What changed - Rename `ReqwestHttpClient` to `RouteAwareHttpClient` to reflect that delegated HTTP uses Codex's shared route-aware transport. - Use `codex_http_client` response and error types plus transport-neutral `http` and `url` types, removing the exec server's direct `reqwest` dependency. ## Testing - Cover fragment stripping and Unicode hostname normalization for delegated HTTP requests. GitOrigin-RevId: 8b0fc60a76004feb57198bfb4afb1371c9ceb1bd
This commit is contained in:
@@ -17,7 +17,7 @@ use codex_connectors::ConnectorRuntimeManager;
|
||||
use codex_exec_server::Environment;
|
||||
use codex_exec_server::EnvironmentManager;
|
||||
use codex_exec_server::HttpClient;
|
||||
use codex_exec_server::ReqwestHttpClient;
|
||||
use codex_exec_server::RouteAwareHttpClient;
|
||||
use codex_login::AuthManager;
|
||||
use codex_login::CodexAuth;
|
||||
use codex_protocol::capabilities::SelectedCapabilityRoot;
|
||||
@@ -307,7 +307,7 @@ impl McpRuntimeContext {
|
||||
}
|
||||
|
||||
pub(crate) fn local_http_client(&self) -> Arc<dyn HttpClient> {
|
||||
Arc::new(ReqwestHttpClient::new(
|
||||
Arc::new(RouteAwareHttpClient::new(
|
||||
self.environment_manager.http_client_factory().clone(),
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user