CGI test cases

This document references a test server that has implemented the CGI interface. It is provided to give a better understanding of how CGI works in reality.

If you are interested, look at the source for the CGI script used in these examples. This is found as SYS:WEB/SCRIPTS/TESTCGI.BAS.


This is a request for a CGI script with no extra path information and no query.

/scripts/testcgi.bas


This is a request for a script with extra path information, and no query. Note that this is a server running NCSA httpd, with a DocumentRoot of /u/Web.

/scripts/testcgi.bas/extra/path


This is a request for a script with no extra path information, and an ISINDEX query.

/scripts/testcgi.bas?query


This is a request for a script with extra path information as well as an ISINDEX query.

/scripts/testcgi.bas/extra/path?a+query


You'll need a browser that supports HTML forms for this example. Clicking the Submit button sends a form request with no extra path information using the GET method.

Press me.


You'll need a browser that supports HTML forms for this example. Clicking the Submit button sends a form request with no extra path information using the POST method.

Press me.


You'll need a browser that supports HTML forms for this example. Clicking the Submit button sends a form request with extra path information of /foo using the POST method.

Press me.