summaryrefslogtreecommitdiff
path: root/tests/httpserver.pl
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-11-02 23:09:25 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-11-02 23:09:25 +0000
commit3bfa06c9a2e3d53ae2b2ca1a1841429623f1f12e (patch)
treedbec9de2a0b026cf18cbf38657a4916b972664ac /tests/httpserver.pl
parentf34573c8e257a61925f8980bc814adb93133c79d (diff)
downloadcurl-3bfa06c9a2e3d53ae2b2ca1a1841429623f1f12e.tar.gz
improved functionality for new timeout tests
Diffstat (limited to 'tests/httpserver.pl')
-rwxr-xr-xtests/httpserver.pl20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/httpserver.pl b/tests/httpserver.pl
index 9b409a9ed..2bbf839dd 100755
--- a/tests/httpserver.pl
+++ b/tests/httpserver.pl
@@ -50,6 +50,16 @@ sub REAPER {
logmsg "reaped $waitedpid" . ($? ? " with exit $?" : '');
}
+sub performcmd {
+ my @cmd = @_;
+ for(@cmd) {
+ if($_ =~ /^ *wait *(\d*)/) {
+ # instructed to sleep!
+ sleep($1);
+ }
+ }
+}
+
$SIG{CHLD} = \&REAPER;
for ( $waitedpid = 0;
@@ -164,6 +174,14 @@ for ( $waitedpid = 0;
}
loadtest("data/test$testnum");
+
+
+ my @cmd = getpart("reply", "cmd");
+ performcmd(@cmd);
+
+ # flush data:
+ $| = 1;
+
# send a custom reply to the client
my @data = getpart("reply", "data$part");
for(@data) {
@@ -172,6 +190,8 @@ for ( $waitedpid = 0;
print STDERR "OUT: $_";
}
}
+ my @postcmd = getpart("reply", "postcmd");
+ performcmd(@postcmd);
}
}
# print "Hello there, $name, it's now ", scalar localtime, "\r\n";