Browse Source
`_check_event_no_newline` lacked a `\0` check that `_check_id_no_null_or_newline` has had since the original implementation. Similarly, `format_sse_event()` stripped `\0` from `id` but not from `event`. Changes: - Extend `_check_event_no_newline` to also reject `\0` characters - Strip `\0` in `format_sse_event()` for `event` (mirrors existing `id` behavior) - Add `test_server_sent_event_null_event_rejected` regression test `event` and `id` are now fully symmetric in both the model validator and the low-level wire formatter.pull/15187/head
2 changed files with 11 additions and 3 deletions
Loading…
Reference in new issue