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

COPY file/folder to share mountpoint: inconsistent behavior between dav paths #9753

Closed
saw-jan opened this issue Aug 7, 2024 · 3 comments · Fixed by #9763
Closed

COPY file/folder to share mountpoint: inconsistent behavior between dav paths #9753

saw-jan opened this issue Aug 7, 2024 · 3 comments · Fixed by #9763
Assignees
Labels

Comments

@saw-jan
Copy link
Member

saw-jan commented Aug 7, 2024

1. File to shared File

old/new/spaces dav path:

curl -XCOPY "https://localhost:9200/remote.php/webdav/demo-lorem.txt" \       
-H"Destination: https://localhost:9200/remote.php/webdav/Shares/admin-lorem.txt" \
-udemo:demo -vk

curl -XCOPY "https://localhost:9200/remote.php/dav/files/demo/demo-lorem.txt" \       
-H"Destination: https://localhost:9200/remote.php/dav/files/demo/Shares/admin-lorem.txt" \
-udemo:demo -vk

curl -XCOPY "https://localhost:9200/remote.php/dav/spaces/{demo-space-id}/demo-lorem.txt" \       
-H"Destination: https://localhost:9200/remote.php/dav/spaces/{shares-space-id}/admin-lorem.txt" \
-udemo:demo -vk
  • < HTTP/1.1 204 No Content
  • share is not deleted ✔️
  • share mountpoint is not lost ✔️

2. File to shared Folder

old/new dav path:

curl -XCOPY "https://localhost:9200/remote.php/webdav/demo-lorem.txt" \       
-H"Destination: https://localhost:9200/remote.php/webdav/Shares/admin-folder" \
-udemo:demo -vk

curl -XCOPY "https://localhost:9200/remote.php/dav/files/demo/demo-lorem.txt" \       
-H"Destination: https://localhost:9200/remote.php/dav/files/demo/Shares/admin-folder" \
-udemo:demo -vk
  • < HTTP/1.1 400 Bad Request ✔️
  • share is not deleted ✔️
  • share mountpoint is not lost ✔️

spaces dav path:

curl -XCOPY "https://localhost:9200/remote.php/dav/spaces/{demo-space-id}/demo-lorem.txt" \       
-H"Destination: https://localhost:9200/remote.php/dav/spaces/{shares-space-id}/admin-folder" \
-udemo:demo -vk
  • < HTTP/1.1 412 Precondition Failed
  • share is deleted ❗
  • share mountpoint is lost ❗

3. Folder to shared File

old/new dav path:

curl -XCOPY "https://localhost:9200/remote.php/webdav/demo-folder" \       
-H"Destination: https://localhost:9200/remote.php/webdav/Shares/admin-lorem.txt" \
-udemo:demo -vk

curl -XCOPY "https://localhost:9200/remote.php/dav/files/demo/demo-folder" \       
-H"Destination: https://localhost:9200/remote.php/dav/files/demo/Shares/admin-lorem.txt" \
-udemo:demo -vk
  • < HTTP/1.1 400 Bad Request ✔️
  • share is not deleted ✔️
  • share mountpoint is not lost ✔️

spaces dav path:

curl -XCOPY "https://localhost:9200/remote.php/dav/spaces/{demo-space-id}/demo-folder" \       
-H"Destination: https://localhost:9200/remote.php/dav/spaces/{shares-space-id}/admin-lorem.txt" \
-udemo:demo -vk
  • < HTTP/1.1 403 Forbidden
  • share is not deleted ✔️
  • share mountpoint is not lost ✔️

4. Folder to shared Folder

old/new dav path:

curl -XCOPY "https://localhost:9200/remote.php/webdav/demo-lorem.txt" \       
-H"Destination: https://localhost:9200/remote.php/webdav/Shares/admin-folder" \
-udemo:demo -vk

curl -XCOPY "https://localhost:9200/remote.php/dav/files/demo/demo-lorem.txt" \       
-H"Destination: https://localhost:9200/remote.php/dav/files/demo/Shares/admin-folder" \
-udemo:demo -vk
  • < HTTP/1.1 400 Bad Request ✔️
  • share is not deleted ✔️
  • share mountpoint is not lost ✔️

spaces dav path:

curl -XCOPY "https://localhost:9200/remote.php/dav/spaces/{demo-space-id}/demo-lorem.txt" \       
-H"Destination: https://localhost:9200/remote.php/dav/spaces/{shares-space-id}/admin-folder" \
-udemo:demo -vk
  • < HTTP/1.1 204 No Content
  • share is deleted ❗
  • share mountpoint is lost ❗
@saw-jan
Copy link
Member Author

saw-jan commented Aug 7, 2024

CC @kobergj

@saw-jan saw-jan changed the title Inconsistent behavior between dav paths: COPY file/folder to share mountpoint COPY file/folder to share mountpoint: inconsistent behavior between dav paths Aug 7, 2024
@kobergj kobergj self-assigned this Aug 7, 2024
@kobergj kobergj moved this from Qualification to In progress in Infinite Scale Team Board Aug 7, 2024
@kobergj
Copy link
Collaborator

kobergj commented Aug 8, 2024

@saw-jan Case 1 (File to shared File) is a special case. The 204 No Content is correct here, as it will just create a new version for the existing file. This is expected and wanted behaviour.

All other cases we block. The fix comes with this reva PR: cs3org/reva#4802

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants