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
Fix SSE parsing to handle split CRLF across chunks
Previously, the SSE parser could incorrectly handle CRLF line endings when
\r appeared at the end of one chunk and \n at the beginning of the next
chunk, potentially treating them as two separate line breaks instead of
a single CRLF sequence.
This fix implements proper CRLF handling by:
- Tracking when a chunk ends with \r using a skip_leading_lf flag
- Skipping a leading \n in the next chunk if the previous ended with \r
- Ensuring Unicode line/paragraph separators (U+2028/U+2029) are treated
as regular content, not line breaks, per the SSE specification
Added comprehensive test coverage for the edge case of split CRLF sequences
across chunk boundaries.
0 commit comments