Skip to content

[HttpClient] Uncatchable fatal error on class destruction #31187

@Dcoutelle

Description

@Dcoutelle

Description
I use http-client in multimode, around with 20 parallel threads, around 1/10000 request running into a fatal error which is triggered by CurlResponse __destruct()

In __destruct(), $this->doDestruct() is called, which can throw error with $this->checkStatusCode();

How to reproduce
No idea... :/

Possible Solution
at https://github.com/symfony/http-client/blob/master/Response/ResponseTrait.php#L233 remove $this->checkStatusCode(); ... why check code on destruct ?

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