iTP Secure WebServer System Administrators Guide (Version 7.5+)
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 toredirect 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
• Send a redirect location that properly refers to the DNS name (or IP address) and port of the
iTP Secure WebServer front-end server.
Status Header
The Status: header instructs the server to return a specificstatus response to the Web client. This
status information consists of a numeric HTTP status code followed by text explaining the code. For
example, a CGI program might cause the server to return a bad-request response to the Web
client:
Status: 400 Bad Request Content-type: text/html
<HTML><HEAD>
<TITLE>Bad Request</TITLE>
</HEAD><BODY>
You sent this server a bad request.
</BODY></HTML>
For a complete list of the HTTP status codes, see “HTTP Status Codes” (page 262).
Nonparsed Headers
CGI programs can use the nonparsedheader feature to return responses directly to the Web client.
To use this feature, the CGI program must have a file name that begins with nph- (for example,
nph-payment.cgi). This marker tells the server not to process any of the CGI program's output.
A CGI program using the nonparsed feature must construct a complete HTTP response, including
all status and header information.
Logging Error Information
You use a CGI program's standard error to log error information. Any output written to standard
error is recorded in either or both of two places:
• The ErrorLog file
• The stderr field in the ExtendedLog file
Standard errors from a server CGI program are not returned to the Web.
158 Using Common Gateway Interface (CGI) Programs










