From 54d6d4a13f165218ee9640aac67985525674d799 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Tue, 7 May 2024 20:04:53 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=93=E5=AD=98=E7=AD=96=E7=95=A5=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E2=80=9C=E5=85=81=E8=AE=B8=E8=AF=BB=E5=8F=96=E4=B8=8D?= =?UTF-8?q?=E5=AE=8C=E6=95=B4=E7=9A=84Partial=20Content=E2=80=9D=E9=80=89?= =?UTF-8?q?=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/serverconfigs/http_cache_storage_file.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/serverconfigs/http_cache_storage_file.go b/pkg/serverconfigs/http_cache_storage_file.go index 0c36e94..288d6d6 100644 --- a/pkg/serverconfigs/http_cache_storage_file.go +++ b/pkg/serverconfigs/http_cache_storage_file.go @@ -17,12 +17,14 @@ type HTTPFileCacheStorage struct { OpenFileCache *OpenFileCacheConfig `yaml:"openFileCache" json:"openFileCache"` // open file cache配置 EnableSendfile bool `yaml:"enableSendFile" json:"enableSendfile"` // 是否启用Sendfile - EnableMMAP bool `yaml:"enableMMAP" json:"enableMMAP"` // 是否启用MMAP + EnableMMAP bool `yaml:"enableMMAP" json:"enableMMAP"` // 是否启用MMAP + EnableIncompletePartialContent bool `yaml:"enableIncompletePartialContent" json:"enableIncompletePartialContent"` // 允许读取未下载完整的Partial Content } func NewHTTPFileCacheStorage() *HTTPFileCacheStorage { return &HTTPFileCacheStorage{ - EnableMMAP: false, + EnableMMAP: false, + EnableIncompletePartialContent: true, } }