优化缓存读取性能

This commit is contained in:
刘祥超
2021-01-13 16:11:28 +08:00
parent d9f748f700
commit 01994882ff
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) {