perl-test-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r279322 - in /perl/Apache-Test/trunk: Changes lib/Apache/TestConfigParse.pm
Date Wed, 07 Sep 2005 13:22:54 GMT
Author: geoff
Date: Wed Sep  7 06:22:50 2005
New Revision: 279322

URL: http://svn.apache.org/viewcvs?rev=279322&view=rev
Log:
fall back on using httpd-defined HTTPD_ROOT as the base for
httpd.conf if all other options fail

Modified:
    perl/Apache-Test/trunk/Changes
    perl/Apache-Test/trunk/lib/Apache/TestConfigParse.pm

Modified: perl/Apache-Test/trunk/Changes
URL: http://svn.apache.org/viewcvs/perl/Apache-Test/trunk/Changes?rev=279322&r1=279321&r2=279322&view=diff
==============================================================================
--- perl/Apache-Test/trunk/Changes (original)
+++ perl/Apache-Test/trunk/Changes Wed Sep  7 06:22:50 2005
@@ -8,6 +8,9 @@
 
 =item 1.27-dev
 
+fall back on using httpd-defined HTTPD_ROOT as the base for
+httpd.conf if all other options fail.  [Geoffrey Young]
+
 
 
 =item 1.26 - July 25, 2005

Modified: perl/Apache-Test/trunk/lib/Apache/TestConfigParse.pm
URL: http://svn.apache.org/viewcvs/perl/Apache-Test/trunk/lib/Apache/TestConfigParse.pm?rev=279322&r1=279321&r2=279322&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/TestConfigParse.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/TestConfigParse.pm Wed Sep  7 06:22:50 2005
@@ -345,8 +345,18 @@
             my $default_conf = $self->{httpd_defines}->{SERVER_CONFIG_FILE};
             $default_conf ||= catfile qw(conf httpd.conf);
             $file = catfile $base, $default_conf;
+
             # SERVER_CONFIG_FILE might be an absolute path
-            $file = $default_conf if !-e $file and -e $default_conf;
+            if (! -e $file && -e $default_conf) {
+                $file = $default_conf;
+            }
+            else {
+              # try a little harder
+              if (my $root = $self->{httpd_defines}->{HTTPD_ROOT}) {
+                  debug "using HTTPD_ROOT to resolve $default_conf";
+                  $file = catfile $root, $default_conf;
+              }
+            }
         }
     }
 



Mime
View raw message