aboutsummaryrefslogtreecommitdiff
path: root/tests/httpsserver.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/httpsserver.pl')
-rw-r--r--tests/httpsserver.pl16
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/httpsserver.pl b/tests/httpsserver.pl
index be4b843ad..648b148df 100644
--- a/tests/httpsserver.pl
+++ b/tests/httpsserver.pl
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
#
# $Id$
-# This is the HTTPS server designed for the curl test suite.
+# This is the HTTPS and FTPS server designed for the curl test suite.
#
# It is actually just a layer that runs stunnel properly.
@@ -18,14 +18,16 @@ my $stunnel = "stunnel";
my $verbose=0; # set to 1 for debugging
-my $port = 8433; # just our default, weird enough
-my $target_port = 8999; # test http-server port
+my $port = 8991; # just our default, weird enough
+my $target_port = 8999; # default test http-server port
my $path = `pwd`;
chomp $path;
my $srcdir=$path;
+my $proto='https';
+
do {
if($ARGV[0] eq "-v") {
$verbose=1;
@@ -33,6 +35,10 @@ do {
if($ARGV[0] eq "-w") {
return 0; # return success, means we have stunnel working!
}
+ elsif($ARGV[0] eq "-p") {
+ $proto=$ARGV[1];
+ shift @ARGV;
+ }
elsif($ARGV[0] eq "-r") {
$target_port=$ARGV[1];
shift @ARGV;
@@ -52,7 +58,7 @@ do {
my $conffile="$path/stunnel.conf"; # stunnel configuration data
my $certfile="$srcdir/stunnel.pem"; # stunnel server certificate
-my $pidfile="$path/.https.pid"; # stunnel process pid file
+my $pidfile="$path/.$proto.pid"; # stunnel process pid file
open(CONF, ">$conffile") || return 1;
print CONF "
@@ -79,7 +85,7 @@ my $version_ge_4=system("$stunnel -V 2>&1|grep '^stunnel.* on '>/dev/null 2>&1")
if ($version_ge_4) { $cmd="$stunnel $conffile"; }
if($verbose) {
- print "HTTPS server: $cmd\n";
+ print uc($proto)." server: $cmd\n";
}
my $rc = system($cmd);