Commit 4a6cc54e authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

check for the HTTPS server in a manner similar to how we check for the HTTP

server
parent 61133545
Loading
Loading
Loading
Loading
+13 −9
Original line number Diff line number Diff line
@@ -477,21 +477,25 @@ sub runhttpsserver {
    if($verbose) {
        print "CMD: $cmd\n";
    }
    sleep(1);

    for(1 .. 30) {
        $pid=checkserver($HTTPSPIDFILE);
        # verify that our HTTPS server is up and running:
        $cmd="$CURL --silent --insecure \"https://$HOSTIP:$HTTPSPORT/verifiedserver\" 2>/dev/null";
        if($verbose) {
            print "CMD: $cmd\n";
        }

        if($pid <= 0) {
        my $data=`$cmd`;

        if ( $data =~ /WE ROOLZ: (\d+)/ ) {
            $pid = 0+$1;
            last;
        }
        if($verbose) {
            print STDERR "RUN: waiting one sec for HTTPS server\n";
        }
        sleep(1);
    }
        else {
            last;
        }
    }

    return $pid;
}