From 3f79b3088e5eaa6185822f26c21a3b5e8548e60e Mon Sep 17 00:00:00 2001 From: Steven Schubiger Date: Thu, 19 Sep 2013 21:00:29 +0200 Subject: Make switches mutually exclusive --- server.cgi | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'server.cgi') 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"; -- cgit v1.2.3