IBM AS/400E Network Router User Manual


 
v Add Server API directives to your configuration file so that you can associate
your programs application functions with the appropriate step. There is a
separate directive for each server request processing step. You must stop and
restart the server for the new directives take effect.
v Test your program rigorously. Because IBM HTTP Server is a theaded server,
you should apply more rigorous testing than you would for a forked server.
Because the server calls your program directly and they both run in the same
process space, errors in your program can stop the server.
Basic server request process
You can break down the basic server request process into a number of steps, based
on the type of processing the server is performing during that phase. Each step
includes a juncture at which a specified part of your program can run. The Server
API directives in your configuration file, indicate which of your application
functions you want called during a request process step.
Your compiled program exists as a service program. As the server proceeds
through its request process steps, it calls the application functions associated with
each step, until one of the functions indicates it has handled the request. If you
have more than one of your application functions indicated for a particular step,
your functions are called in the order in which they appear in the configuration
file.
If the request is not handled by an application function (either you did not include
a Server API directive or your application function for that step returned
HTTP_NOACTION), the server performs the default action for that step.
Note: This is true for all steps except the Service step; the Service step does not
have a default action.
The following list indicates the purpose of each step and defines the processing
order.
Server Initialization
Performs initialization functions before any client requests are read.
PreExit
Performs processing after a request is read but before anything else is
done.
If this step returns an indication that the request was processed
(HTTP_OK), only the Data Filter, Log and PostExit steps, in the request
process are performed.
Authentication
Decodes, verifies, and stores security tokens.
Name Translation
Translates the virtual path (from URL) to the physical path.
Authorization
Uses stored security tokens to check the physical path (protections, acls)
and generates the WWW-Authenticate headers required for basic
authentication. If you write your own application function to replace this
step, you must generate these headers yourself.
Object Type
Locates the file system object that is indicated by the path.
110 Web Programming Guide V4R5