mirror of
https://github.com/openai/codex.git
synced 2026-11-10 16:44:38 +00:00
Honor disabled redirects in route-aware HTTP clients (#34978)
## Why With system-proxy-aware routing, `RouteAwareClientPool` handles redirects itself so each hop can resolve its own route. That manual path must also respect clients configured not to follow redirects. ## What changed - Add no-redirect constructors for standard and ChatGPT Cloudflare-cookie route-aware client pools. - Skip manual redirect handling when the underlying client builder has redirects disabled, returning the redirect response to the caller. ## Testing - Cover both outbound proxy policies and verify that a no-redirect pool returns the initial `302 Found` response after one request. GitOrigin-RevId: 7eec73f21f506a46e5d4b82f425ddbc9761ca61c
This commit is contained in:
1 parent
205d37a20f
commit
ad65f016ed
3 files changed
+73
-3
No files matched your search
@@ -78,6 +78,10 @@ impl HttpClientBuilder {
|
||||
self
|
||||
}
|
||||
|
||||
pub(crate) fn follows_redirects(&self) -> bool {
|
||||
self.follow_redirects
|
||||
}
|
||||
|
||||
/// Limits only connection establishment, not the request as a whole.
|
||||
pub fn connect_timeout(mut self, timeout: Duration) -> Self {
|
||||
self.connect_timeout = Some(timeout);
|
||||
|
||||
Reference in new issue
Block a user