Result Codes; Creating And Using Custom Safs - Netscape ENTERPRISE SERVER 6.0 - NSAPI PROGRAMMER GUIDE Manual

Nsapi
Table of Contents

Advertisement

Result Codes

Upon completion, a SAF returns a result code. The result code indicates what the
server should do next. The result codes are:
REQ_PROCEED
indicates that the SAF achieved its objective. For some request-response steps
(AuthTrans, NameTrans, Service, and Error), this tells the server to proceed to
the next request-response step, skipping any other SAFs in the current step. For
the other request-response steps (PathCheck, ObjectType, and AddLog), the
server proceeds to the next SAF in the current step.
REQ_NOACTION
indicates the SAF took no action. The server continues with the next SAF in the
current server step.
REQ_ABORTED
indicates that an error occurred and an HTTP response should be sent to the
client to indicate the cause of the error. A SAF returning
also set the HTTP response status code. If the server finds an
matching the status code or reason phrase, it executes the SAF specified. If not,
the server sends a default HTTP response with the status code and reason
phrase plus a short HTML page reflecting the status code and reason phrase
for the user. The server then goes to the first
REQ_EXIT
indicates the connection to the client was lost. This should be returned when
the SAF fails in reading or writing to the client. The server then goes to the first
AddLog

Creating and Using Custom SAFs

Custom SAFs are functions in shared libraries that are loaded and called by the
server. Follow these steps to create a custom SAF:
Write the Source Code
1.
using the NSAPI functions. Each SAF is written for a specific directive.
Compile and Link
2.
the source code to create a shared library (
directive.
REQ_ABORTED
Error
directive.
AddLog
or
.so, .sl,
.dll)
Chapter 4
Creating Custom SAFs
Result Codes
should
directive
file.
115

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise server 6.0

Table of Contents