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 thesource for the CGI script used in these examples.

For more source of CGI scripts, see the CGI archive of scripts people have written.


This is just a request for a CGI script written in OS/2 REXX with no extra path information and no query.

http://host.domain/cgi-bin/test.cgi


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

http://host.domain/cgi-bin/test.cgi/extra/path


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

http://host.domain/cgi-bin/test.cgi?query


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

http://host.domain/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 an form request with no extra path information using the GET method.

Press me.

Text:


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.

Press me.

Text:


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.

Press me.


Let's test the file upload input here as a multipart/form-data: Text:

Press me.


Let's test the file upload input here (no multi just gets file names): Text:

Press me.


Let's test the file upload input here as a multipart/form-data (get): Text:

Press me.


Let's test the file upload input here (no multi get): Text:

Press me.


Wierd plain/text to see what the browser does. Text:

Press me.