{src/web/method/wrap-cgi.i} 

output-content-type("text/html").

// http://localhost/scripts/cgiip.exe/WService=wsbroker1/testwebcontext.p

output to "web".
put unformatted "Check cgilist.txt file in broker home directory.".
output close.

output to cgilist.txt.

put unformatted web-context:get-cgi-list("env").

def var ch as char.
def var i as int.
def var e as char.
def var v as char.

ch = web-context:get-cgi-list("env").
do i = 1 to num-entries(ch):
   e = entry(i, ch).
   v = web-context:get-cgi-value("env", e).
   put unformatted e space(10) v skip.    
end.

put unformatted skip(1).

put unformatted "config values" skip(1).
put unformatted "srvrAppMode" space(10) web-context:get-config-value("srvrAppMode") skip.
put unformatted "srvrDebug" space(10) web-context:get-config-value("srvrDebug") skip.
put unformatted "applicationURL" space(10) web-context:get-config-value("applicationURL") skip.
put unformatted "defaultCookiePath" space(10) web-context:get-config-value("defaultCookiePath") skip.
put unformatted "defaultCookieDomain" space(10) web-context:get-config-value("defaultCookieDomain") skip.
put unformatted "wsRoot" space(10) web-context:get-config-value("wsRoot") skip.
put unformatted "srvrAppMode" space(10) web-context:get-config-value("srvrAppMode") skip.
put unformatted "fileUploadDirectory" space(10) web-context:get-config-value("fileUploadDirectory") skip.
 

output close.


/*
a. web-context:get-cgi-list(env):
- I found in ADE possible values of: ENV, QUERY, FORM
- do you know of any other possible values for this argument?

b web-context:get-cgi-value(env, varname, delimiter)
- env looks to be the same as for 'get-cgi-list'

c. web-context:get-config-value(name) - I found these possible names in ADE classic web-speed files:
- srvrAppMode
- srvrDebug
- applicationURL
- defaultCookiePath
- defaultCookieDomain
- wsRoot
- srvrAppMode
- fileUploadDirectory

Do you know if applications would rely explicitly on 'get-config-value'? 
*/