Fix testagent.cgi and testserver.pl; determine group by CGI