cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: runtests.pl change

From: Roth, Kevin P. <KPRoth_at_MarathonOil.com>
Date: Thu, 24 Jan 2002 14:44:11 -0500

One minor followup. Test 29 fails with the autoflush disabled... So:

 ++ # up near the top of httpserver.pl
 ++ my $hosttype=`uname`;

    # flush data:
 -- $| = 1;
 ++ if (substr($hosttype,0,6) eq "CYGWIN" && $testnum==29) { $| = 1; }
 ++ else { $| = 1; }

    # send a custom reply to the client
    my @data = getpart("reply", "data$part");
    for(@data) {
        print $_;
        if($verbose) {
            print STDERR "OUT: $_";
        }
    }
 ++ if (substr($hosttype,0,6) eq "CYGWIN" && $testnum == 29) { $| = 0; }

This adds a check for cygwin so it doesn't affect your usage under
Linux. This also lets you put off redoing the httpserver in C, unless
you really want to ;-) I wanted to use $ENV{OSTYPE}, but apparently
cygwin's perl's $ENV gives access to the underlying Windows_NT env vars
but not the cygwin/bash env vars. Who knew...

Thanks,
--Kevin
Received on 2002-01-24