home *** CD-ROM | disk | FTP | other *** search
- #!/usr/bin/perl
-
- # Access the environment variable by name
-
- $server_protocol = $ENV{'SERVER_PROTOCOL'};
-
- print "Content-type: text/plain\n\n";
-
- # Split the information into name/revision strings
- # by splitting on the slash character.
-
- ($name,$revision) = split('/', $server_protocol, 2);
-
- # Test and use the variable.
-
- if ($revision > 1.0)
- {
- print "Your server is using a new HTTP protocol\n";
- }
- elsif ($revision == 1.0)
- {
- print "Your server is using the current HTTP protocol\n";
- }
- elsif ($revision > 0.0)
- {
- print "Your server is using the old HTTP protocol\n";
- }
- else
- {
- print "Server protocol $server_protocol is unknown\n";
- }
-
- #
- # end of testprot.pl
- #
-