Server Instructions in obj.conf
•
Service
Generates and sends the response to the client. This involves setting the HTTP
result status, setting up response headers (such as content-type and
content-length), and generating and sending the response data. The default
response is to invoke the
requested file along with the appropriate header files to the client.
The default
Service method="(GET|HEAD|POST)" type="*~magnus-internal/*"
fn="send-file"
This directive instructs the server to call the
any request whose method is
begin with
mean "does not match.")
Another example is:
Service method="(GET|HEAD)" type="magnus-internal/imagemap"
fn="imagemap"
In this case, if the method of the request is either
the requested resource is
imagemap
•
AddLog
Adds an entry to a log file to record information about the transaction. For
example:
AddLog fn="flex-log" name="access"
This example calls the
request in the log file named
•
Error
Handles an HTTP error. This directive is invoked if a previous directive results
in an error. Typically the server handles an error by sending a custom HTML
document to the user describing the problem and possible solutions.
For example:
Error fn="send-error" reason="Unauthorized"
path="D:/netscape/server4/errors/unauthorized.html"
In this example, the server sends the file in
D:/netscape/server4/errors/unauthorized.html
requests a resource that it is not authorized to access.
28
Netscape Enterprise Server NSAPI Programmer's Guide • November 2001
send-file
directive is:
Service
GET
. (Note the use of the special characters
magnus-internal/
"magnus-internal/imagemap"
is called.
flex-log
access
function to send the contents of the
send-file
,
, or
, and whose
HEAD
POST
or
GET
function to log information about the current
.
function in response to
does not
type
to
*~
, and the type of
HEAD
, the function
whenever a client