From ed10b577286a4e89adb49735aa894c49d7c8728b Mon Sep 17 00:00:00 2001 From: denishowe Date: Sun, 25 Feb 2024 16:13:39 +0000 Subject: [PATCH] Make slow.cgi more generic --- pub/misc/slow.cgi | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/pub/misc/slow.cgi b/pub/misc/slow.cgi index 9575782..a85bc9a 100644 --- a/pub/misc/slow.cgi +++ b/pub/misc/slow.cgi @@ -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;