-
-
Notifications
You must be signed in to change notification settings - Fork 9.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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 6.4
Are you sure you want to change the base?
Honor psr7 protocol version #62048
Conversation
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 |
Another idea: add a dedicated option to the client (usable by calling Side note: a similar patch will be required on |
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? |
I think I already shared my vision, and its rationale :) |
The request factory is, so there is a standardized way to create PSR-7 objects. And of course nobody calls I suggested two alternatives:
Possibly implementing both proposals. |
When a PSR-7 request is sent using
Psr18Client
, the PSR-7 request protocol version is only converted to the underlyinghttp_version
option when is set to1.0
, so we cannot control that option for1.1
or2.0
.I have a project where I need to dynamically force the use of protocol version
1.1
but the final request is always sent using version2.0
.