diff options
Diffstat (limited to 'tests/httpserver.pl')
-rwxr-xr-x | tests/httpserver.pl | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/tests/httpserver.pl b/tests/httpserver.pl index 05ec80ac7..58ab5d460 100755 --- a/tests/httpserver.pl +++ b/tests/httpserver.pl @@ -44,8 +44,9 @@ my $unix_socket; # location to place a listening Unix socket my $ipvnum = 4; # default IP version of http server my $idnum = 1; # default http server instance number my $proto = 'http'; # protocol the http server speaks -my $pidfile; # http server pid file -my $logfile; # http server log file +my $pidfile; # pid file +my $portfile; # port number file +my $logfile; # log file my $connect; # IP to connect to on CONNECT my $srcdir; my $gopher = 0; @@ -61,6 +62,12 @@ while(@ARGV) { shift @ARGV; } } + elsif($ARGV[0] eq '--portfile') { + if($ARGV[1]) { + $portfile = $ARGV[1]; + shift @ARGV; + } + } elsif($ARGV[0] eq '--logfile') { if($ARGV[1]) { $logfile = $ARGV[1]; @@ -122,11 +129,16 @@ if(!$srcdir) { if(!$pidfile) { $pidfile = "$path/". server_pidfilename($proto, $ipvnum, $idnum); } +if(!$portfile) { + $portfile = "$path/". server_portfilename($proto, $ipvnum, $idnum); +} if(!$logfile) { $logfile = server_logfilename($logdir, $proto, $ipvnum, $idnum); } -$flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" "; +$flags .= "--pidfile \"$pidfile\" ". + "--logfile \"$logfile\" ". + "--portfile \"$portfile\" "; $flags .= "--gopher " if($gopher); $flags .= "--connect $connect " if($connect); if($ipvnum eq 'unix') { |