Skip to content

Commit

Permalink
remove xml encoding from resourcetype (#1472)
Browse files Browse the repository at this point in the history
  • Loading branch information
C0rby authored Feb 12, 2021
1 parent 2f13e07 commit d8aa2eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion changelog/unreleased/align-href-url-encoding-with-oc10.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Bugfix: Align href URL encoding with oc10
We now use the same percent encoding for URLs in WebDAV href properties as ownCloud 10.

https://github.com/cs3org/reva/pull/1425
https://github.com/cs3org/reva/pull/1472
https://github.com/owncloud/ocis/issues/1120
https://github.com/owncloud/ocis/issues/1296
https://github.com/owncloud/ocis/issues/1307
https://github.com/owncloud/ocis/issues/1307
4 changes: 2 additions & 2 deletions internal/http/services/owncloud/ocdav/trashbin.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ func (h *TrashbinHandler) itemToPropResponse(ctx context.Context, s *svc, u *use
response.Propstat[0].Prop = append(response.Propstat[0].Prop, s.newProp("oc:trashbin-original-location", strings.TrimPrefix(item.Path, "/")))
response.Propstat[0].Prop = append(response.Propstat[0].Prop, s.newProp("oc:trashbin-delete-datetime", dTime))
if item.Type == provider.ResourceType_RESOURCE_TYPE_CONTAINER {
response.Propstat[0].Prop = append(response.Propstat[0].Prop, s.newProp("d:resourcetype", "<d:collection/>"))
response.Propstat[0].Prop = append(response.Propstat[0].Prop, s.newPropRaw("d:resourcetype", "<d:collection/>"))
// TODO(jfd): decide if we can and want to list oc:size for folders
} else {
response.Propstat[0].Prop = append(response.Propstat[0].Prop,
Expand Down Expand Up @@ -325,7 +325,7 @@ func (h *TrashbinHandler) itemToPropResponse(ctx context.Context, s *svc, u *use
}
case "resourcetype":
if item.Type == provider.ResourceType_RESOURCE_TYPE_CONTAINER {
propstatOK.Prop = append(propstatOK.Prop, s.newProp("d:resourcetype", "<d:collection/>"))
propstatOK.Prop = append(propstatOK.Prop, s.newPropRaw("d:resourcetype", "<d:collection/>"))
} else {
propstatOK.Prop = append(propstatOK.Prop, s.newProp("d:resourcetype", ""))
// redirectref is another option
Expand Down

0 comments on commit d8aa2eb

Please sign in to comment.