add If-None-Match and If-Modified-Since

fix https://github.com/chrislusf/seaweedfs/issues/1269
This commit is contained in:
Chris Lu
2020-04-08 08:12:00 -07:00
parent 2d7d4b1006
commit ec2eb8bc48
12 changed files with 193 additions and 135 deletions

View File

@@ -139,7 +139,7 @@ func (s3a *S3ApiServer) listFilerEntries(bucket, originalPrefix string, maxKeys
contents = append(contents, ListEntry{
Key: fmt.Sprintf("%s%s", dir, entry.Name),
LastModified: time.Unix(entry.Attributes.Mtime, 0),
ETag: "\"" + filer2.ETag(entry.Chunks) + "\"",
ETag: "\"" + filer2.ETag(entry) + "\"",
Size: int64(filer2.TotalSize(entry.Chunks)),
Owner: CanonicalUser{
ID: fmt.Sprintf("%x", entry.Attributes.Uid),