CGIExecute method will call external program and let it
execute the request, and provide proper response that will
be sent to the client. You need only to provide path to the
CGI executable, together with any arguments it may
need.
wodWebServer will set environment variables needed for
the CGI, will redirect standard input/output handles, wait
for CGI response, populate Response.Body with it,
and finally call Response.Send method to
deliver it to the client.
CGI can be any executable running as console
application. You can use PHP, PERL,
C++ or any other language to create CGI scripts.
There are two events correlated to CGI scripts:CGIStart
that is fired just before script is to be executed
(allowing you to change environment for the CGI script),
and CGIStop
(allowing you to change response before it is sent to the
client)
WARNING: Before using this method
you should set
Response.Filename
property to empty string "", otherwise your CGI could rewrite your
HTML resources stored on the disk. This will typically happen if you
set
DocumentRoot
property.