Skip to content

SSE parser drops CRLF streams and the final unterminated frame (silent exit 0) #3

Closed

Description

@ashu17706

src/client.ts postStream:

  1. \r\n line endings (valid SSE, common behind proxies): indexOf("\n\n") never matches \r\n\r\n → zero output, exit 0 (repro'd).
  2. Final frame without trailing blank line → the complete event with the report is swallowed → success exit, no data (repro'd).
  3. Missing final decoder.decode() flush.

Fix: normalize CRLF, flush remaining buffer at stream end; add rude-mock regression tests.

Activity

  1. added
    bug
    on Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions