93484071d6
Motivation: - Fix `HttpContentCompressor` errors due to missing optional compressor libraries such as Brotli and Zstd at runtime. - Improve support for optional encoders by only considering the `CompressionOptions` provided to the constructor and ignoring those for which the encoder is unavailable. Modification: The `HttpContentCompressor` constructor now only creates encoder factories for the CompressionOptions passed to the constructor when the encoder is available which must be checked for Brotli and Zstd. In case of Brotli, it is not possible to create BrotliOptions if brotly4j is not available so there's actually nothing to check. In case of Zstd, I had to create class `io.netty.handler.codec.compression.Zstd` similar to `io.netty.handler.codec.compression.Brotli` which is used to check that zstd-jni is availabie at runtime. The `determineEncoding()` method had to change as well in order to ignore encodings for which there's no `CompressionEncoderFactory` instance. When the HttpContentCompressor is created using deprecated constructor (ie. with no CompressionOptions), we consider all available encoders. Result: Fixes #11581. |
||
---|---|---|
.. | ||
src | ||
pom.xml |