Skip to content

[HttpClient] HttplugClient sets option http_version to null for any version except 1.0 #48087

@Tetragramat

Description

@Tetragramat

Symfony version(s) affected

4.4.47

Description

\Symfony\Component\HttpClient\HttplugClient::sendPsr7Request overrides protocol version for any version other than 1.0 and sets http_version option as null. Where HttpClient chooses highest version available.

It is problem when target server does not support http2 and request fails.

How to reproduce

On server that supports http2 create request with version 1.1 and send it using \Symfony\Component\HttpClient\HttplugClient. The request will be made using http version 2.0 instead of requested 1.1.

Possible Solution

Stop overriding protocol version in \Symfony\Component\HttpClient\HttplugClient::sendPsr7Request

Additional Context

No response

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