Spring-boot: additional tomcat connectors does not support compression

Created on 18 Feb 2019  路  2Comments  路  Source: spring-projects/spring-boot

In default TomcatServletWebServerFactory class, it just supports the data compression on the default Connector, but all other additionalTomcatConnectors are not support compression.

see the code in the getWebServer method:

Connector connector = new Connector(this.protocol);
tomcat.getService().addConnector(connector);
this.customizeConnector(connector);

Requires consistent behavior for all connectors.

invalid

Most helpful comment

ok, we can copy CompressionConnectorCustomizer class's code and create a new class to implement our functionality.

All 2 comments

This is by design. It gives you complete control over the connector that you add. While you may want compression to be enabled for all connectors, others may not. The same applies to SSL and the like. If you want your additional connector to use compression you should configure it to do so.

ok, we can copy CompressionConnectorCustomizer class's code and create a new class to implement our functionality.

Was this page helpful?
0 / 5 - 0 ratings