Converted upstream server to CGI script