]> git.etc.gen.nz Git - spong.git/commitdiff
fixed problem in new spong.hosts based parameters code
authorStephen L Johnson <sjohnson@monsters.org>
Wed, 29 Nov 2000 16:47:27 +0000 (16:47 +0000)
committerStephen L Johnson <sjohnson@monsters.org>
Wed, 29 Nov 2000 16:47:27 +0000 (16:47 +0000)
src/lib/Spong/Network/plugins/check_http

index 1738263cf133834f8931ecc8a2f5c9a2e2a54cd6..f8072160d77b494ccea61daa554e6d86fd496d4b 100755 (executable)
@@ -10,11 +10,13 @@ sub check_http {
    my( $host ) = @_;
    my( @http_files ) = ( @{$HTTPDOCS{"ALL"}}, @{$HTTPDOCS{$host}} );
    my( $http_port ) = $HTTPPORT{$host} || $HTTPPORT{"ALL"} || 80;
+
    # Find list of URL's to check
-   my( @http_urls ) = @{$HTTPURLS{$host}} ||            # Old style configs 
-                      @{$HTTPURLS{'DEFAULT'}} ||
-                      $HOSTS{$host}->{'http_urls'} ||   # New style configs
-                      $HOSTS_DEFAULTS{'http_urls'};
+   my( @http_urls ) = @{$HTTPURLS{$host}}; 
+   @http_urls = @{$HTTPURLS{'DEFAULT'}}  if( ! @http_urls );
+   @http_urls = @{$HOSTS{$host}->{'http_urls'}} if( ! @http_urls );
+   @http_urls = @{$HOSTS_DEFAULTS{'http_urls'}} if( ! @http_urls );
+
    # Append mandatory urls to check
    @http_urls = ( @http_urls, @{$HOSTS_ALL{'http_urls'}} );