A World Wide Web server has a set of legal URLs that it makes available to WWW clients. Every legal URL that a server provides corresponds to a file on that server. Normally, those files are images, HTML files, or other static documents. When a server is asked to supply such a static document, it simply returns the document's contents. However, when a client asks for a URL that points to a CGI application, the following things happen:
The client treats the output from the CGI-app the same as it would if the data had come from a static file. So, if a CGI-app produces HTML, it will appear the same, when viewed by the client, as if the HTML had been stored statically. A CGI application isn't limited to creating HTML pages, though -- it can produce any type of data, including images and sound files.
Sometimes, however, the output from a CGI application is secondary to the CGI-app's side effects (see Section 12.2.4). CGI applications can be written to perform other actions on the server in addition to producing HTML pages. If a CGI-app is constructed correctly, it can act as a gateway to other applications (in fact, this is why the Common Gateway Interface is named as it is). For example: there are many telephone directory services available on the World Wide Web, such as Four11 Directory Services. These services maintain large databases which contain publicly listed names, addresses, and telephone numbers. Users can access the information in these databases over the World Wide Web through a CGI-based front-end. When a user asks for information on a person, they send a query to a CGI application that acts as an interface to the database. This CGI application accesses the databse and generates a WWW page containing the information requested in the query.
Copyright © 1996 J. Patrick Van Metre, All Rights Reserved
J. Patrick Van Metre
<vanmetre@csgrad.cs.vt.edu>
Last modified: Sat Oct 26 13:26:04 1996