IBM AS/400E Network Router User Manual


 
10 HTTPD_REQUEST_SERVICED
Returned by HTTP_proxy. This return code indicates that the program that
called the function completed the response for this request.
11 HTTPD_RESPONSE_ALREADY_COMPLETED
The function failed because the response for that request completed
processing.
Server API configuration directives
Each step in the request process has a configuration directive that allows you to
indicate which of your application functions you want called and run during that
step. You can add these directives to your servers configuration file by manually
editing it or by using the Server API Request Processing form in the servers
Configuration and Administration forms.
Server API usage notes
Here are some notes to consider when using the Server API:
v When appropriate, you can indicate that you want your application function
called for all URL requests or only for URL requests that match a specified
mask.
v You can also have your Authentication functions called for every request or just
for those with a type of Basic.
v The Server API directives, except for the Service and NameTrans directives, can
be in any order in the configuration file. You do not need to include every
Server API directive. If you do not have an application function for a particular
step, just omit the corresponding directive.
v The Service and NameTrans directives work like the Exec directive and are
dependent on its occurrence and placement relative to other mapping directives
within the configuration file. This means that the server processes the Service,
NameTrans, Map, Pass, Exec, Redirect, and Fail directives in their sequential
order within the configuration file. When it successfully maps a URL to a file, it
does not read or process any other of these directives.
v You can also have more than one configuration directive for a step. For example,
you could include two NameTrans directives, each pointing to a different
application function. When the server performs the name translation step, it will
process your name translation functions in the order in which they appear in the
configuration file.
v Multiple IP configuration (using a trailing IP address or template) is supported
only for the Service and NameTrans directives.
v If the server fails to load a specific application function or you have a ServerInit
directive that does not return an OK return code, no other application functions
for that compiled Server API program will be called. Any processing specific to
that program which was done up to this point is ignored. Other Server API
programs that you include in these directives, and their application functions,
are not affected.
Server API directives and syntax
Directive Variable Access path
ServerInit /QSYS.LIB/MYLIB/MYGWAPI.SRVPGM:function_name init_string
PreExit /QSYS.LIB/MYLIB/MYGWAPI.SRVPGM:function_name
120 Web Programming Guide V4R5