mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-24 16:00:24 +08:00
缓存支持ETag和Last-Modified
This commit is contained in:
@@ -114,6 +114,14 @@ func (this *FileReader) Status() int {
|
||||
return this.status
|
||||
}
|
||||
|
||||
func (this *FileReader) LastModified() int64 {
|
||||
stat, err := this.fp.Stat()
|
||||
if err != nil {
|
||||
return 0
|
||||
}
|
||||
return stat.ModTime().Unix()
|
||||
}
|
||||
|
||||
func (this *FileReader) HeaderSize() int64 {
|
||||
return int64(this.headerSize)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user