swirl Guide to OmniMark 5   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
    Related Concepts   Other Library Functions  
function   cgiGetEnv (CGI Testing library)    

Library: omcgi (test version) - CGI testing
Include: omcgi.xin, omutil.xin, builtins.xin

Declaration

  define function cgiGetEnv
    into modifiable stream env-shelf

Where:
env-shelf



Purpose

The cgiGetEnv function that is part of the OmniMark CGI Testing library emulates the behavior of the cgiGetEnv function that is part of the OmniMark CGI library.

When using this function you have to specify the path and name of the file that the capture.xom utility creates, by setting the value of the cgiTestFile variable to the path and name of the appropriate file. Do this by specifying a "-d" option on the command line or in your arguments file:

  -d cgiTestFile "d:\inetpub\scripts\cgitest\captured-file.xml"

These two functions have the same name and function call formats. So when you have finished developing and debugging your CGI program, and switch from using the CGI Testing library to using the CGI library, you don't have to change any of your code.

The cgiGetEnv function (CGI Testing library) retrieves the values of all CGI-related environment variables stored in the XML-like file that the capture.xom utility generates. The function places the environment variable values on a keyed stream shelf of name/value pairs, where the key of the item is the name of the environment variable and the item's value is the value of that variable. Declare the shelf you want the variables placed on as variable. For example:

     declare #process-input has unbuffered
     declare #process-output has binary-mode

     include "omutil.xin"
     include "omcgi.xin"

     process
        local stream env-vars variable
        cgiGetEnv into env-vars

The cgiGetEnv function retrieves the following list of CGI-related environment variables. Note that not all web servers will set all of these variable values in all situations. If the web server doesn't set a variable, its value is a zero-length string.

      Related Concepts
   CGI programming with OmniMark
 
Other Library Functions
   cgiGetEnv (CGI Testing library)
   cgiGetQuery (CGI Testing library)
 
----  

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ OMX ] [ OMX ] [ ERRORS ]

Generated: August 11, 2000 at 3:07:02 pm
If you have any comments about this section of the documentation, send email to docerrors@omnimark.com

Copyright © OmniMark Technologies Corporation, 1988-2000.