-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpClient] HttplugClient sets option http_version to null for any version except 1.0 #48087
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is also the case in
|
That is on purpose: PSR-7 forces
Why does a server that advertises '2.0' not support it? |
I have no idea. It's Raiffeisen Bank test api https://developers.rb.cz/premium/documentation/02rbczpremiumapi_sandbox We are getting |
Can you try configuring the client passed to |
Already tried that. Option |
Then let's change that: can you please send a PR to NOT set the http_version in HttplugClient+Psr18Client instead of setting it to null? |
on branch 4.4? |
yes please |
done |
… to null (Tetragramat) This PR was merged into the 4.4 branch. Discussion ---------- [HttpClient] Do not set http_version instead of setting it to null | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #48087 | License | MIT | Doc PR | - Commits ------- 5f7004d don not set http_version instead of setting it to null
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
The text was updated successfully, but these errors were encountered: