The TSHttpHdrVersionGet API returns the HTTP version set in the header object referenced by the bufp and obj arguments. For HTTP/1.0 and HTTP/1.1 requests, this works as you would expect. For HTTP/2, this will return HTTP/1.1 because HTTP/2 stream requests get translated to HTTP/1.1 requests from the HttpSM perspective.
int TSHttpHdrVersionGet(TSMBuffer bufp, TSMLoc obj) We could update the HttpSM logic to explicitly set the HTTPHdr to HTTP/2 (or h2) for requests from HTTP/2 streams. This will require a thorough review of the HttpSM code since there are places that explicitly check the version number and would skip unknown versions. We could update TSHttpHdrVersionGet to dig through the protocol stack and return HTTP/2 anyway. The response back to the client will say HTTP/2 in any case. We could leave it all as is and update the documentation to reflect current behavior (just stub documentation at the moment). Perhaps point the reader to the ProtocolStack APIs for those who want to know the real version. Any thoughts?