Author: stas
Date: Thu Jan 13 12:10:53 2005
New Revision: 125097

URL: http://svn.apache.org/viewcvs?view=rev&rev=125097
Log:
instead of trying to match various custom server name variations (each
vendor seems to replace "Apache" in 'httpd -v' with their own name),
just try to match the "/x.y" in "Foo-Apache-Bar/x.y.z" to figure out
the server generation (rev).

Modified:
   httpd/test/trunk/perl-framework/Apache-Test/Changes
   httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestServer.pm

Modified: httpd/test/trunk/perl-framework/Apache-Test/Changes
Url: 
http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/Apache-Test/Changes?view=diff&rev=125097&p1=httpd/test/trunk/perl-framework/Apache-Test/Changes&r1=125096&p2=httpd/test/trunk/perl-framework/Apache-Test/Changes&r2=125097
==============================================================================
--- httpd/test/trunk/perl-framework/Apache-Test/Changes (original)
+++ httpd/test/trunk/perl-framework/Apache-Test/Changes Thu Jan 13 12:10:53 2005
@@ -8,6 +8,11 @@
 
 =item 1.20-dev
 
+instead of trying to match various custom server name variations (each
+vendor seems to replace "Apache" in 'httpd -v' with their own name),
+just try to match the "/x.y" in "Foo-Apache-Bar/x.y.z" to figure out
+the server generation (rev). [Stas]
+
 extend Apache::TestConfig::which() to search under perl's bin
 directory (in the case of local perl install many utils get installed
 there, but won't be in PATH). [Stas]

Modified: httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestServer.pm
Url: 
http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestServer.pm?view=diff&rev=125097&p1=httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestServer.pm&r1=125096&p2=httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestServer.pm&r2=125097
==============================================================================
--- httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestServer.pm        
(original)
+++ httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestServer.pm        
Thu Jan 13 12:10:53 2005
@@ -67,14 +67,8 @@
     # string and various variations made by distributions which mangle
     # that string
 
-    # Apache/2.0.50-dev
-    ($self->{rev})   = $self->{version} =~ m|^Apache/(\d)\.|;
-
-    # Apache-AdvancedExtranetServer/1.3.29 (Mandrake Linux/1mdk)
-    ($self->{rev}) ||= $self->{version} =~ m|^Apache.*?/(\d)\.|;
-
-    # IBM_HTTP_SERVER/1.3.19  Apache/1.3.20 (Unix)
-    ($self->{rev}) ||= $self->{version} =~ m|^.*?Apache.*?/(\d)\.|;
+    # Foo-Apache-Bar/x.y.z
+    ($self->{rev}) = $self->{version} =~ m|/(\d)\.|;
 
     if ($self->{rev}) {
         debug "Matched Apache revision $self->{version} $self->{rev}";

Reply via email to