Avatar for the fastapi user
fastapi
fastapi
BlogDocsChangelog

Performance History

Latest Results

fix: raise ValueError in format_sse_event instead of stripping invalid chars Replace silent .replace() sanitization in format_sse_event() with explicit ValueError raises for \n, \r, and \0 in the event and id fields. Previously, format_sse_event() would strip those characters, creating a behavioral inconsistency with ServerSentEvent's AfterValidator which raises on the same input. As YuriiMotov pointed out: data allows newlines by SSE spec design (each line becomes a separate data: frame), but event and id are single-token fields where a newline is always a protocol violation. Silent stripping masks bugs at the call site; raising surfaces them where they belong. Both code paths now fail identically for the same invalid input. Tests updated from strip-behavior assertions to ValueError assertions, plus two new null-byte tests covering format_sse_event() directly for event and id.
subhashdasyam:fix/sse-newline-injection
3 hours ago
🎨 Auto format
fitratgulmamadov:fix/issue-13175-duplicate-operation-id
5 hours ago
Add test for unique operationId generation in multi-method routes
fitratgulmamadov:fix/issue-13175-duplicate-operation-id
5 hours ago
🎨 Auto format
hnshah:refactor/move-imports-to-type-checking
11 hours ago

Latest Branches

CodSpeed Performance Gauge
0%
fix: reject newline characters in SSE event and id fields#15187
3 hours ago
9e51a7d
subhashdasyam:fix/sse-newline-injection
CodSpeed Performance Gauge
0%
5 hours ago
937fcdf
fitratgulmamadov:fix/issue-13175-duplicate-operation-id
CodSpeed Performance Gauge
0%
refactor: Move type-only imports into TYPE_CHECKING blocks#15212
11 hours ago
006e62e
hnshah:refactor/move-imports-to-type-checking
© 2026 CodSpeed Technology
Home Terms Privacy Docs