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
A review on #820 showed that our SSE implementation might be too naive:
The current SSE implementation incorrectly dispatches each line starting with data: as a separate message. According to the SSE specification, multiple data: lines should be buffered and concatenated (with newlines) until an empty line is encountered, at which point the complete event should be dispatched. This will cause JSON parsing failures for any multi-line payloads.
Activity
jmesnil commentedon Apr 29, 2026
FWIW https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#event_stream_format to correctly implement the SSE format.
It could be interesting to also add
eventto our stream (eg:event: <message|task| statusUpdate|artifactUpdate)ehsavoie commentedon Apr 29, 2026
We could try to reuse the implementation I wrote for vertx
ehsavoie commentedon Apr 30, 2026
@jmesnil does that means that we wouldn't rely on the data events only anymore ?
jmesnil commentedon Apr 30, 2026
@ehsavoie no, the idea was to identify the
datawith aneventsomething like:but this is silly, the type of events is already clear from the
data.ehsavoie commentedon Apr 30, 2026
Well it could 'help' if you want to subscribe to only a single source/type of event but then you would need to register to every type
feat(http-client): introduce ServerSentEvent type and spec-compliant …
feat(http-client): introduce ServerSentEvent type and spec-compliant …
feat(http-client): introduce ServerSentEvent type and spec-compliant …
feat(http-client): introduce ServerSentEvent type and spec-compliant …
feat(http-client): introduce ServerSentEvent type and spec-compliant …
feat(http-client): introduce ServerSentEvent type and spec-compliant …
feat(http-client): introduce ServerSentEvent type and spec-compliant …