Skip to content

[HttpClient] the stream is not select()able #34944

Closed
@Nek-

Description

@Nek-

Symfony version(s) affected: 4.4+
PHP version: 7.3.9

Description
The stream generated by the response is supposed to be stream_selec()able according to the documentation.

How to reproduce

$client = \Symfony\Component\HttpClient\HttpClient::create();
$response = $client->request('GET', 'https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-10.2.0-amd64-standard.iso');

$stream = $response->toStream();

$read = [$stream];
$write = [];
$except = [];

// the following returns false !
$success = @stream_select($read, $write, $except, null, 0);
var_dump($success);

// According to PHP documentation "this can happen if the system call is interrupted by an incoming signal"
// wut?

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