summaryrefslogtreecommitdiffstats
path: root/server.cgi
diff options
context:
space:
mode:
authorGravatar Steven Schubiger <stsc@refcnt.org> 2013-09-19 21:00:29 +0200
committerGravatar Steven Schubiger <stsc@refcnt.org> 2013-09-19 21:00:29 +0200
commit3f79b3088e5eaa6185822f26c21a3b5e8548e60e (patch)
tree1992bbf92df82b1cf1ac95b9742fc67c5b80938a /server.cgi
parentb29a7dbc8fcef7ffb5ecb50f84b99d38d4c14b8b (diff)
downloaddistdns-3f79b3088e5eaa6185822f26c21a3b5e8548e60e.tar.gz
distdns-3f79b3088e5eaa6185822f26c21a3b5e8548e60e.tar.bz2
Make switches mutually exclusive
Diffstat (limited to 'server.cgi')
-rwxr-xr-xserver.cgi4
1 files changed, 4 insertions, 0 deletions
diff --git a/server.cgi b/server.cgi
index f9f8579..43bf0bd 100755
--- a/server.cgi
+++ b/server.cgi
@@ -81,6 +81,10 @@ if ($params{init}) {
open(my $fh, '>', $session_file) or die "Cannot open $session_file for writing: $!\n";
print {$fh} "$params{session}\n";
close($fh);
+
+ print $query->header('application/json');
+ print encode_json({ entries => [], error => undef });
+ exit;
}
else {
open(my $fh, '<', $session_file) or die "Cannot open $session_file for reading: $!\nPerhaps try running --init\n";