修复当缓存内容为空时无法响应缓存的Bug

This commit is contained in:
GoEdgeLab
2021-09-22 21:13:31 +08:00
parent 2f9ae0cb42
commit fa2febfe2c

View File

@@ -63,6 +63,7 @@ func (this *FileReader) Init() error {
// body
bodySize := int(binary.BigEndian.Uint64(buf[SizeExpiresAt+SizeStatus+SizeURLLength+SizeHeaderLength : SizeExpiresAt+SizeStatus+SizeURLLength+SizeHeaderLength+SizeBodyLength]))
if bodySize == 0 {
isOk = true
return nil
}
this.bodySize = int64(bodySize)