From 7b0b9ac3b439be2ee24c96cc7b18b74f911b51a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Thu, 31 Mar 2022 16:22:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AA=E6=9C=89=E6=BB=A1=E8=B6=B3=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E6=9D=A1=E4=BB=B6=E7=9A=84=E5=9B=BE=E7=89=87=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E6=89=8D=E4=BC=9A=E8=A2=AB=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/http_writer.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/nodes/http_writer.go b/internal/nodes/http_writer.go index be9627a..ba06d6d 100644 --- a/internal/nodes/http_writer.go +++ b/internal/nodes/http_writer.go @@ -443,6 +443,11 @@ func (this *HTTPWriter) PrepareWebP(resp *http.Response, size int64) { return } + // 只有在开启了缓存之后,才会转换,防止占用的系统资源过高 + if this.req.cacheRef == nil { + return + } + var contentType = this.GetHeader("Content-Type") if this.req.web != nil &&