Ford & Mason Ltd
HOME
ABOUT
CONTACT
RESOURCES
ADVERTISING



donations support the development of
cronolog.org
and
refcards.com

next up previous contents index
Next: Writing CGI scripts Up: The CGI specification Previous: Standard input stream


Output from the CGI script

The output from the CGI script is read by the server and usually passed on to the requesting client. The output is interpreted as a set of MIME-type HTTP headers, followed by a single blank line, followed by the data. The output may consist of just a single line containing:

    Location: url

which indicates that the request should be redirected to the specified URL. If the URL refers to a document served by the same server, the server will usually intercept the response and service it without notifying the client of the fact. If the browser receives a redirection, it may automatically send a new request to the server indicated, without notifying the user.

Normally the output of a CGI script will contain at least a Content-type header, which indicates to the browser how the data is to be interpreted. The script may include other HTTP headers as discussed in Section gif, and further headers may be inserted by the server.


[ITCP]Spinning the Web by Andrew Ford
© 1995 International Thomson Publishing
© 2002 Andrew Ford and Ford & Mason Ltd
Note: this HTML document was generated in December 1994 directly from the LaTeX source files using LaTeX2HTML. It was formatted into our standard page layout using the Template Toolkit. The document is mainly of historical interest as obviously many of the sites mentioned have long since disappeared.

 
Copyright © 1996-2002 Ford & Mason Ltd