Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quote etags in OCIS-Storage #1232

Merged
merged 1 commit into from
Oct 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog/unreleased/fix-quote-etag-on-ocis-storage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Fix missing quotes on OCIS-Storage

Etags have to be enclosed in quotes ". Return correct etags on OCIS-Storage.

https://github.com/owncloud/product/issues/237
https://github.com/cs3org/reva/pull/1232
4 changes: 2 additions & 2 deletions pkg/storage/fs/ocis/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down