mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-05 17:40:26 +08:00
优化代码
This commit is contained in:
@@ -256,7 +256,6 @@ func (this *HTTPRequest) doCacheRead(useStale bool) (shouldStop bool) {
|
|||||||
if this.web.Compression != nil && this.web.Compression.IsOn {
|
if this.web.Compression != nil && this.web.Compression.IsOn {
|
||||||
_, encoding, ok := this.web.Compression.MatchAcceptEncoding(this.RawReq.Header.Get("Accept-Encoding"))
|
_, encoding, ok := this.web.Compression.MatchAcceptEncoding(this.RawReq.Header.Get("Accept-Encoding"))
|
||||||
if ok {
|
if ok {
|
||||||
if reader == nil {
|
|
||||||
reader, _ = storage.OpenReader(key+caches.SuffixCompression+encoding, useStale, false)
|
reader, _ = storage.OpenReader(key+caches.SuffixCompression+encoding, useStale, false)
|
||||||
if reader != nil {
|
if reader != nil {
|
||||||
tags = append(tags, encoding)
|
tags = append(tags, encoding)
|
||||||
@@ -264,7 +263,6 @@ func (this *HTTPRequest) doCacheRead(useStale bool) (shouldStop bool) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 检查正常的文件
|
// 检查正常的文件
|
||||||
var isPartialCache = false
|
var isPartialCache = false
|
||||||
|
|||||||
Reference in New Issue
Block a user