currently there is no way to know if as script via _HTTP_CGI fails.
The function should return the script exit code.
Also breaking this function up into a function for calling/starting the CGI and one for sending that response would be great.
This would allow script to be able to return alternative pages when CGI fails.