Forum Discussion
IIS SERVER_PROTOCOL never returns HTTP2 (HTTP/2)
Hi,
I think this is expected behavior.
SERVER_PROTOCOL reflects the server variable exposed by IIS to the application, not necessarily the HTTP protocol version negotiated between the client and HTTP.sys. For compatibility reasons, many IIS server variables continue to report HTTP/1.1 even when the client connection is using HTTP/2 or HTTP/3.
Since you've already confirmed through the browser's developer tools that the request is being served over HTTP/2 (and later upgraded to HTTP/3), the transport protocol negotiation is working as expected. The value returned by Request.ServerVariables("SERVER_PROTOCOL") simply isn't intended to reflect those newer protocol versions.
If your goal is to verify the negotiated protocol, browser developer tools, curl --http2, or a network trace are more reliable than SERVER_PROTOCOL. Those tools show the actual protocol negotiated between the client and the server, whereas SERVER_PROTOCOL remains a legacy server variable maintained for application compatibility.