You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What's the defined behavior for clients accepting objects implementing RequestInterface? They specify one HTTP protocol version. Is the client required to obey exactly the protocol version specified in the request? PSR-7 libraries defining it as 1.1 wouldn't allow to use HTTP/2 in that case.
The text was updated successfully, but these errors were encountered:
does psr-7 say anything about that? imho its the job of PSR-7 to define what getProtocol on a request object signifies... i did not read it up, but assume that there is no way of distinguishing the default value from a not specified value?
interfaceMessageInterface
{
/** * Retrieves the HTTP protocol version as a string. * * The string MUST contain only the HTTP version number (e.g., "1.1", "1.0"). * * @return string HTTP protocol version. */publicfunctiongetProtocolVersion();
It says it's the version number of the request, so I guess a client would have to respect it. That's why we use an array for that in Artax.
bad choice indeed. one could use middleware before the request to overwrite the version based on the domain before the request goes to the actual client... but its kinda out of scope for us.
should we mention the topic at all in this PSR? if so, it would be in the spec for sendRequest, where we either say "MUST" respect the protocol or "SHOULD" respect. i'd tend for SHOULD in this case. but i am not sure we have to mention this at all. it should be a clarification on PSR-7. (and maybe a fix for PSR-7 2 to support a range here)
What's the defined behavior for clients accepting objects implementing
RequestInterface
? They specify one HTTP protocol version. Is the client required to obey exactly the protocol version specified in the request? PSR-7 libraries defining it as1.1
wouldn't allow to use HTTP/2 in that case.The text was updated successfully, but these errors were encountered: