[0001]
[0002]
[0003]
[0004]
[0005]
[0006]
[0007]
[0008]
[0009]
[0010]
[0011]
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
[0049]
[0050]
[0051]
[0052]
[0053]
[0054]
[0055]
[0056]
[0057]
[0058]
[0059]
[0060]
[0061]
[0062]
[0063]
[0064]
$!
$! Dick Munroe (munroe@csworks.com)
$!
$! The following is a "server neutral" CGI that runs under the
$! following HTTP server environments:
$!
$!	1. OSU
$!	2. WASD using OSU emulation
$!	3. WASD using (sub)processes.
$!
$! Use is simple, just put the code where indicated and go from
$! there.  When direct interaction with the HTTP server is
$! necessary, use SAY which will direct the output to the
$! appropriate spot.
$!
$
$ theDecnetFlag = (f$type(wwwexec_rundown_string) .nes. "")
$ if (theDecnetFlag)
$ then
$     nl = f$fao("!/")         !  CR/LF sequence
$     say = "write net_link"
$     say "<DNETRECMODE>"      ! Set implied carriage control.
$     cgisymbols := $cgi-bin:[000000]cgi_symbols.exe
$     cgisymbols "www_" "form_"
$ else
$     say = "write sys$output"
$     cgiutl := $cgi-bin:[000000]cgiutl.exe
$     cgiutl /URLDECODE /SYMBOL /PREFIX=form_FLD
$ endif
$ 
$ theOSUFlag = (f$extract(0,3,www_server_software) .eqs. "OSU")
$ theVerifyFlag = (f$trnlnm("httpd$verify") .nes. "")
$ theWASDFlag = (f$extract(0,10,www_server_software) .eqs. "HTTPd-WASD")
$ if (theWASDFlag) .and. (.not. theVerifyFlag)
$ then
$     set message /nofacility /noidentification /noseverity /notext
$ endif
$ if (theVerifyFlag)
$ then
$     if (theDecnetFlag)
$     then
$         say "Content-type: text/plain",nl,nl
$         define sys$output net_link:
$         set verify
$     endif
$     show symbol/global/all
$     show symbol/local/all
$ endif
$
$! The CGI code goes here.
$
$ exit
$ 
$!
$! If a "Location" header is needed, call this routine.
$!
$
$ Location: subroutine
$ if (theDecnetFlag)
$ then say "Location: " + P1,nl,nl
$ else cgiutl /location=*p1
$ endif
$ exit
$ endsubroutine