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
{{ message }}
Repository navigation
EventStreamRepresentation should send the response head before the first event #1598
EventStreamRepresentation doesn't send the response head until the first event or heartbeat is flushed. With heartbeats off and a writer that waits before its first event, the client receives no status or headers at all. In our tests, a client waited about 30 seconds (until its timeout) for the headers of an idle stream.
The writer runs in write(OutputStream), and the connector only commits the status and headers on the first flush of the output stream.
Why it matters
A client can't tell an accepted, idle stream from a server that hangs. It can't check the status or Content-Type either.
Subscriptions are often idle at first: a GraphQL subscription over graphql-sse may wait minutes for its first event.
Commit the response head when the writer starts, before calling EventWriter.write(sink), for example by flushing the output stream once. That costs one empty flush per stream and needs no API change.
A test should check that a client sees the status and headers of a stream whose writer waits before its first event, with heartbeats off, over HTTP/1.1 and HTTP/2.
Activity
fix: send the SSE response head before the first event
fix: send the SSE response head before the first event
fix: send the SSE response head before the first event
jlouvel commentedon Nov 2, 2026
Fixed by #1605, merged into 3.0.