Skip to content

EventStreamRepresentation should send the response head before the first event #1598

Closed

Description

@jlouvel

Problem

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

Proposed direction

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.

Related

Activity

  1. added 3 commits that reference this issue on Nov 1, 2026
    1086af9
    bcf28bb
    079619e
  2. jlouvel commented on Nov 2, 2026

    @jlouvel
    CollaboratorAuthor

    Fixed by #1605, merged into 3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions