A Web server passes information to CGI programs using environment variables. If the HTTP Method is ″POST″ the CGI also obtains information from the Web Server through stdin. The CGI program uses stdout to send its response back to the Web server. The response consists of a set of headers (such as Content-Length and Content-Type) followed by the response body which is frequently HTML data.
The following environment variables are passed by the Web server to High Availability CGI programs:
The ″Cluster-Enabled″ and ″Accept-HTSession″ headers should be returned in each response from a High Availability CGI program. Cluster-Enabled:1
An error will result if the ″Cluster-Enabled″ header is returned by a CGI program with a value of ″1″, but the Web Server is not configured to allow that CGI program to be Highly available.
When the Web server receives the ″Cluster-Enabled″ header with a value of ″1″, the server will create a new session entry and indicate that the session is cluster-enabled.
Cluster-enabled CGI programs will return the ″Accept-HTSession″ header to the Web server with a value equal to the value passed to the CGI in the QZHBNEXT_SESSION_HANDLE environment variable. An error will result if the value specified with ″Accept-HTSession″ does not match the value passed to the CGI in QZHBNEXT_SESSION_HANDLE. For CGI programs that are not cluster-enabled, the ″Accept-HTSession″ CGI header remains unmodified.