Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Honor psr7 protocol version#62048
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas commentedOct 13, 2025
The current behavior allows defaulting to 2.0 when ppl didn't specify any protocol. This happens most of the time. An idea might be to find a way to tell the difference when our own |
nicolas-grekas commentedOct 13, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Another idea: add a dedicated option to the client (usable by calling Side note: a similar patch will be required on |
ajgarlag commentedOct 13, 2025
The PSR-7 interface defines a The current Any caller code can change the protocol version set in the PSR-7, no matter which PSR-7 implementation is being used, so I see no need to create a dedicated option in the client. What do you think about proposing this as a feature retargeting the PR to Symfony 8? |
nicolas-grekas commentedOct 13, 2025
I think I already shared my vision, and its rationale :) |
nicolas-grekas commentedOct 13, 2025
The request factory is, so thereis a standardized way to create PSR-7 objects. And of course nobody calls I suggested two alternatives:
Possibly implementing both proposals. |
ajgarlag commentedOct 14, 2025
Closing in favor of#62059 |
When a PSR-7 request is sent using
Psr18Client, the PSR-7 request protocol version is only converted to the underlyinghttp_versionoption when is set to1.0, so we cannot control that option for1.1or2.0.I have a project where I need to dynamically force the use of protocol version
1.1but the final request is always sent using version2.0.