From 440823621cbbf0798e0bf5c88cfa9c6d10801c82 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Wed, 17 Apr 2024 13:56:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=85=E5=AE=B9=E5=8E=8B=E7=BC=A9=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=A2=9E=E5=8A=A0=E2=80=9C=E4=BE=8B=E5=A4=96URL?= =?UTF-8?q?=E2=80=9C=E5=92=8C=E2=80=9C=E9=99=90=E5=88=B6URL=E2=80=9D?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/http_writer.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/nodes/http_writer.go b/internal/nodes/http_writer.go index 9ab2637..405fa4a 100644 --- a/internal/nodes/http_writer.go +++ b/internal/nodes/http_writer.go @@ -619,12 +619,13 @@ func (this *HTTPWriter) PrepareCompression(resp *http.Response, size int64) { return } - // 分区内容不压缩,防止读取失败 - if !this.compressionConfig.EnablePartialContent && this.StatusCode() == http.StatusPartialContent { + // 检查URL + if !this.compressionConfig.MatchURL(this.req.URL()) { return } - if this.compressionConfig.Level < 0 { + // 分区内容不压缩,防止读取失败 + if !this.compressionConfig.EnablePartialContent && this.StatusCode() == http.StatusPartialContent { return }