Skip to content

Streaming responses without a known length #89

Open

Description

@hugithordarson

Every response today needs a length up front, including NGResponses.streaming( stream, length ) from #41. A response whose content is produced as it's sent can't be expressed: server-sent events, a generated export, a long download whose size isn't known in advance.

  • Add a response type that streams until the stream ends, sent with chunked transfer encoding (HTTP/1.1) or without a length (HTTP/2).
  • The adaptors must flush as content arrives, not buffer the whole response.
  • Front ends can still buffer. SSE responses also send X-Accel-Buffering: no; see wo-adaptor-jetty's SSEStream.

This is the prerequisite for SSE in ng (#90).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions