-
-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What version of Elysia is running?
1.4.6
What platform is your computer?
Darwin 25.2.0 arm64 arm
What steps can reproduce the bug?
When an SSE event block contains multiple data: lines, only the last one is preserved in the event object. This drops all intermediate lines and breaks the SSE spec for multiline data payloads.
Example:
data: line 1
data: line 2
data: line 3
Expected result: event.data === "line 1\nline 2\nline 3"
Actual result: event.data === "line 3"
Possibly related to elysiajs/elysia#1466
What is the expected behavior?
All data lines in the SSE block should be concatenated with \n and accessible as a single string in event.data, per the SSE spec.
What do you see instead?
Only the last data line is kept in event.data, all earlier lines are lost.
Additional information
Bug is likely in parseSSEBlock in src/treaty2/index.ts. Multiple data: lines must be joined, not overwritten.
Have you try removing the node_modules and bun.lockb and try again yet?
Yes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working