From c9dac96366944832ba07cb723b9ffa8ac627c037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Sat, 20 Apr 2024 15:51:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/http_request_cache.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/internal/nodes/http_request_cache.go b/internal/nodes/http_request_cache.go index 45f6db6..ae09466 100644 --- a/internal/nodes/http_request_cache.go +++ b/internal/nodes/http_request_cache.go @@ -256,11 +256,9 @@ func (this *HTTPRequest) doCacheRead(useStale bool) (shouldStop bool) { if this.web.Compression != nil && this.web.Compression.IsOn { _, encoding, ok := this.web.Compression.MatchAcceptEncoding(this.RawReq.Header.Get("Accept-Encoding")) if ok { - if reader == nil { - reader, _ = storage.OpenReader(key+caches.SuffixCompression+encoding, useStale, false) - if reader != nil { - tags = append(tags, encoding) - } + reader, _ = storage.OpenReader(key+caches.SuffixCompression+encoding, useStale, false) + if reader != nil { + tags = append(tags, encoding) } } }