More Complex Service Example - Netscape ENTERPRISE SERVER 6.0 - NSAPI PROGRAMMER GUIDE Manual

Nsapi
Table of Contents

Advertisement

/* Write the output using net_write*/
return_value = net_write(sn->csd, simple_msg,
strlen(simple_msg));
if (return_value == IO_ERROR) {
return REQ_EXIT;
}
return REQ_PROCEED;
}

More Complex Service Example

The
function is a custom SAF which replaces the
send-images
demonstration available on the Netscape home pages. When a file is accessed as
/dir1/dir2/something.picgroup
being accessed by a
Mozilla/1.1
The file
something.picgroup
filename followed by a content-type (for example,
To load the shared object containing your function, add the following line at the
beginning of the
magnus.conf
Init fn=load-modules shlib=
Also, add the following line to the
type=magnus-internal/picgroup exts=picgroup
To execute the custom SAF during the request-response process for some object,
add the following line to that object in the
optional parameter,
delay
Service method=(GET|HEAD) type=magnus-internal/picgroup
fn=send-images
The source code is in
plugins/nsapi/examples
, the
send-images
browser. If not, it sends a short error message.
contains a list of lines, each of which specifies a
file:
yourlibrary
mime.types
, which is not used for this example):
in the
service.c
nsapi/examples/
subdirectory within the server root directory.
doit.cgi
function checks if the file is
one.gif image/gif
funcs=send-images
file:
file (
obj.conf
send-images
or
Chapter 6
Examples of Custom SAFs
Service Example
).
takes an
227

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise server 6.0

Table of Contents