I think its a theoratical Question. I have a project on dotnet framework 4.5 and what i need to do is that whenever a client is using older httpversion i have to redirect it to an error page. i am getting http version like this
var d = Request.ServerVariables["SERVER_PROTOCOL"];
and it is giving value "HTTP/1.1". I think this is the http version of Request. Right? now my Question is
//
CASE 1) do we have to set http version on server and compare our server version with the version that we get from Request.ServerVariables["SERVER_PROTOCOLS"] OR
//
CASE 2) i have to compare it with latest http version(which is showing HTTP/2 on google) via a simple string comparison
var d = Request.ServerVariables["SERVER_PROTOCOL"];
if(d=="HTTP1.1") //"HTTP/2 either of which is latest"
{}
if its the CASE 1 then how do we set http version of our server and if it CASE 2 then what if later httpversion changes to "HTTP/3" then do i have to go to code again and change the condition for latest httpversion