In which programming language can I develop NSAPI functions ?
- Most people use either C++ or C. Also
Delphi can be used, note that
applications written in Delphi 3 or 4 can run on both NSAPI and
ISAPI, unless they have been specifically designed to use features
only available on either ISAPI or NSAPI. For more see
Anders Melander's site. The
last possibility is Visual Basic with this
DLL
to bind it to NSAPI
Where are base64 functions ?
- Within your NSAPI function specify the following : extern
char *_uudecode(char *); This has been reported as not working
with the Proxy server, so if you need
download this C
implementation of uudecode/encode.
Are exceptions handled by Enterprise Server ?
- NO, exceptions are not handled. The server is compiled and linked
in C++.
How to prevent Enterprise to generate standard HTTP headers ?
- One way to do this is to set rq->senthdrs to
1 before calling any protocol_*
routines. Once you do that the server will not try to send headers
at all.
How to prevent Enterprise to close the socket handle ?
- One way to do this is to set sn->csd_open to
0. You will be require to close the
socket with net_close( sn->csd)
In which order are the obj's directives executed ?
- It always starts by executing the default object and can build up
a list of other objects that match. As objects are added to the
list, it goes back and executes the missed steps (eg. Authtrans,
NameTrans) for the new object. As it continues, the steps for all
matching objects are executed.
How do I know in which obj phase the code is running ?
- Check the string 'Directive' in pb structure.
Why my NSAPI function is never executed by the Server ?
- Whenever functions are called, the functions returns a REQ_PROCEED
(if successful) and the server jumps to the next kind of directive
in the obj.conf file. Thus the order of directives in theobj.conf is
critical. See the Programmer's Guide, Chapter 4-
Server operation, Details for each directive/step.
Where are the crypto & SSL functions ?
- << We do not currently expose the necessary hooks to the
security library that the server uses, and the API is not the SSLref
API. In future versions of the server, a new cryptographic API will
be provided for you to use, but until then you'll need to link in
the SSL reference implementation and use that>>. -- Rob
McCool, robm@netscape.com
(23/10/96)
- Look at the md5hash_* functions in nsapi.h.
How do I wrote back on SSL/Socket ?
- One can only use NSAPI socket calls on an SSL enabled socket :
net_write().
- Look at the md5hash_* functions in nsapi.h.
How to define path such as subsequent requests refer to the same
directory ?
- Set ntrans-base in rq->vars to the desire
path.
Why ntrans-base is always null ?
- You can't ask for: pblock_findval("ntrans-base",rq->vars);
until after the directive document-root that generates
that value has run.
What is the socket over which the server is communicating ?
- The socket over which the web server is communicating to the
browser is in sn->csd.
How do I lock a file ?
- There's two bugs in the NSAPI doc regarding functions system_flock,
system_ulock and system_tlock :
- On SUCCESS all the functions returned 0 and less-than-zero in
case of failure !
- IO_OK doesn't exist but IO_OKAY which
equals 1.
- system_tlock does a test for the lock and grab it if
available.
I have locked a file but still have trouble with it ?
- File locking is process based which means the lock is shared by
all the threads, therefore you may need to use a critical section to
prevent interference between threads. Note that system_fwrite_atomic
is said to be thread safe.
How do I disable the memory pool ?
- Call to MALLOC or STRDUP allocates memory
from the server memory pool, if you want to use memory from the
system heap add this line at the beginning of you obj.conf Init
fn=pool-init disable=true
Where is SERVER_SOFTWARE macro ?
- The SERVER_SOFTWARE macro has disapeared since release
3.0, the equivalent is char *version = conf_getServerString();
When is auth-user accessible within a Pathcheck directive ?
- When default authentication is enabled via the check-acl="default"
directive, in ES2.0.1 the auth-user is present in Patcheck whereas
in ES3.x auth-user isn't present until the ObjectType
phase.Interestingly, if the page requested contains a server side
include (in which case the default Object is called again) the next
time through PathCheck the auth-user is present.
|