Files
codex/codex-rs
Charlie Marsh 9f2b87495b Recover server replies after Responses WebSocket write failures (#62749)
## Why

A server can reject an oversized request after reading just the first
frame header. If the upload then fails with a broken pipe, the write
error can hide the server's message-too-large close.

## What changed

After a write fails partway through an upload, drain immediately
readable replies within the send deadline and a bounded read budget.
Use those replies to surface server errors, including
`WebsocketMessageTooLarge`. Treat a close seen before the first frame
as belonging to the idle connection, and retire the socket after a
failed send.

## Testing

Add regression tests for size-limit closes on an idle socket, just
before the first frame, and after a partial first-frame write fails
with pings and pongs ahead of the close.

GitOrigin-RevId: 2feeb1961992b425dbec06129015dbe4c44ff3f2
2026-11-20 12:22:56 +00:00
..
…
…
…