---
title: Gzip compression for HTTP responses
description: In IDM 7.5.1 and later, the embedded Jetty web server supports Jetty 12.
component: pingidm
version: 7.5
page_id: pingidm:install-guide:gzip-compression
canonical_url: https://docs.pingidentity.com/pingidm/7.5/install-guide/gzip-compression.html
keywords: ["Installation", "Configuration", "Gzip Compression"]
---

# 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 `400 Bad Request` error on a mismatch. If you're upgrading to IDM 7.5.1 or later, you must ensure your IDM server certificate subject matches the host name used by your deployment.Learn more in [What's new](../release-notes/whats-new.html#jetty-12-support-751). |

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](../release-notes/removed-functionality.html#removed-gzip-properties). |

```xml
...
<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](https://en.wikipedia.org/wiki/Zip_bomb).

* `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.
