Gzip compression for HTTP responses
In IDM 7.5.1 and later, the embedded Jetty web server supports Jetty 12. When serving SSL requests, Jetty 12 checks that the incoming host header matches the server certificate’s subject and returns a Learn more in What’s new. |
IDM uses the Jetty Gzip handler to compress HTTP responses. The default Gzip handler configuration, in conf/jetty.xml
, is as follows:
In Jetty 12, the compressionLevel and excludedAgentPatterns properties have been removed from the Gzip handler. Learn more in Discontinued functionality.
|
...
<Call name="insertHandler">
<Arg>
<New id="GzipHandler" class="org.eclipse.jetty.server.handler.gzip.GzipHandler">
<Set name="minGzipSize"><Property name="jetty.gzip.minGzipSize" default="2048"/></Set>
<Set name="inflateBufferSize"><Property name="jetty.gzip.inflateBufferSize" default="0"/></Set>
<Set name="syncFlush"><Property name="jetty.gzip.syncFlush" default="false" /></Set>
<Set name="includedMethodList"><Property name="jetty.gzip.includedMethodList" default="GET" /></Set>
<Set name="excludedMethodList"><Property name="jetty.gzip.excludedMethodList" default="" /></Set>
</New>
</Arg>
</Call>
...
Adjust this configuration if the default does not suit your deployment. Configuration properties are as follows:
minGzipSize
-
Content is compressed only if the content length is unknown or is greater than the
minGzipSize
. By default, content is compressed only if the response is greater than 2048MB. inflateBufferSize
-
Number of bytes in the request decompression buffer. The default setting is
-1
, which disables this feature. Use this feature only if you want to compress large POST/PUT request payloads. Be aware that this setting exposes a potential Zip bomb risk. syncFlush
-
By default, this setting is
false
, which lets the deflater determine how much data to accumulate, before it produces output. This achieves the best compression. Whentrue
, this setting forces flushing of the buffer of data to compress. This can result in poor compression. includedMethodList
-
A list of HTTP methods to compress. By default, only GET requests are compressed.
excludedMethodList
-
A list of HTTP methods that should not be compressed.