Oracle iPlanet Web Proxy Server 4.0.14 Configuration File Reference

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 enables you to select filters that will process incoming request data read by the Service step.

NSAPI filters in Proxy Server 4 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. The order of Input fn="insert-filter" and Output fn="insert-filter" directives in obj.conf is important.

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

insert-filter

Applicable in Input-class directives.

The insert-filter SAF is used to add a filter to the filter stack to process incoming (client-to-server) data.

The order of Input fn="insert-filter" and Output fn="insert-filter" directives can be important.

Returns

Returns REQ_PROCEED if the specified filter was inserted successfully or REQ_NOACTION if the specified filter was not inserted because it was not required. Any other return value indicates an error.

Parameters

The following table describes the parameter for the insert-filter function.

Table 5–94 insert-filter Parameters

Parameter  

Description  

filter

Specifies the name of the filter to insert. 

bucket

(Optional) Common to all obj.conf functions.

Example


Input fn="insert-filter" filter="http-decompression"

match-browser

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, only the topmost instance is removed. You do not have to remove filters with remove-filter because 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 the parameter for the remove-filter function.

Table 5–95 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"

sed-request

The sed-request filter applies the sed edit commands to an incoming request entity body, for example, an uploaded file or submitted form.

Parameters

The following table shows the sed-request parameters:

Table 5–96 sed-request Parameters

Parameter 

Description 

sed

Specifies a sed command script. When multiple sed parameters are provided, the sed edit commands are evaluated in the order they appear.

Example

The following obj.conf code instructs sed-request to encode any (<) and (>) characters posted in an HTML form:

Input fn="insert-filter"
      method="POST"
      filter="sed-request"
      sed="s/</\\&lt;/g"
      sed="s/%3c/\\&lt;/g"
      sed="s/%3C/\\&lt;/g"
      sed="s/>/\\&gt;/g"
      sed="s/%3e/\\&gt;/g"
      sed="s/%3E/\\&gt;/g"

Because POST bodies are usually URL-encoded, it is important to check for URL-encoded forms when editing POST bodies. %3C is the URL-encoded form of (<) and %3E is the URL-encoded form of (>).

See Also

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.