commit 46ca4c42e2fa4202c1574d014a18460316505f42
parent 4516bfc5a39f8ea8632cd1ed240d350454878c33
Author: René Wagner <rwagner@rw-net.de>
Date: Mon, 8 Feb 2021 21:52:37 +0100
minor formatting and sanity check
Diffstat:
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/faqs.pl b/faqs.pl
@@ -55,7 +55,7 @@ sub faqs
my @rows = $dbh->selectall_array(sql());
if ( !scalar @rows ) {
- push @return, 'No faqs found!';
+ push @return, ('No faqs found!', '');
}
else {
foreach (@rows) {
@@ -72,7 +72,6 @@ sub faqs
}
}
$dbh->disconnect();
- push @return, '';
return @return;
}
diff --git a/index.pl b/index.pl
@@ -19,6 +19,10 @@ if (!defined($ENV{'SERVER_PROTOCOL'}) || $ENV{'SERVER_PROTOCOL'} ne 'GEMINI') {
write_response('CGI_ERROR', 'CGI execution error', undef);
}
+if ($ENV{'QUERY_STRING'} ne '' || $ENV{'PATH_INFO'} ne '') {
+ write_response('NOT_FOUND', 'File not found', undef);
+}
+
my @body = ();
push @body, header();
push @body, body();