views:

92

answers:

3

Hi,

Is there a way to check whether a web server supports HTTP 1.0 or 1.1? If so, how is this done?

Thanks, Kenneth

A: 

Read the release notes or the documentation of the webserver to check that. For example Apache Tomcat doucment tells it supports http 1.1

Which webserver you looking for?

Also are you asking if this can be checked programmetically?

Bhushan
+3  A: 

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
Jon
Assuming that curl is installed on that platform. OR, he could call the web server with ANY component that can do HTTP, and retrieve the version number from there.
TFM
A: 

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
Grant Wagner