Skip to content

StreamedResponse not supported in Roadrunner #50

Open

Description

@alexander-schranz

More as a reference here currently there is no way to use a StreamedResponse inside roadrunner. This is because things output with echo, var_dump, flush or any other php internal method is not supported by roadrunner and is in this case ignored.

The issue on the roadrunner side is here: https://github.com/spiral/roadrunner/issues/2.

Activity

  1. Baldinof commented on Jun 2, 2021

    @Baldinof

    Hi, I think I can give a little help here.

    RoadRunner does not support streaming the responses, it means PSR responses streams are just consumed entirely and sent as one payload to RR.

    StreamedResponse are well handled on the PsrHttpFactory side.

    The problem is that Symfony setups a StreamedResponseListener which consumes the stream before PsrHttpFactory.

    I handled this by disabling the Symfony listener when running in RR: https://github.com/Baldinof/roadrunner-bundle/blob/2.x/src/Integration/Symfony/StreamedResponseListener.php

  2. Ocramius commented on Feb 14, 2022

    @Ocramius
    Contributor

    FWIW, StreamedResponse doesn't seem to work with swoole either 🤔

    Errata: bitten by StreamedResponseListener, which operates also under swoole :|

  3. alexander-schranz commented on Feb 21, 2022

    @alexander-schranz
    MemberAuthor

    Adding here a reference to #116 as when implementing this for roadrunner we should also keep that in mind.

  4. alexander-schranz commented on Mar 16, 2022

    @alexander-schranz
    MemberAuthor

    Looks good that roadrunner 2.9 will bring us streaming responses: roadrunner-server/roadrunner#923 (comment)

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

      ⌂ Proxy