优化缓存读取性能

This commit is contained in:
GoEdgeLab
2021-01-13 16:11:28 +08:00
parent 15e4045ec9
commit 2c413ce039
2 changed files with 37 additions and 5 deletions

View File

@@ -249,7 +249,7 @@ func (this *HTTPRequest) doCacheRead() (shouldStop bool) {
logs.Error(err)
return true
}
} else {
} else { // 没有Range
this.writer.WriteHeader(reader.Status())
err = reader.ReadBody(buf, func(n int) (goNext bool, err error) {