iTP Secure WebServer System Administrators Guide (Version 7.5+)

http://www.faqs.org/rfcs/rfc822.html
The response content
The response content is the actual object being returned to a Web client. For example, this
content might consist of an HTML document, an image, or an audio file.
A simple example of output from a CGI program:
Content-type: text/html
<HTML><HEAD>
<TITLE>Example output</TITLE>
</HEAD><BODY>
This is the HTML document generated by a CGI program.
</BODY></HTML>
Response Headers
The headers used in all CGI responses take the form:
head_name: head_value
Table 20 (page 157) lists CGI response headers.
Table 20 CGI Response Headers
DescriptionHeader Name
Specifies the data compression code. The valid values are:Content-encoding:
x-compress (for standard UNIX compression)
x-gzip (for GNU zip compression)
Specifies the length of the output data in bytes.
This header is optional.
Content-length:
Specifies a valid MIME type in the format type/subtype.
See “Server MIME Types (page 143) for a MIME resource
Content-type:
that provides a complete list of the valid MIME types and
subtypes.
Note: All CGI programs must send this header.
Specifies the date and time by which the Web client should
consider the output invalid.
For example:
Expires:
Monday, 13-Feb-95 12:00:00 GMT
This header is optional.
Specifies the location of a new file for the server or client
to retrieve. The search begins at the server's root directory.
This header is optional.
Location:
Specifies that a CGI script should generate name and value
entries in the iTP Secure WebServer's extended log file by
writing out special HTTP headers.
For example:
Log-.*
Log-userid: bobmac
This example generates the following entry in the extended
log file: (cgi-userid bobmac)
This header is optional.
Specifies the status of the request. The valid status codes
are listed in “HTTP Status Codes” (page 262).
Status:
A Web client cannot properly interpret CGI program output unless it knows the output data (MIME)
type. Therefore, every response generated by a CGI program must contain aContent-type:
header. For example:
Returning Output 157