Skip to content

fix: treat SSE comment lines as comments, not end-of-stream - #13144

Open
tonycoder-hub wants to merge 1 commit into
continuedev:mainfrom
tonycoder-hub:cursor/fix-sse-ping-comment-handling-9a9e
Open

fix: treat SSE comment lines as comments, not end-of-stream#13144
tonycoder-hub wants to merge 1 commit into
continuedev:mainfrom
tonycoder-hub:cursor/fix-sse-ping-comment-handling-9a9e

Conversation

@tonycoder-hub

Copy link
Copy Markdown

parseSseLine treated a : ping keepalive as done, so later data events in the same chunk were left in the buffer and JSON.parse failed (Malformed JSON sent from server). SSE comments should be ignored. Distinct from #12976 and #12604. packages/fetch test: 98 passed.

A `: ping` keepalive was reported as `done`, which broke out of the
line loop in streamSse and left the rest of the chunk unparsed. When the
ping arrived in the same chunk as later data events, the leftover buffer
was parsed as a single line and the stream failed with "Malformed JSON
sent from server".
@tonycoder-hub
tonycoder-hub requested a review from a team as a code owner August 17, 2026 10:07
@tonycoder-hub
tonycoder-hub requested review from sestinj and removed request for a team August 17, 2026 10:07
@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@tonycoder-hub

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@tonycoder-hub

Copy link
Copy Markdown
Author

recheck

@cursor
cursor Bot force-pushed the cursor/fix-sse-ping-comment-handling-9a9e branch from 0ebe433 to cc47459 Compare August 17, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant