Merge pull request #29 from MatrixTunnel/fix/compression-config

Fix invalid compression values not stopping proxy
This commit is contained in:
Andrew Steinborn 2018-08-10 20:32:58 -04:00 committed by GitHub
commit 738be8d535
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,12 +128,14 @@ public class VelocityConfiguration {
if (compressionLevel < -1 || compressionLevel > 9) {
logger.error("Invalid compression level {}", compressionLevel);
valid = false;
} else if (compressionLevel == 0) {
logger.warn("ALL packets going through the proxy are going to be uncompressed. This will increase bandwidth usage.");
}
if (compressionThreshold < -1) {
logger.error("Invalid compression threshold {}", compressionLevel);
valid = false;
} else if (compressionThreshold == 0) {
logger.warn("ALL packets going through the proxy are going to be compressed. This may hurt performance.");
}