Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct statuscode and message when MOVEing between cross spaces #4447

Closed
wants to merge 1 commit into from

Conversation

saw-jan
Copy link
Contributor

@saw-jan saw-jan commented Jan 5, 2024

This PR changes the 502 statuscode to 403 with correct message while MOVEing between cross spaces.

Fixes:

BUT there is this note in the code:

WebDAV RFC https://www.rfc-editor.org/rfc/rfc4918#section-9.9.4 says to use
502 (Bad Gateway) - This may occur when the destination is on another
server and the destination server refuses to accept the resource.
This could also occur when the destination is on another sub-section
of the same server namespace. but we only have a not supported error

Q: What should we expect in test? 502 or 403?
CC @micbar @kobergj

@saw-jan saw-jan requested a review from a team as a code owner January 5, 2024 10:20
Copy link

update-docs bot commented Jan 5, 2024

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@butonic
Copy link
Contributor

butonic commented Jan 5, 2024

The RFC is always right.

@saw-jan
Copy link
Contributor Author

saw-jan commented Jan 5, 2024

The RFC is always right.

Yeah,
But we recently changed 502 to 403 in most cases like MOVE between two shares, shares to personal and others

Scenarios matrix table is here: owncloud/ocis#8121

@micbar
Copy link
Member

micbar commented Jan 5, 2024

Needs to be 403 because of the oc10 compatibility.

@saw-jan
Copy link
Contributor Author

saw-jan commented Jan 8, 2024

Needs to be 403 because of the oc10 compatibility.

So does that mean this PR is valid? Should we change 502 to 403?

@micbar
Copy link
Member

micbar commented Jan 8, 2024

@TheOneRing @dragotin

We need to discuss. RFC is very clear.

@saw-jan
Copy link
Contributor Author

saw-jan commented Jan 8, 2024

From owncloud/ocis#4087 (comment)

The return status will be 502 Bad Gateway according to WebDAV spec. This fix is already in reva.

@saw-jan
Copy link
Contributor Author

saw-jan commented Jan 10, 2024

502 is the expected behavior
Ref: owncloud/ocis#8063 (comment)

So closing this PR

@saw-jan saw-jan closed this Jan 10, 2024
@saw-jan saw-jan deleted the fix/issue-7618 branch January 10, 2024 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants