core
core copied to clipboard
Add test scenarios for DELETE, COPY and MOVE with body
webDAV DELETE, COPY or MOVE requests should not send a body in the request. https://datatracker.ietf.org/doc/html/rfc4918#section-8.4
The happy-path test scenarios were adjusted so that they do not send bodies in such requests - see issue https://github.com/owncloud/core/issues/40126
If a body is sent, then the server is supposed to return HTTP status 415 (Unsupported Media Type): https://datatracker.ietf.org/doc/html/rfc4918#section-8.4
This has been implemented in reva PR https://github.com/cs3org/reva/pull/2974 for MOVE requests, and might need implementing for COPY and DELETE requests.
oC10 does not return 415 at this time.
Add test scenarios for DELETE, COPY and MOVE that purposely send a body in the request and expect HTTP status 415. Make scenarios that do this in a user's own personal storage, and in/out of a received share.
The test scenarios will likely fail on oC10, so skip them on oC10, and allow them to run for oCIS/reva. Create a bug issue for oC10 describing the non-compliant behavior, and some scenarios that demonstrate the non-compliant behavior. Let those scenarios run on oC10, and skip them for oCIS/reva. Someone can then easily decide to fix the behavior of oC10 and it will be easy for the developer to adjust the test suite etc.
TODO:
- [x] Add test for
MOVE
requests to endpoints with body (for oCIS) https://github.com/owncloud/core/pull/40251 - [x] Add bug demo for
MOVE
requests to endpoints with body (for oC10) https://github.com/owncloud/core/pull/40251 - [x] Add test for
COPY
requests to endpoints with body (for oCIS) https://github.com/owncloud/core/pull/40331 - [x] Add bug demo for
COPY
requests to endpoints with body (for oC10) https://github.com/owncloud/core/pull/40331 - [x] Add test for
DELETE
requests to endpoints with body (for oCIS) https://github.com/owncloud/core/pull/40298 - [x] Add bug demo for
DELETE
requests to endpoints with body (for oC10) https://github.com/owncloud/core/pull/40298
Since the implementation for COPY and DELETE requests to return HTTP 415
is not done yet for oCIS/Reva. Issue: https://github.com/owncloud/ocis/issues/4332
The remaining task could be done after #4332 is fixed.