IDM

Gzip compression for HTTP responses

In IDM 7.4.2 and later, the embedded Jetty web server supports Jetty 12. Future releases of IDM 7.4.x are only compatible with Java 17. Jetty 12 requires this change.

When serving SSL requests, Jetty 12 checks that the incoming host header matches the server certificate’s subject and returns a 400 Bad Request error on a mismatch. If you’re upgrading to IDM 7.4.2 or later, you must ensure your IDM server certificate subject matches the host name used by your deployment.

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. When true, 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.