Determine supported HTTP version by the web server

You could issue a:

 curl --head www.test.com

that will print out the HTTP version in the first line of the output...

e.g.

HTTP/1.1 200 OK
Content-Length: 28925
Content-Type: text/html
Last-Modified: Fri, 26 Jun 2009 16:08:04 GMT
Accept-Ranges: bytes
ETag: "a41944978f6c91:0"
Server: Microsoft-IIS/7.0
X-Powered-By: ASP.NET
Date: Fri, 31 Jul 2009 06:13:25 GMT

This should work on any platform that includes a telnet client:

telnet <host> 80

Then you have to type one of the following blind:

HEAD / HTTP/1.0

or GET /

and hit enter twice.

The first line returned should output the HTTP version supported:

telnet www.stackoverflow.com 80
HEAD / HTTP/1.0

HTTP/1.1 404 Not Found
Content-Length: 315
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 31 Jul 2009 15:15:15 GMT
Connection: close

In Google Chrome -> Network Tab -> right click -> Header Options -> select Protocol

  • then you will see values like h2 (HTTP 2) or http/1.1 entry like the following picture in Protocol column

Protocol column in chrome showing http 1 or 2 version or the request

Tags:

Http