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
SSE parser doesn't handle CRLF line endings (spec-compliant servers) #3054
The SSE client in serverSentEvents.gen.ts fails to parse events from servers that use \r\n (CRLF) line endings. According to the WHATWG HTML Standard, SSE supports three valid line ending formats:
\r\n (CRLF)
\n (LF)
\r (CR)
The current implementation only handles \n (LF) by splitting on \n\n.
Reproducible example or configuration
Use an SSE server that sends CRLF line endings (e.g., Python's sse-starlette which defaults to \r\n)
Connect using the generated SDK's SSE client
Events are never parsed because buffer.split('\n\n') doesn't match \r\n\r\n
Expected Behavior
Events should be parsed regardless of line ending style (CRLF, LF, or CR).
Current Behavior
The buffer keeps growing but chunks.length is always 0 because the split doesn't find \n\n when the data contains \r\n\r\n.
Activity