X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fgraphs%2Ftools%2Fdraw_graph.cgi;fp=helm%2Fgraphs%2Ftools%2Fdraw_graph.cgi;h=0000000000000000000000000000000000000000;hb=e108abe5c0b4eb841c4ad332229a6c0e57e70079;hp=d5d5b4a82ac0d25efde06a224e46d518b02ca25f;hpb=1456c337a60f6677ee742ff7891d43fc382359a9;p=helm.git diff --git a/helm/graphs/tools/draw_graph.cgi b/helm/graphs/tools/draw_graph.cgi deleted file mode 100755 index d5d5b4a82..000000000 --- a/helm/graphs/tools/draw_graph.cgi +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/perl - -use HTTP::Daemon; -use HTTP::Status; -use HTTP::Request; -use LWP::UserAgent; -use URI::Escape; -use CGI; -use FindBin; - -chdir $FindBin::Bin; # chdir to the directory of this perl script - -my $d = new HTTP::Daemon LocalPort => 8083; -print "Please contact me at: url, ">\n"; - -$SIG{CHLD} = "IGNORE"; # do not accumulate defunct processes - -while (my $c = $d->accept) { - if (fork() == 0) { - while (my $r = $c->get_request) { - if ($r->method eq 'GET' && $r->url->path eq "/draw") { - my $http_query = $r->url->equery; - my $cgi = new CGI("$http_query"); - my $url = $cgi->param('url'); - $url = $url.'¶m.PID='.$$; - print "URL: $url\n"; - - my $ua = LWP::UserAgent->new; - my $request = HTTP::Request->new(GET => "$url"); - my $response = $ua->request($request, "prova0.$$.dot"); - - if (system("make PID=$$ > log.$$") == 0) { - $c->send_file_response("prova.$$.html"); - } else { - $c->send_error(RC_INTERNAL_SERVER_ERROR); - } - } elsif ($r->method eq 'GET' && $r->url->path eq "/get_gif") { - my $http_query = $r->url->equery; - my $cgi = new CGI("$http_query"); - my $pid = $cgi->param('pid'); - print "Returning GIF: $pid\n"; - $c->send_file_response("prova.$pid.gif"); - system("make PID=$pid clean ; rm -f prova0.$pid.dot"); - } elsif ($r->method eq 'GET' && $r->url->path eq "/help"){ - print "Help requested!\n"; - my $response = new HTTP::Response; - $response->content("Graph Drawer Version: ???"); - $c->send_response($response); - } else { - $c->send_error(RC_FORBIDDEN) - } - } - $c->close; - undef($c); - exit; - } # fork -}