Skip to content

[Http Client] RetryableHttpClient, HttplugClient and sendAsyncRequest issue #38509

@Jibbarth

Description

@Jibbarth

Symfony version(s) affected: 5.2.0-BETA1

Description
I tried the "RetryableHttpClient". It work perfectly when it decorate the HttpClient. when I using it inside a HttplugClient with sendRequest, everything is ok. But with sendAsyncRequest, I got a strange error :

In AsyncResponse.php line 241:
 
  A chunk passthru must yield an "isLast()" chunk before ending a stream.

It don't call nor on the onFullfilled and the onRejected methods

How to reproduce

Simple reproducer :

<?php
// ...
$client = new RetryableHttpClient(HttpClient::create());
$httplugClient = new HttplugClient($client);
$request = $httplugClient->createRequest('GET', 'https://httpbin.org/status/429');

$httplugClient->sendAsyncRequest($request)
    ->then(function ($response) {
        dump($response);
    }, function ($reject) {
        dump($reject);
    });

Possible Solution

Additional context

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