Files
codex/codex-rs/http-client
Michael Bolin 841e47b8fb Re-resolve system proxy routes across redirects (#34479)
## Why

Route-aware clients select a direct or proxy route from the complete request
URL. Letting `reqwest` follow redirects internally reuses the client chosen for
the original URL, so the redirect destination cannot receive its own PAC or
system proxy decision.

## What changed

- Follow redirects through `RouteAwareClientPool` when respecting the system
  proxy, resolving and caching a route for every hop.
- Preserve standard redirect method and body behavior, enforce one timeout
  across the request chain, and cap redirects at 10 hops.
- Strip origin-sensitive credentials and stale proxy authorization when the
  destination or selected route changes, and apply safe `Referer` handling.
- Log one final request outcome instead of intermediate redirect responses.

## Testing

Added an integration test covering a redirect from a direct route to a proxy
route, credential handling, and final-outcome logging.

GitOrigin-RevId: e5cb2cc962e99d33df61ef649465e956b92279bb
2026-07-21 07:18:18 +00:00
..

codex-http-client

Low-level HTTP transport shared by Codex crates.

  • Defines the request, response, streaming, and transport types used for outbound HTTP calls.
  • Owns the reqwest implementation, custom CA handling, and ChatGPT Cloudflare cookie policy.
  • Resolves system, PAC/WPAD, environment, and direct proxy routes for supported clients.

Higher-level retry, SSE, and request telemetry policy remains in codex-client.