Skip to content

Commit

Permalink
Improve Webdav error handling on propfind
Browse files Browse the repository at this point in the history
  • Loading branch information
micbar committed Nov 10, 2021
1 parent 1c6b067 commit 125427d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/fix-unset-quota.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Fix unset quota xattr on darwin

Unset quota attributes were creating errors in the logfile on darwin.

https://github.com/cs3org/reva/pull/2260
6 changes: 6 additions & 0 deletions internal/http/services/owncloud/ocdav/propfind.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,12 @@ func (s *svc) getResourceInfos(ctx context.Context, w http.ResponseWriter, r *ht
if depth != "0" && depth != "1" && depth != "infinity" {
log.Debug().Str("depth", depth).Msgf("invalid Depth header value")
w.WriteHeader(http.StatusBadRequest)
m := fmt.Sprintf("Invalid Depth header value: %v", depth)
b, err := Marshal(exception{
code: SabredavBadRequest,
message: m,
})
HandleWebdavError(&log, w, b, err)
return nil, nil, false
}

Expand Down

0 comments on commit 125427d

Please sign in to comment.