conf.GZipBufferSize is not used anymore

This commit is contained in:
DarthSim
2019-03-28 16:43:28 +06:00
parent 4e0441b326
commit 3243074067

View File

@@ -197,7 +197,6 @@ type config struct {
FreeMemoryInterval int
DownloadBufferSize int
GZipBufferSize int
BufferPoolCalibrationThreshold int
}
@@ -319,7 +318,6 @@ func init() {
intEnvConfig(&conf.FreeMemoryInterval, "IMGPROXY_FREE_MEMORY_INTERVAL")
intEnvConfig(&conf.DownloadBufferSize, "IMGPROXY_DOWNLOAD_BUFFER_SIZE")
intEnvConfig(&conf.GZipBufferSize, "IMGPROXY_GZIP_BUFFER_SIZE")
intEnvConfig(&conf.BufferPoolCalibrationThreshold, "IMGPROXY_BUFFER_POOL_CALIBRATION_THRESHOLD")
if len(conf.Keys) != len(conf.Salts) {
@@ -438,12 +436,6 @@ func init() {
logFatal("Download buffer size can't be greater than %d", ^uint32(0))
}
if conf.GZipBufferSize < 0 {
logFatal("GZip buffer size should be greater than or equal to 0")
} else if conf.GZipBufferSize > int(^uint32(0)) {
logFatal("GZip buffer size can't be greater than %d", ^uint32(0))
}
if conf.BufferPoolCalibrationThreshold < 64 {
logFatal("Buffer pool calibration threshold should be greater than or equal to 64")
}