Skip to content

Commit a0f4479

Browse files
committed
HttpContentCompressor#determineEncoding() consistent
1 parent 27ddf65 commit a0f4479

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

codec-http/src/main/java/io/netty/handler/codec/http/HttpContentCompressor.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -325,16 +325,16 @@ protected String determineEncoding(String acceptEncoding) {
325325
}
326326
}
327327
if (starQ > 0.0f) {
328-
if (brQ == -1.0f && Brotli.isAvailable()) {
328+
if (brQ == -1.0f && this.brotliOptions != null) {
329329
return "br";
330330
}
331-
if (zstdQ == -1.0f && Zstd.isAvailable()) {
331+
if (zstdQ == -1.0f && this.zstdOptions != null) {
332332
return "zstd";
333333
}
334-
if (gzipQ == -1.0f) {
334+
if (gzipQ == -1.0f && this.gzipOptions != null) {
335335
return "gzip";
336336
}
337-
if (deflateQ == -1.0f) {
337+
if (deflateQ == -1.0f && this.deflateOptions != null) {
338338
return "deflate";
339339
}
340340
}

0 commit comments

Comments
 (0)