diff options
Diffstat (limited to 'tests/httpserver.pl')
-rwxr-xr-x | tests/httpserver.pl | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/httpserver.pl b/tests/httpserver.pl index 37161f061..693c67f8f 100755 --- a/tests/httpserver.pl +++ b/tests/httpserver.pl @@ -6,7 +6,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al. +# Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -40,6 +40,7 @@ my $idnum = 1; # dafault 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 $connect; # IP to connect to on CONNECT my $srcdir; my $fork; my $gopher = 0; @@ -82,6 +83,12 @@ while(@ARGV) { shift @ARGV; } } + elsif($ARGV[0] eq '--connect') { + if($ARGV[1]) { + $connect = $ARGV[1]; + shift @ARGV; + } + } elsif($ARGV[0] eq '--id') { if($ARGV[1] =~ /^(\d+)$/) { $idnum = $1 if($1 > 0); @@ -112,7 +119,12 @@ if(!$logfile) { $flags .= "--gopher " if($gopher); $flags .= "--fork " if(defined($fork)); +$flags .= "--connect $connect " if($connect); $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" "; $flags .= "--ipv$ipvnum --port $port --srcdir \"$srcdir\""; +if($verbose) { + print STDERR "RUN: server/sws $flags\n"; +} + exec("server/sws $flags"); |