mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-08 19:40:25 +08:00
HttpWriter暴露两个方法/默认Buffer为4K
This commit is contained in:
@@ -1584,6 +1584,9 @@ func (this *HTTPRequest) addError(err error) {
|
||||
|
||||
// 计算合适的buffer size
|
||||
func (this *HTTPRequest) bytePool(contentLength int64) *utils.BytePool {
|
||||
if contentLength < 0 {
|
||||
return utils.BytePool4k
|
||||
}
|
||||
if contentLength < 8192 { // 8K
|
||||
return utils.BytePool1k
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user