-
Notifications
You must be signed in to change notification settings - Fork 189
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
Renaming a non existing resource should return 404 instead of internal server error #452
Comments
is this reproducible with curl ? I think the bug should be triggerable without relying on that other Phoenix bug. |
Edit: the API looks like it correctly returns curl 'https://localhost:9200/remote.php/webdav/folder1/world.txt' \
-X 'MOVE' \
-H 'Connection: keep-alive' \
-H 'Pragma: no-cache' \
-H 'Cache-Control: no-cache' \
-H 'authorization: Bearer eyJhbGciOiJQUzI1NiIsImtpZCI6IiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJwaG9lbml4IiwiZXhwIjoxNTk3MzEyMjkwLCJqdGkiOiJxS0E4VTN5ckpvSUZ4bDZoaC1Tcm1sVlJYUG9oM011VyIsImlhdCI6MTU5NzMxMTY5MCwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6OTIwMCIsInN1YiI6Ilh0U2lfbWl5V1NCLXBrdkdueFBvQzVBNGZsaWgwVUNMZ3ZVN2NMd2ptakNLWDdGWW4ySFdrNnJSQ0V1eTJHNXFBeV95TVFjX0ZLOWFORmhVTXJYMnBRQGtvbm5lY3QiLCJrYy5pc0FjY2Vzc1Rva2VuIjp0cnVlLCJrYy5hdXRob3JpemVkU2NvcGVzIjpbInByb2ZpbGUiLCJlbWFpbCIsIm9wZW5pZCJdLCJrYy5pZGVudGl0eSI6eyJrYy5pLmRuIjoiZWluc3RlaW4iLCJrYy5pLmlkIjoiY249ZWluc3RlaW4sb3U9dXNlcnMsZGM9ZXhhbXBsZSxkYz1vcmciLCJrYy5pLnVuIjoiZWluc3RlaW4ifSwia2MucHJvdmlkZXIiOiJpZGVudGlmaWVyLWxkYXAifQ.dhqFKEQULZ0dM38C1BQ8-zuWKQSA75JdNxnbKxXQcIPD_M4FbO_znNEsl76VaGrlt2t9XZgHWapqGwRR0ZQoHmpEkTIxEHdwlnq6WaiUBKKLUf2Q4x-EOc0aZA7iCHFQbNT5n-9PXU1CsndZQCivV-k97rJwqZulSiF3qdH3ZmlEqqcZRezbWofLLeTvg07r1UC9UcO5cLk5i6se-MadED4MezijBx723D5eqCisFJ_Nmocxof7YAh3wnqcMemC3mGUG9oH1es2qeCKYLaIIPgaPV1AVFIWZVlLBR0IY2EqQ7LNkrBfmGKLIT9Bi8i0aw4waLyUcrydEh-yLrh4B7g' \
-H 'X-Requested-With: XMLHttpRequest' \
-H 'Destination: https://localhost:9200/remote.php/webdav/folder1/world.txt' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36' \
-H 'OCS-APIREQUEST: true' \
-H 'Accept: */*' \
-H 'Origin: https://localhost:9200' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Referer: https://localhost:9200/' \
-H 'Accept-Language: en,es-ES;q=0.9,es;q=0.8' \
--compressed \
--insecure preconditionsYou will need a valid access token. ObservedWe can trigger a Server Logs
|
Context
This was found on #450 out of pure coincidence. Read the ticket for more context on the cause. This ticket deals with the side effect
Steps to Reproduce
1.1 perhaps the easiest way to do this is by checking out ocis at this point in time, or checkout on commit
57f4953a48f44205fa44c923951782917e89e4dd
(that given Update deps 2020 07 22 #409 history was rewritten, if that's the case, point to the merge commit).1.2 make sure phoenix assets were not updated, if so, find the point on time they changed and checkout there.
go run cmd/ocis/main.go server
folder1
file.txt
expected results
404
, not an internal server error.observed results
Root Cause
As explained in #450 there are 2 calls taking place, the first one works while the second one tries to rename a resource that no longer exists, and that causes the server to reply with a
500
.Server Logs
Browser logs
The text was updated successfully, but these errors were encountered: