Skip to content

Commit

Permalink
Revert "Fix conflict response code (cs3org#3031)"
Browse files Browse the repository at this point in the history
This reverts commit b060ddc.
  • Loading branch information
kobergj committed Jul 14, 2022
1 parent bd2aae1 commit 3975149
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
5 changes: 0 additions & 5 deletions changelog/unreleased/fix-response-code.md

This file was deleted.

2 changes: 1 addition & 1 deletion internal/http/services/owncloud/ocdav/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ func (s *svc) prepareCopy(ctx context.Context, w http.ResponseWriter, r *http.Re
}
}
if isChild {
w.WriteHeader(http.StatusConflict)
w.WriteHeader(http.StatusBadRequest)
b, err := errors.Marshal(http.StatusBadRequest, "can not copy a folder into one of its children", "")
errors.HandleWebdavError(log, w, b, err)
return nil
Expand Down
2 changes: 1 addition & 1 deletion internal/http/services/owncloud/ocdav/move.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func (s *svc) handleMove(ctx context.Context, w http.ResponseWriter, r *http.Req
}
}
if isChild {
w.WriteHeader(http.StatusConflict)
w.WriteHeader(http.StatusBadRequest)
b, err := errors.Marshal(http.StatusBadRequest, "can not move a folder into one of its children", "")
errors.HandleWebdavError(&log, w, b, err)
return
Expand Down
5 changes: 5 additions & 0 deletions tests/acceptance/expected-failures-on-OCIS-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -1490,5 +1490,10 @@ moving outside of the Shares folder gives 501 Not Implemented.
- [apiShareOperationsToShares1/gettingShares.feature:40](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareOperationsToShares1/gettingShares.feature#L40)
- [apiShareOperationsToShares1/gettingShares.feature:39](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareOperationsToShares1/gettingShares.feature#L39)

#### [apiWebdavMove1/moveFolder.feature:135 fails with 400 status](https://github.com/owncloud/ocis/issues/3023)
- [apiWebdavMove1/moveFolder.feature:147](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L147)
- [apiWebdavMove1/moveFolder.feature:148](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L148)
- [apiWebdavMove1/moveFolder.feature:153](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L153)

- Note: always have an empty line at the end of this file.
The bash script that processes this file may not process a scenario reference on the last line.
5 changes: 5 additions & 0 deletions tests/acceptance/expected-failures-on-S3NG-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -1488,5 +1488,10 @@ _ocs: api compatibility, return correct status code_
- [apiShareOperationsToShares1/gettingShares.feature:40](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareOperationsToShares1/gettingShares.feature#L40)
- [apiShareOperationsToShares1/gettingShares.feature:39](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareOperationsToShares1/gettingShares.feature#L39)

#### [apiWebdavMove1/moveFolder.feature:135 fails with 400 status](https://github.com/owncloud/ocis/issues/3023)
- [apiWebdavMove1/moveFolder.feature:147](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L147)
- [apiWebdavMove1/moveFolder.feature:148](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L148)
- [apiWebdavMove1/moveFolder.feature:153](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L153)

Note: always have an empty line at the end of this file.
The bash script that processes this file may not process a scenario reference on the last line.

0 comments on commit 3975149

Please sign in to comment.