Contents of scripts/testcgi.bas

10 rem
20 print "Content-type: text/html"
25 print ""
30 print "<HTML><HEAD><TITLE>RCGI Low-Level Interface Report</TITLE></HEAD>"
35 print "<BODY>"
40 print "<H1>RCGI Low-Level Interface Report</H1>"
50 print
60 print "<B>argc</B> is <I>", argc$, "</I><BR>"
65 print "<B>argv</B> is <I>", argv$, "</I><BR>"
70 print
100 print "<B>server_software</B> = <I>", server_software$, "</I><BR>"
110 print "<B>server_name</B> = <I>",, server_name$, "</I><BR>"
120 print "<B>gateway_interface</B> = <I>", gateway_interface$, "</I><BR>"
130 print "<B>server_protocol</B> = <I>", server_protocol$, "</I><BR>"
140 print "<B>server_port</B> = <I>",, server_port$, "</I><BR>"
150 print "<B>request_method</B> = <I>", request_method$, "</I><BR>"
160 print "<B>http_accept</B> = <I>",, http_accept$, "</I><BR>"
170 print "<B>path_info</B> = <I>",, path_info$, "</I><BR>"
180 print "<B>path_translated</B> = <I>", path_translated$, "</I><BR>"
190 print "<B>script_name</B> = <I>",, script_name$, "</I><BR>"
200 print "<B>query_string</B> = <I>",, query_string$, "</I><BR>"
210 print "<B>remote_host</B> = <I>",, remote_host$, "</I><BR>"
220 print "<B>remote_addr</B> = <I>",, remote_addr$, "</I><BR>"
230 print "<B>remote_user</B> = <I>",, remote_user$, "</I><BR>"
240 print "<B>content_type</B> = <I>", content_type$, "</I><BR>"
250 print "<B>content_length</B> = <I>", content_length$, "</I><BR>"
260 if (val(content_length$) <= 0) then 290
270 linput line$
280 print "<B>data</B> = <I>", line$, "</I><BR>"
290 print "</BODY>"
300 rem Standard trailer.  Note variable used to insert script name in hyperlink below.
310 rem Hyperlink points to a BASIC script that displays raw HTML rather than translated HTML.
320 print "<hr>"
330 print "<a href="; chr$(34); "/scripts/convert.bas?"; mid$(script_name$,2); chr$(34);" ><it>";
340 print "See how this script is written.</it></a>"
350 print "<p>"
360 print "Copyright &#169; 1995 Novell, Inc.  All Rights Reserved."
370 print "</body></HTML>"
400 end