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-29
Nonparsed Headers
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, on
page C-3.
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.
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 client.
You control error logging by specifying an ErrorLog and/or ExtendedLog directive in
the server configuration file (httpd.config). For further details about enabling error
logging, see Managing Log Files on page 7-23.