From 5161e87c3e1e98a73bcff309bb45a30c1adeb8bb Mon Sep 17 00:00:00 2001 From: Artur Neumann Date: Thu, 8 Oct 2020 13:32:23 +0545 Subject: [PATCH] quote etags in OCIS-Storage --- pkg/storage/fs/ocis/node.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/storage/fs/ocis/node.go b/pkg/storage/fs/ocis/node.go index fd9e2e80997..69043dfb1b5 100644 --- a/pkg/storage/fs/ocis/node.go +++ b/pkg/storage/fs/ocis/node.go @@ -355,9 +355,9 @@ func (n *Node) AsResourceInfo(ctx context.Context) (ri *provider.ResourceInfo, e // use temporary etag if it is set if b, err := xattr.Get(nodePath, tmpEtagAttr); err == nil { - ri.Etag = string(b) + ri.Etag = fmt.Sprintf(`"%x"`, string(b)) } else { - ri.Etag = fmt.Sprintf("%x", h.Sum(nil)) + ri.Etag = fmt.Sprintf(`"%x"`, h.Sum(nil)) } // mtime uses tmtime if present