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.
ch::nevis::isiweb4::filter::inflate::InflateFilter
libInflateFilter.so.1
Configuration
Name | Type, Usage Constraints, Defaults | Description |
---|---|---|
BuffSize | integer optional, min: 1024, max: unlimiteddefault: 8196 | Defines the buffer size for the uncompressed data. |
InflateRequest | boolean required default: false | Enables decompression of HTTP requests. |
InflateResponse | boolean required default: true | Enables 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/.