Previous     Contents     Index     Next     
iPlanet Web Server, FastTrack Edition Programmer's Guide



Chapter 4   NSAPI Changes


This chapter lists the changes to NSAPI in iPlanet Web Server versions 4.0 and 4.1. The sections are as follows:



Version 4.0 Changes

This section lists the changes to NSAPI in iPlanet Web Server version 4.0. These changes are:


Privatization of Some Data Structures

In iPlanet Web Server 4.1, some data structures have been moved from nsapi.h to nsapi_pvt.h. The data structures in nsapi_pvt.h are now considered to be private data structures, and you should not write code that accesses them directly. Instead, use accessor functions. We expect that very few people have written plugins that access these data structures directly, so this change should have very little impact on existing customer-defined plugins. Look in nsapi_pvt.h to see which data structures have been removed from the public domain and to see the accessor functions you can use to access them from now on.

Plugins written for server version 3.x that access contents of data structures defined in nsapi_pvt.h will not be source compatible with iPlanet Web Server 4.1, that is, it will be necessary to #include "nsapi_pvt.h" in order to build such plugins from source. There is also a small chance that these programs will not be binary compatible with iPlanet Web Server 4.1, because some of the data structures in nsapi_pvt.h have changed size. In particular, the directive structure is larger, which means that a plugin that indexes through the directives in a dtable will not work without being rebuilt (with nsapi_pvt.h included).

We hope that the majority of plugins do not reference the internals of data structures in nsapi_pvt.h, and therefore that most plugins will be both binary and source compatible with iPlanet Web Server 4.1.


Logging Changes

The following API changes support the logging modifications in iPlanet Web Server 4.0:

  • New Init-class SAF, flex-rotate-init, lets you initialize log rotation for logs that use the flexible format.

    For more information, see the discussion of flex-rotate-init in Chapter 3, "Predefined SAFs and the Request Handling Process," in the NSAPI Programmer's Guide for iPlanet Web Server.

  • New flexlog token Req->headers.cookie.name logs the value of a cookie variable name if it is present in the request's headers and "-" otherwise.

    For more information, see the discussion of flex-init in Chapter 3, "Predefined SAFs and the Request Handling Process," in the NSAPI Programmer's Guide for iPlanet Web Server.

  • New relaxed parameter to the Init-class SAF flex-init allows you to specify whether logging uses relaxed mode or not. Also, the format parameter for flex-init now lets you log the values of named cookies.

    When logging uses relaxed mode, it skips the logging of any variable that would normally block cache acceleration when processing requests for static files.

    For more information, see the discussion of flex-init in Chapter 3, "Predefined SAFs and the Request Handling Process," in the NSAPI Programmer's Guide for iPlanet Web Server.


Cookie Support

  • New util_cookie_find function finds a specific cookie in a cookie string and returns its value.

    For more information, see the discussion of util_cookie_find in Chapter 5, "NSAPI Function Reference," in the NSAPI Programmer's Guide for iPlanet Web Server.


New SAF for Security

  • New PathCheck-class function ssl-check helps enforce keysize restriction for cipher settings.

    For more information, see the discussion of ssl-check in Chapter 3, "Predefined SAFs and the Request Handling Process" in the NSAPI Programmer's Guide for iPlanet Web Server.


New SAFs for Adding Headers and Footers

  • New Service-class SAFs, add-header and add-footer, allow you to specify file names or URLs that provide a header or footer for a page being returned to the requesting client.

    For more information, see the discussion of add-header and add-footer in Chapter 3, "Predefined SAFs and the Request Handling Process," in the NSAPI Programmer's Guide for iPlanet Web Server.


Minor Changes to Init-class SAFs

  • Minor changes to the parameters for the Init-class SAF cache-init.

    For more information, see the discussion of cache-init in Chapter 3, "Predefined SAFs and the Request Handling Process," in the NSAPI Programmer's Guide for iPlanet Web Server.

  • Minor changes to the parameters for the Init-class SAF cindex-init.

    For more information, see the discussion of cache-init in Chapter 3, "Predefined SAFs and the Request Handling Process," in the NSAPI Programmer's Guide for iPlanet Web Server.


