Skip to main content
Version: 5.7.x.x Java 8 ELS

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

BuffSize

  • Type: Integer
  • Usage Constraint: optional, min: 1024
  • Default: 8196
  • Defines the buffer size for the uncompressed data.

InflateRequest

  • Type: Boolean
  • Usage Constraint: optional`
  • Default: false
  • Enables decompression of HTTP requests.

InflateResponse

  • Type: Boolean
  • Usage Constraint: optional`
  • 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/.