重构对HTTP请求的处理方法:缓存、压缩、WebP、限速

This commit is contained in:
刘祥超
2022-02-15 14:55:49 +08:00
parent 6d6e25f298
commit f50113517a
19 changed files with 903 additions and 616 deletions

View File

@@ -302,7 +302,7 @@ func (this *HTTPRequest) doRoot() (isBreak bool) {
this.cacheRef = nil // 不支持缓存
}
this.writer.Prepare(fileSize, http.StatusOK)
this.writer.Prepare(nil, fileSize, http.StatusOK, true)
pool := this.bytePool(fileSize)
buf := pool.Get()