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, } }