iTP Secure WebServer System Administrator's Guide (Version 7.0)
Using Common Gateway Interface (CGI) Programs
iTP Secure WebServer System Administrator’s Guide—523346-012
8-28
Nonparsed Headers
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
•
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 specific status 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 Table C-2, HTTP Status Codes.
Nonparsed Headers
CGI programs can use the nonparsed header 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.