httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfigParse.pm
Date Tue, 09 Dec 2003 14:53:58 GMT
geoff       2003/12/09 06:53:58

  Modified:    perl-framework/Apache-Test/lib/Apache TestConfigParse.pm
  Log:
  adjustments for the way 2.1 now reports its MPM information in httpd -V
  
  Revision  Changes    Path
  1.41      +13 -3     httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigParse.pm
  
  Index: TestConfigParse.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigParse.pm,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- TestConfigParse.pm	6 Dec 2003 04:05:40 -0000	1.40
  +++ TestConfigParse.pm	9 Dec 2003 14:53:58 -0000	1.41
  @@ -346,11 +346,13 @@
               s/\s+$//;
               my($key, $val) = split '=', $_, 2;
               $self->{httpd_defines}->{$key} = $val ? strip_quotes($val) : 1;
  +            debug "isolated httpd_defines $key = " . $self->{httpd_defines}->{$key};
           }
  -        elsif (/(version|built|module magic number):\s+(.*)/i) {
  +        elsif (/(version|built|module magic number|server mpm):\s+(.*)/i) {
               my $val = $2;
               (my $key = uc $1) =~ s/\s/_/g;
               $self->{httpd_info}->{$key} = $val;
  +            debug "isolated httpd_info $key = " . $val;
           }
       }
   
  @@ -362,8 +364,16 @@
                 MODULE_MAGIC_NUMBER_MINOR)} = split ':', $mmn;
       }
   
  -    if (my $mpm_dir = $self->{httpd_defines}->{APACHE_MPM_DIR}) {
  -        $self->{mpm} = basename $mpm_dir;
  +    # get the mpm information where available
  +    # lowercase for consistency across the two extraction methods
  +    # XXX or maybe consider making have_apache_mpm() case-insensitive?
  +    if (my $mpm = $self->{httpd_info}->{SERVER_MPM}) {
  +        # 2.1
  +        $self->{mpm} = lc $mpm;
  +    }
  +    elsif (my $mpm_dir = $self->{httpd_defines}->{APACHE_MPM_DIR}) {
  +        # 2.0
  +        $self->{mpm} = lc basename $mpm_dir;
       }
       else {
           # Apache 1.3 - no mpm to speak of
  
  
  

Mime
View raw message