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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy