mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-10 03:40:24 +08:00
触发浏览器304缓存也算缓存命中
This commit is contained in:
@@ -184,6 +184,7 @@ func (this *HTTPRequest) doCacheRead() (shouldStop bool) {
|
|||||||
// 自定义Header
|
// 自定义Header
|
||||||
this.processResponseHeaders(http.StatusNotModified)
|
this.processResponseHeaders(http.StatusNotModified)
|
||||||
this.writer.WriteHeader(http.StatusNotModified)
|
this.writer.WriteHeader(http.StatusNotModified)
|
||||||
|
this.isCached = true
|
||||||
this.cacheRef = nil
|
this.cacheRef = nil
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@@ -193,6 +194,7 @@ func (this *HTTPRequest) doCacheRead() (shouldStop bool) {
|
|||||||
// 自定义Header
|
// 自定义Header
|
||||||
this.processResponseHeaders(http.StatusNotModified)
|
this.processResponseHeaders(http.StatusNotModified)
|
||||||
this.writer.WriteHeader(http.StatusNotModified)
|
this.writer.WriteHeader(http.StatusNotModified)
|
||||||
|
this.isCached = true
|
||||||
this.cacheRef = nil
|
this.cacheRef = nil
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user