Skip to content

Commit

Permalink
Make slow.cgi more generic
Browse files Browse the repository at this point in the history
  • Loading branch information
denishowe committed Feb 25, 2024
1 parent eb2ede9 commit ed10b57
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions pub/misc/slow.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,8 @@
use strict;
use warnings;

my ($string, $delay) = split /\&/, $ENV{QUERY_STRING};
my ($string, $delay) = split /\&/, ($ENV{QUERY_STRING} || '&');
$string =~ s/%20/ /g;
print "Content-type: text/javascript\n\n";
sleep $delay;
print qq{
log('$string ($delay)');
};

# Local variables:
# compile-command: "http://foldoc.org/pub/js/slow.cgi?Body"
# End:
sleep ($delay || 1);
print $string;

0 comments on commit ed10b57

Please sign in to comment.