Webmaster.Info
  Home
  AOL Client
  AOL Network
  Netscape Gecko
  Cookies
  HTTP Headers
  P3P
  Security
  FAQ
  Glossary
  Postmaster@AOL
  DNS@AOL

iPlanet 4.x

AOLServer | Apache | Microsoft IIS | Netscape iPlanet 6.0 | Netscape iPlanet 4.x | Netscape Enterprise Server 3.6

Custom Headers

For older versions of the iPlanet Web Server, it becomes necessary to create a dll and to edit the obj.conf to access that dll via a function. The following dll, authorheader.dll, provides example of how to add a custom HTTP header:

#ifdef XP_WIN32
#define NSAPI_PUBLIC __declspec(dllexport)
#else /* !XP_WIN32 */
#define NSAPI_PUBLIC
#endif /* !XP_WIN32 */

#include "nsapi.h"
#include "base/pblock.h"
#include "base/session.h"
#include "frame/req.h"
#include "base/util.h"
#include "frame/protocol.h"
#include
#include "frame/log.h"

#ifdef __cplusplus
extern "C"
#endif

NSAPI_PUBLIC int authorheader(pblock *param, Session *sn, Request *rq) {
char *name = pblock_findval("name", param);
char *value = pblock_findval("value", param);

pblock_nvinsert(name, value, rq->srvhdrs);
return REQ_PROCEED;

}

Once the dll file has been created, edit the obj.conf file. First, the dll must be loaded, so the obj.conf file needs to know where the authorheader.dll file is located and the appropriate function it should call. At the beginning of the file, add the following line:

Init fn="load-modules" shlib="/path/to/authorheader.dll" funcs="authorheader"

Next, add an entry within the default Object that calls the p3pheader function.

ObjectType fn="authorheader" name="Author" value="Internet Services"

The web server should be restarted, and the configuration file should be loaded via the iPlanet Administrator. Since the information has been placed within the default Object definition, the header will be sent with every web page within that web site.

File Cache

By default, the file cache is enabled and uses the default values for all parameters described below. To change parameter values, create a text file called nsfc.conf in the following directory:

server_root/https-server-id/config

To change a parameter value for improved performance, type the parameter and its new value in the nsfc.conf file. The FileCacheEnable parameter specifies whether the file cache is enabled or not. By default, this is set to true.

FileCacheEnable=true

The MaxAge parameter takes a value in seconds. This is the maximum age for an object to be considered valid. As long as the object is valid, it will continue to be cached. Once the age is over the value set in MaxAge, the origin server is queried for a fresh copy of the object, which both replaces the original object and is served to the requestor.

MaxAge should be set for those object that are updated on a regular schedule. HTML pages that are updated weekly, for instance, would have a MaxAge set to 604800, which is the amount of seconds within a week. Another option is to set the MaxAge parameter to the longest amount of time that the webmaster is willing to serve an older version of the object to users. By default, this is set to 30 seconds.

MaxAge=30

There are several other cache parameters, including CopyFiles, HashInitSize, HitOrder, MaxFiles, MediumFileSpace, SmallFileSpace, TempDir, and TransmitFile. MediumFileSizeLimit and SmallFileSizeLimit are cache parameters usable only when iPlanet is residing on a UNIX server.

For more information about iPlanet 4.x, go to http://docs.sun.com/db/doc/816-5654-10. For more information about file caching in iPlanet 4.x, go to http://docs.sun.com/.