Fairlight OneGate
Documentation
Version: 03.00.03
Released: 11/14/06

Program Flow

The logic flow of CGI using OneGate is straightforward, and is as follows:

  1. A request is sent from a browser or other application to the web server (httpd) at the URI that indicates the location of the onegate program. This request contains one hidden field called onegate_set, which tells OneGate which program set to concern itself with for this particular execution of the program.

  2. The web server (httpd) then starts onegate.

  3. OneGate performs various security checks. Assuming that everything about the data and configuration is successful, and that the execution is not aborted due to a configurable session count or security-related configuration, it writes the XML file into a spool directory, and then executes all commands listed in the program set, in order. If the session count was exceeded for the configurable amount of retry time, a user-authorable error page is sent back instead at this point, and the program terminates.

  4. After all programs in the set have been executed successfully, the MIME type file is checked for in the spool. If one was written by your application, and is valid, it determines the MIME type of the outgoing response to the server (httpd) for delivery to the remote client.

    The result file, which at least one (if not several) of your commands in the program set should have written to in the spool directory, is then passed back to the remote client via the web server (httpd). In the event of a command failure, a OneGate warning is issued to the client instead. Due to security considerations, this is the case if any command in the set fails (as determined by an exit code other than zero).

  5. OneGate removes all spool files, including any uploaded files which your application should have processed, logs the access, and terminates.


Back to Table of Contents

Copyright 2003-2006, Fairlight Consulting. All rights reserved.

Back to Fairlight Consulting