Input

All Input directives are executed when the server
or a plug-in first attempts to read entity body data from the client.

The Input stage allows you to select filters that
will process incoming request data read by the Service step.

NSAPI filters in Sun Java System Web Server 6.1 enable a function to
intercept (and potentially modify) the content presented to or generated by
another function.

You can add NSAPI filters that process incoming data by invoking the insert-filter SAF in the Input stage of the request-handling
process. The Input directives are executed at most once
per request.

You can also define the appropriate position of a specific filter within
the filter stack. For example, filters that translate content from XML to
HTML are placed higher in the filter stack than filters that compress data
for transmission. You can use the filter_create function
to define the filter's position in the filter stack, and the init-filter-order to override the defined position.

When two or more filters are defined to occupy the same position in
the filter stack, filters that were inserted later will appear higher than
filters that were inserted earlier. That is, the order of Input fn="insert-filter" and Output fn="insert-filter" directives in obj.conf becomes important.

The following Input-class functions are described
in detail in this section:

insert-filter adds a filter
to the filter stack to process incoming data.

match-browser matches specific
strings in the User-Agent string supplied by the browser,
and then modifies the behavior of Sun Java System Web Server based upon the
results by setting values for specified variables.

match-browser

Applicable in all stage directives. The match-browser SAF
matches specific strings in the User-Agent string supplied
by the browser, and then modifies the behavior of Sun Java System Web Server
based upon the results by setting values for specified variables. See match-browser.

remove-filter

Applicable in Input-, Output-, Service-, and Error-class directives.

The remove-filter SAF is used to remove a filter
from the filter stack. If the filter has been inserted multiple times then
only the topmost instance is removed. In general, it is not necessary to remove
filters with remove-filter, as they will be removed automatically
at the end of the request.

Returns

Returns REQ_PROCEED if the specified filter was removed
successfully, or REQ_NOACTION if the specified filter was
not part of the filter stack. Any other return value indicates an error.

Parameters

The following table describes parameters for the remove-filter function.

Table 4–40 remove-filter Parameters

Parameter

Description

filter

Specifies the name of the filter to remove.

bucket

(Optional) Common to all obj.conf functions.

Example

Input fn="remove-filter" filter="http-compression"

set-variable

Applicable in all stage directives. The set-variable SAF
enables you to change server settings based upon conditional information in
a request, and to manipulate variables in parameter blocks by using specific
commands. See set-variable.