You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 830049d
Browse filesBrowse the repository at this point in the historyBrowse files
The REST and JSON-RPC streaming clients share an SSE reader that
delegates decoding to HTTPX or HTTPX2. When the response declares an
ISO-8859-1 charset or the caller sets an ISO-8859-1 client default, a
valid UTF-8 SSE payload such as `café 東京` comes back corrupted. [The SSE
standard requires UTF-8
decoding.](https://html.spec.whatwg.org/multipage/server-sent-events.html#interpreting-an-event-stream)
Read response bytes, keep the existing CR, LF, and CRLF framing, and
decode each complete line as UTF-8. The regression feeds one byte at a
time so both multibyte characters and CRLF cross chunk boundaries.
[#1259](#1259) covers
leading byte-order mark handling.
## Validation
- On upstream `0fc0d3a`, both charset override cases corrupted the
payload and the UTF-8 control passed. The fix passes all three cases
with HTTPX and HTTPX2.
- All 174 client transport tests and 1,167 HTTPX2-marked tests passed.
- The full Ubuntu suite and coverage run each reported 2,628 passed, 215
skipped, 4 expected failures, and 1 unexpected pass. Coverage was
93.73%. PostgreSQL and MySQL service-dependent cases were skipped.
- `scripts/lint.sh` and `uv build` passed.
OpenAI Codex helped investigate, implement, and test this change.
---------
Co-authored-by: Mateusz Iwaniuk <45974414+Iwaniukooo11@users.noreply.github.com>
0 commit comments