httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: httpd-test/perl-framework/Apache-Test Changes
Date Wed, 10 Dec 2003 02:26:30 GMT
stas        2003/12/09 18:26:30

  Modified:    perl-framework/Apache-Test/lib/Apache TestConfig.pm
               perl-framework/Apache-Test Changes
  Log:
  Cleanly exit (and complain) if the default hostname resolution has
  failed (usually due to a missing localhost entry in /etc/hosts)
  
  Revision  Changes    Path
  1.188     +6 -1      httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm
  
  Index: TestConfig.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
  retrieving revision 1.187
  retrieving revision 1.188
  diff -u -u -r1.187 -r1.188
  --- TestConfig.pm	24 Nov 2003 23:31:31 -0000	1.187
  +++ TestConfig.pm	10 Dec 2003 02:26:30 -0000	1.188
  @@ -589,7 +589,12 @@
   sub our_remote_addr {
       my $self = shift;
       my $name = $self->default_servername;
  -    $remote_addr ||= Socket::inet_ntoa((gethostbyname($name))[-1]);
  +    my $iaddr = (gethostbyname($name))[-1];
  +    unless (defined $iaddr) {
  +        error "Can't resolve host: '$name' (check /etc/hosts)";
  +        exit 1;
  +    }
  +    $remote_addr ||= Socket::inet_ntoa($iaddr);
   }
   
   sub default_loopback {
  
  
  
  1.71      +3 -0      httpd-test/perl-framework/Apache-Test/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/Changes,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -u -r1.70 -r1.71
  --- Changes	2 Dec 2003 02:10:41 -0000	1.70
  +++ Changes	10 Dec 2003 02:26:30 -0000	1.71
  @@ -8,6 +8,9 @@
   
   =item 1.07-dev
   
  +Cleanly exit (and complain) if the default hostname resolution has
  +failed (usually due to a missing localhost entry in /etc/hosts) [Stas]
  +
   Fix Apache::TestConfigParse to handle quoted Include arguments [Stas]
   
   Fix Apache::TestServer::wait_till_is_up not to bail out if the server
  
  
  

Mime
View raw message