Skip to content

This adapter doesn't use stream by default since ReactPHP use BufferedBody by default when using ->request(...) method. #59

Open
@shulard

Description

@shulard

PHP version: any

Description

In the client, we are using the ->request() method on the ReactPHP\Http\Browser object. This method will not use the streaming capabilities by default and it seems that all the request content will be stored in memory.

It seems to be a normal behavior on the ReactPHP side but I'm not sure it's a correct behavior here.

How to reproduce

Try to download a big file using a simple HTTP request. I made a sample repository to reproduce the issue, you can find it here : https://github.com/shulard/reactphp-adapter-issue-with-streaming

Possible Solution

In the reactphp/http Readme, there are some details about streaming responses: https://github.com/reactphp/http#streaming-response

I tried to work with those streams but couldn't find a way to retrieve the content. I think that we might change the Promise implementation to handle the stream.

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