Files
codex/codex-rs/network-proxy/src/http_proxy
jfoo-oai 12cca49c81 Reject duplicate Host headers in the network proxy (#53506)
## Why

Policy evaluation and upstream parsers must not select different `Host` field lines from the same request.

## What changed

Return `400 Bad Request` for multiple `Host` headers, including identical values, before policy evaluation, upstream forwarding, or Unix socket routing. Apply the check to both plain HTTP requests and `CONNECT` requests.

## Testing

Add regression tests covering identical and conflicting headers in origin-form, absolute-form, and `CONNECT` requests, verifying rejection without an upstream connection. Also cover single-header forwarding and rejection before Unix socket routing.

GitOrigin-RevId: 8ec95171e120f784629d3121b9a1bedbaf88e7cd
2026-10-12 23:46:16 +00:00
..