Skip to content

Commit

Permalink
fix mkcol response code
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
  • Loading branch information
butonic authored and rhafer committed Jun 7, 2022
1 parent 623d181 commit 1e461b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog/unreleased/fix-mkcol-response-code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Fix mkcol response code

We now return the correct response code when an mkcol fails.

https://github.com/cs3org/reva/pull/2928
2 changes: 1 addition & 1 deletion internal/http/services/owncloud/ocdav/mkcol.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,6 @@ func (s *svc) handleMkcol(ctx context.Context, w http.ResponseWriter, r *http.Re
case res.Status.Code == rpc.Code_CODE_NOT_FOUND:
return http.StatusConflict, fmt.Errorf("intermediate collection does not exist")
default:
return rstatus.HTTPStatusFromCode(statRes.Status.Code), errtypes.NewErrtypeFromStatus(statRes.Status)
return rstatus.HTTPStatusFromCode(res.Status.Code), errtypes.NewErrtypeFromStatus(res.Status)
}
}

0 comments on commit 1e461b7

Please sign in to comment.