Relinking 3.x Plugins on the AIX Platform

  • For AIX only, plugins built for 3.x versions of the server must be relinked to work with 4.x versions.

    For more information, see the discussion of compiling and linking in Chapter 4, "Creating Custom SAFs," in the NSAPI Programmer's Guide for iPlanet Web Server.



Version 4.1 Changes

This section lists the changes to NSAPI in iPlanet Web Server version 4.1. These changes are:


StrictHttpHeaders magnus.conf Variable

  • New StrictHttpHeaders directive in the magnus.conf file controls strict HTTP header checking.

    For more information, see the discussion of the StrictHttpHeaders directive in Appendix B, "Variables in magnus.conf," in the NSAPI Programmer's Guide for iPlanet Web Server.


Chunked Encoding magnus.conf Variables

  • New UseOutputStreamSize, flushTimer, ChunkedRequestBufferSize, and ChunkedRequestTimeout directives in the magnus.conf file control chunked encoding and buffered streams.

    For more information, see the discussion of the Chunked Encoding directives in Appendix B, "Variables in magnus.conf," in the NSAPI Programmer's Guide for iPlanet Web Server.


find-pathinfo-forward Parameter

  • New find-pathinfo-forward parameter (for the PathCheck function find-pathinfo and the NameTrans functions pfx2dir and assign-name) makes the server look for the PATHINFO forward in the path right after the ntrans-base instead of backward from the end of path.

    For more information, see the descriptions of find-pathinfo, pfx2dir, and assign-name in Chapter 3, "Predefined SAFs and the Request Handling Process," in the NSAPI Programmer's Guide for iPlanet Web Server.


nostat Parameter

  • New nostat parameter for the NameTrans function assign-name prevents the server from performing a stat on a specified URL whenever possible.

    For more information, see the discussion of assign-name in Chapter 3, "Predefined SAFs and the Request Handling Process," in the NSAPI Programmer's Guide for iPlanet Web Server.


nocache Parameter

  • New nocache parameter for the Service function send-file prevents the server from caching responses to static file requests.

    For more information, see the discussion of send-file in Chapter 3, "Predefined SAFs and the Request Handling Process," in the NSAPI Programmer's Guide for iPlanet Web Server.


register-http-method SAF

  • New Init function register-http-method lets you extend the HTTP protocol by registering new HTTP methods.

    For more information, see the discussion of register-http-method in Chapter 3, "Predefined SAFs and the Request Handling Process," in the NSAPI Programmer's Guide for iPlanet Web Server.


set-default-type SAF

  • New ObjectType function set-default-type allows you to define a default charset, content-encoding, and content-language for the response being sent back to the client.

    For more information, see the discussion of set-default-type in Chapter 3, "Predefined SAFs and the Request Handling Process," in the NSAPI Programmer's Guide for iPlanet Web Server.


set-virtual-index SAF

  • New PathCheck function set-virtual-index allows you to specify a virtual index for a directory.

    For more information, see the discussion of set-virtual-index in Chapter 3, "Predefined SAFs and the Request Handling Process," in the NSAPI Programmer's Guide for iPlanet Web Server.


Buffered Streams

  • Buffered streams have been implemented to improve the efficiency of network I/O (for example the exchange of HTTP requests and responses) especially for dynamic content generation. Buffered streams are implemented in iPlanet Web Server 4.1 as transparent NSPR I/O layers, which means even existing NSAPI modules can use them without any change. Support for buffered streams is part of HTTP 1.1 compliance.

    For more information, see the discussion of buffered streams in Appendix G, "HyperText Transfer Protocol," in the NSAPI Programmer's Guide for iPlanet Web Server.


Previous     Contents     Index     Next     
Copyright © 2000 Sun Microsystems, Inc. Some preexisting portions Copyright © 2000 Netscape Communications Corp. All rights reserved.

Last Updated July 13, 2000