In order to activate the compression extension, the compression library must be loaded according to extension library configuration.
Windows:
<EXTLIBS>
<LIB>C:\Programs\ics\bin\httpcompress.dll</LIB>
</EXTLIBS>
Unix:
<EXTLIBS>
<LIB>/usr/lib64/ics/libhttpcompress.so</LIB>
</EXTLIBS>
<EXTLIBS>
<LIB>/usr/lib32/ics/libhttpcompress.so</LIB>
</EXTLIBS>
The compression configuration introduced by the <httpx:COMPRESSION> tag can be a child of the <DEFAULTS>, the <LISTENER>, the <httpx:HOST> or the <NODE> tag and defines the compression configuration to use.
<httpx:COMPRESSION ENABLE="gzip, deflate" VARY="ON">
<GZIP LEVEL="5" MINFILESIZE="100024" >
<ENABLE>
<MIMETYPES>text/*,application/x-javascript</MIMETYPES>
</ENABLE>
<DISABLE>
<AGENTS>*MSIE 4*,*MSIE 5*,*MSIE 6*</AGENTS>
</DISABLE>
</GZIP>
<DEFLATE LEVEL="5" MINFILESIZE="100024" >
<ENABLE>
<MIMETYPES>text/*,application/x-javascript</MIMETYPES>
</ENABLE>
<DISABLE>
<AGENTS>*MSIE 4*,*MSIE 5*,*MSIE 6*</AGENTS>
</DISABLE>
</DEFLATE>
</httpx:COMPRESSION>
The httpx:COMPRESSION tag comprises two attributes
The ENABLE attribute lists (comma separated) the compression algorithms to enable.
The VARY attribute specifies whether a VARY header should be inserted into the response if it is compressed. The following values are supported
As children of the httpx:COMPRESSION tag follows a list of algorithm specific configurations. The compression tag must match the identifier as specified in the ENABLE attribute of the httpx:COMPRESSION tag.
The algorithm specific configuration contains and ENABLE and a DISABLE section which can contain
MIMETYPES lists (comma separated) the mime type patterns that should either be enabled or disabled.
AGENTS lists (comma separated) the agent patterns that should be either enabled or disabled.
When a request is processed first the enabled compression algorithms are matched against the clients Accept-Encoding header field. If the compression algorithm is identified it is checked whether the disable section matches the specific properties. Only then the enable configuration is inspected.