SDSU CS 596: Client-Server Programming
Spring Semester, 1997
Doc 24, CGI Environment Examples

To Lecture Notes Index
San Diego State University -- This page last updated Apr 17, 1997

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. This document is modified from a similar document from NCSA


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

http://www-rohan.sdsu.edu/faculty/whitney/cgi-bin/cgiExamples/CGIEcho.cgi


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

http://www-rohan.sdsu.edu/faculty/whitney/cgi-bin/cgiExamples/CGIEcho.cgi/extra/path


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

http://www-rohan.sdsu.edu/faculty/whitney/cgi-bin/cgiExamples/CGIEcho.cgi?query


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

http://www-rohan.sdsu.edu/faculty/whitney/cgi-bin/cgiExamples/CGIEcho.cgi/extra/path?a=query&b=cat


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.

Press me. TYPE="checkbox" NAME="top" VALUE="on"

Press me. TYPE="checkbox" NAME="bottom" VALUE="on"

Type here. TYPE="text" NAME="userText" SIZE= 30

Press me. TYPE="radio" NAME="dial" VALUE="low"

Press me. TYPE="radio" NAME="dial" VALUE="high"


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. TYPE="checkbox" NAME="top" VALUE="on"

Press me. TYPE="checkbox" NAME="bottom" VALUE="on"

Type here. TYPE="text" NAME="userText" SIZE= 30

Press me. TYPE="radio" NAME="dial" VALUE="low"

Press me. TYPE="radio" NAME="dial" VALUE="high"


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. TYPE="checkbox" NAME="top" VALUE="on"

Press me. TYPE="checkbox" NAME="bottom" VALUE="on"

Type here. TYPE="text" NAME="userText" SIZE= 30

Press me. TYPE="radio" NAME="dial" VALUE="low"

Press me. TYPE="radio" NAME="dial" VALUE="high"