add noop operation similar to the ruby version
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sun, 10 Jan 2010 00:39:52 +0000 (19:39 -0500)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sun, 10 Jan 2010 00:39:52 +0000 (19:39 -0500)
msva

diff --git a/msva b/msva
index 09279bbb807b117804445951d4cb84b42ae894be..63930c833c69d0016d46da4fbbf006a2117d4ae9 100755 (executable)
--- a/msva
+++ b/msva
@@ -16,6 +16,7 @@ use strict;
   use JSON;
 
   my %dispatch = (
+                  '/' => \&noop,
                   '/reviewcert' => \&reviewcert,
                   '/extracerts' => \&extracerts,
                  );
@@ -32,6 +33,14 @@ use strict;
     return $self;
   }
 
+  sub noop {
+    my $self = shift;
+    my $cgi = shift;
+    return '200 OK', { available => JSON::true,
+                       protoversion => 1,
+                       server => "MSVA-Perl 0.1" };
+  }
+
   sub handle_request {
     my $self = shift;
     my $cgi  = shift;