iTP Secure WebServer System Administrator's Guide (iTPWebSvr 6.0+)
Using Common Gateway Interface (CGI) Programs
iTP Secure WebServer System Administrator’s Guide—523346-002
8-28
Server Headers
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 a Content-type: header. For example:
Content-type: text/html
Clients ignore any headers they are unable to interpret.
Server Headers
Two headers (Location: and Status:) are used by CGI programs to pass
information to the server rather than directly to the web client. These headers cause
the server to modify its response to the web client.
Location Header
The Location: header instructs the server to redirect the web client to another URL.
This redirection consists of a specific URL the web client should access in place of the
original URL. For example, a CGI program returning the header
Location: http://www.foo.com/home.html
is instructing the server to redirect the web client to a URL
http://www.foo.com/home.html
The Resource Locator Service (RLS) passes the Location header sent by the remote
server unaltered to the client server; the RLS is not designed to modify the Location
header from the remote server. Accordingly, you should configure the remote
webserver to either:
•
Not send redirect location headers or
•
Send a redirect location that properly refers to the DNS name (or IP address) and
port of the iTP Secure WebServer front-end server.
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.
Table 8-5. CGI Response Headers
Header Name Description