iTP Secure WebServer System Administrator's Guide (iTPWebSvr 5.1+)
Using Common Gateway Interface (CGI) Programs
iTP Secure WebServer System Administrator’s Guide—522659-001
8-26
Response Headers
Response Headers
The headers used in all CGI responses take the form:
head_name: head_value
Table 8-5 lists CGI response headers.
Table 8-5. CGI Response Headers
Header Name Description
Content-encoding: Specifies the data compression code. The valid values are:
•
x-compress (for standard UNIX compression)
•
x-gzip (for GNU zip compression)
Content-length: Specifies the length of the output data in bytes.
This header is optional.
Content-type: Specifies a valid MIME type in the format type/subtype. See
Example 8-1 on page 8-8 for a MIME resource that provides a
complete list of the valid MIME types and subtypes.
Note: All CGI programs must send this header.
Expires: Specifies the date and time by which the web client should
consider the output invalid.
For example:
Monday, 13-Feb-95 12:00:00 GMT
This header is optional.
Location: 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.
Log-.* 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-userid: bobmac
This example generates the following entry in the extended log
file:
(cgi-userid bobmac)
This header is optional.
Status: Specifies the status of the request. The valid status codes are listed
in Table C-2, HTTP Status Codes, on page C-3.