优化缓存相关代码

This commit is contained in:
刘祥超
2022-11-08 11:03:37 +08:00
parent a9f8e39703
commit 913ba95801
2 changed files with 20 additions and 18 deletions

View File

@@ -1721,10 +1721,10 @@ func (this *HTTPRequest) bytePool(contentLength int64) *utils.BytePool {
return utils.BytePool1k
}
if contentLength < 32768 { // 32K
return utils.BytePool4k
return utils.BytePool16k
}
if contentLength < 131072 { // 128K
return utils.BytePool16k
return utils.BytePool32k
}
return utils.BytePool32k
}