diff options
author | Jan Kneschke <jan@kneschke.de> | 2005-09-01 11:12:05 +0000 |
---|---|---|
committer | Jan Kneschke <jan@kneschke.de> | 2005-09-01 11:12:05 +0000 |
commit | a44e7fc4c46ec353afbadd60d729710d8f1c251f (patch) | |
tree | 7b7b5baca889291c8d949282f4b352be0dc2f2d3 /tests/LightyTest.pm | |
parent | 8e742eac4c6448bba0c09268b761bad5b9028772 (diff) | |
download | lighttpd-git-a44e7fc4c46ec353afbadd60d729710d8f1c251f.tar.gz |
replace 'localhost' by gethostbyaddr for 127.0.0.1
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@669 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/LightyTest.pm')
-rwxr-xr-x | tests/LightyTest.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/LightyTest.pm b/tests/LightyTest.pm index ca65ba67..120db313 100755 --- a/tests/LightyTest.pm +++ b/tests/LightyTest.pm @@ -4,6 +4,7 @@ package LightyTest; use strict; use IO::Socket; use Test::More; +use Socket; use Cwd 'abs_path'; sub new { @@ -27,7 +28,11 @@ sub new { $self->{LIGHTTPD_PIDFILE} = $self->{TESTDIR}.'/tmp/lighttpd/lighttpd.pid'; $self->{PIDOF_PIDFILE} = $self->{TESTDIR}.'/tmp/lighttpd/pidof.pid'; $self->{PORT} = 2048; - + + my ($name, $aliases, $addrtype, $net) = gethostbyaddr(inet_aton("127.0.0.1"), AF_INET); + + $self->{HOSTNAME} = $name; + bless($self, $class); return $self; |