Skip to main content
Version: 3.14.x.x LTS

InflateFilter

The main task of the InflateFilter is to decompress the content of an HTTP message body. It uses the .zlib library to perform this job.

Classname
ch::nevis::isiweb4::filter::inflate::InflateFilter
Library
libInflateFilter.so.1

Configuration

NameType, Usage Constraints, DefaultsDescription
BuffSizeinteger optional, min: 1024, max: unlimiteddefault: 8196Defines the buffer size for the uncompressed data.
InflateRequestboolean required default: falseEnables decompression of HTTP requests.
InflateResponseboolean required default: trueEnables decompression of HTTP responses.

Example configuration

The InflateFilter has three configurable parameters. Through the InflateRequest/InflateResponse parameters, you can decompress the request or the response, respectively. Use the BuffSize parameter to set the size of the buffer (default is "8196", minimum is "1024"). In the following example, the inflate filter InflateRequestFilter decompresses the content of the incoming request body if the value of the Content-Encoding header is "gzip". Because here we want to decompress the request body, the parameter InflateRequest is set to "true". Also, the InflateResponse parameter is set to "false" to turn off the response body inflation.


<filter>
<filter-name>InflateRequestFilter</filter-name>
<filter-class>ch::nevis::isiweb4::filter::inflate::InflateFilter</filter-class>

<init-param>
<param-name>BuffSize</param-name>
<param-value>10000</param-value>
</init-param>
<init-param>
<param-name>InflateRequest</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>InflateResponse</param-name>
<param-value>false</param-value>
</init-param>
</filter>

The InflateFilter.example can be also be found in the installed nevisProxy package, in directory /opt/nevisproxy/examples/various/.