]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/graphs/tools/uri_set_queue.cgi
Initial revision
[helm.git] / helm / graphs / tools / uri_set_queue.cgi
index 6c6baf096d60605a31683dbb58f461170b926f21..6a5d16ad51949042a9faaa82984004b0400549ef 100755 (executable)
@@ -5,7 +5,10 @@ use HTTP::Status;
 use HTTP::Response;
 use CGI;
 
-my $d = new HTTP::Daemon LocalPort => 8084;
+$urisetqueueport = $ENV{'URI_SET_QUEUE_PORT'} || $urisetqueueport;
+
+my $d = new HTTP::Daemon LocalPort => $urisetqueueport
+ or die "Error: port $urisetqueueport not available.";
 print "Please contact me at: <URL:", $d->url, ">\n";
 
 $SIG{CHLD} = "IGNORE"; # do not accumulate defunct processes
@@ -126,6 +129,11 @@ while (my $c = $d->accept) {
             $response->content("<?xml version=\"1.0\"?>\n<done/>\n");
            $response->content_type('text/xml');
             $c->send_response($response);
+        } elsif ($r->method eq 'GET' && $r->url->path eq "/help"){
+           print "Help requested!\n";
+          my $response = new HTTP::Response;
+           $response->content("URI-Set (Queue) Version: ???");
+           $c->send_response($response);
         } else {
             $c->send_error(RC_FORBIDDEN)
         }