-
Notifications
You must be signed in to change notification settings - Fork 184
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
Getting information about a folder overwritten by a file gives 500 error instead of 404 #1239
Comments
And the ocis-sever logged the following:
|
This might be a general problem when attempting to reference a file as if it is a folder - putting a file somewhere in a path that should be made up of folders. For example:
@jasson99 what happens when Is there a "sensible" response from oC10 and a different response from OCIS? |
@phil-davis @jasson99 If we request like
|
"good" - I guess that reva-OCIS walks down the "folder" resources in the requested path. If the resource does not exist, then easy, a 404 gets returned. If the resource is a folder, then also easy, continue walking down to the next folder in the path. But if the resource is in the middle of the path, but exists and is a file then something falls over. Somewhere in that code it likely just needs to catch when a resource is in the middle of the path and is a file. In that case return 404. |
Perhaps something has changed. Getting information about a folder using the GET method always gives server log: question: should it work correctly in this case? method |
The above bug seems to have been fixed and the expected to failure for |
@SagarGi if the issue is no more relevant, please close it with the proper current behavior in a comment. The expected failure files also need an update regarding the scenarios linked with these issues. |
RE-TESTED As @SagarGi mentioned this issue has been resolved but the issue exists in expected-failure file and need to remove. TO-DO QA-TEAM
|
|
Description:
There are scenarios where a file(say testfile.txt) is copied over the top of an existing folder(say FOLDER), which overwrites the folder. The folder changes into the file and the name is of the folder(FOLDER). When we try to find if the actual folder(FOLDER) exists for the user, then 500 Internal server error is returned instead of 404 Not Found. However, if we check for the completely non-existence folder, which was never created, then it returns 404 correctly.
Steps To Reproduce:
Alice
testfile.txt
with contentsome data
FOLDER
FOLDER/sample-folder
testfile.txt
toFOLDER
using webdav APIFOLDER
FOLDER/sample-folder
existsNon-existent-folder
which was never createdThe text was updated successfully, but these errors were encountered: