Error Stage
108
Netscape Enterprise Server NSAPI Programmer’s Guide • November 2001
Error Stage
If a server application function results in an error, it sets the HTTP response status
code and returns the value
REQ_ABORTED
. When this happens, the server stops
processing the request. Instead, it searches for an Error directive matching the
HTTP response status code or its associated reason phrase, and executes the
directive’s function. If the server does not find a matching Error directive, it returns
the response status code to the client.
The following Error-class functions are described in detail in this section:
•
send-error
sends an HTML file to the client in place of a specific HTTP
response status.
•
qos-error
returns an error page stating which quality of service limits caused
the error and what the value of the QOS statistic was.
send-error
Applicable in
Error
-class directives.
The
send-error
function sends an HTML file to the client in place of a specific
HTTP response status. This allows the server to present a friendly message
describing the problem. The HTML page may contain images and links to the
server’s home page or other pages.
Parameters
path
specifies the full file system path of an HTML file to send to
the client. The file is sent as
text/html
regardless of its name
or actual type. If the file does not exist, the server sends a
simple default error page.
reason
(optional) is the text of one of the reason strings (such as
“Unauthorized” or “Forbidden”). The string is not case
sensitive.
Summary of Contents for ENTERPRISE SERVER 6.0
Page 1: ...NSAPI Programmer s Guide Netscape Enterprise Server Version6 0 November 2001...
Page 134: ...CGI to NSAPI Conversion 134 Netscape Enterprise Server NSAPI Programmer s Guide November 2001...
Page 306: ...cinfo 306 Netscape Enterprise Server NSAPI Programmer s Guide November 2001...
Page 312: ...Sample MIME Types File 312 Netscape Enterprise Server NSAPI Programmer s Guide November 2001...
Page 324: ...Buffered Streams 324 Netscape Enterprise Server NSAPI Programmer s Guide November 2001...
Page 332: ...332 Netscape Enterprise Server NSAPI Programmer s Guide November 2001...
Page 340: ...340 Netscape Enterprise Server NSAPI Programmer s Guide November 2001...
Page 346: ...346 Netscape Enterprise Server NSAPI Programmer s Guide November 2001...
Page 352: ...352 Netscape Enterprise Server NSAPI Programmer s Guide November 2001...