8 $name = $query->param('name');
9 $stallAt = $query->param('stallAt');
10 $stallFor = $query->param('stallFor');
11 $mimeType = $query->param('mimeType');
13 my $filesize = stat($name)->size;
14 print "Content-type: " . $mimeType . "\n";
15 print "Content-Length: " . $filesize . "\n\n";
17 open FILE
, $name or die;
21 while (($n = read FILE
, $data, 1024) != 0) {
23 if ($total > $stallAt) {
24 if (defined $stallFor) {
25 Time
::HiRes
::sleep($stallFor)