CGI test cases
This document references a test server which has implemented the CGI
interface. It is provided to give a better understanding of how CGI
works in reality.
If you are interested, you should look at the source for the CGI script used in these
examples.
For more source of CGI scripts, see the CGI
archive of scripts people have written. In addition, see the NCSA httpd distribution in the
cgi-src
directory.
This is just a request for a CGI script with no extra path information
and no query.
http://hoohoo.ncsa.uiuc.edu/cgi-bin/test-cgi
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.
http://hoohoo.ncsa.uiuc.edu/cgi-bin/test-cgi/extra/path
This is a request for a script with no extra path information, and an
ISINDEX query.
http://hoohoo.ncsa.uiuc.edu/cgi-bin/test-cgi?query
This is a request for a script with extra path information as well as
an ISINDEX query.
http://hoohoo.ncsa.uiuc.edu/cgi-bin/test-cgi/extra/path?a+query
You'll need a browser which supports HTML forms for this example.
Clicking the submit button will send a form request with no extra
path information using the GET method.
You'll need a browser which supports HTML forms for this example.
Clicking the submit button will send an form request with no extra
path information using the POST method.
You'll need a browser which supports HTML forms for this example.
Clicking the submit button will send an form request with extra path
information of /foo using the POST method.
Return to the overview
CGI - Common Gateway Interface
[email protected]