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

ocdav: Adjust propstat response for removed properties #742

Merged
merged 2 commits into from
May 15, 2020
Merged

ocdav: Adjust propstat response for removed properties #742

merged 2 commits into from
May 15, 2020

Conversation

PVince81
Copy link
Contributor

Removed properties now appear in a propstat block with status 204.
The list of properties appearing in propstat blocks now depend on the
request and no more on the values returned by the Stat call.

This fixes the propdeletes and popreplace test cases from Litmus.

Former result is owncloud/ocis-reva#183
Current result after the fix:

docker run -e LITMUS_URL="http://172.17.0.1:9140/remote.php/webdav" -e LITMUS_USERNAME="einstein" -e LITMUS_PASSWORD="relativity" -e TESTS="props" owncloud/litmus:latest
-> running `props':
 0. init.................. pass
 1. begin................. pass
 2. propfind_invalid...... pass
 3. propfind_invalid2..... pass
 4. propfind_d0........... pass
 5. propinit.............. pass
 6. propset............... pass
 7. propget............... pass
 8. propextended.......... pass
 9. propmove.............. pass
10. propget............... pass
11. propdeletes........... pass
12. propget............... pass
13. propreplace........... pass
14. propget............... pass
15. propnullns............ pass
16. propget............... pass
17. propremoveset......... pass
18. propget............... pass
19. propsetremove......... pass
20. propget............... FAIL (Deleted property `{http://example.com/neon/litmus/}removeset' was still present)
21. propvalnspace......... pass
22. propwformed........... FAIL (PROPFIND on `/remote.php/webdav/litmus/prop2': 207 Multi-Status)
23. propinit.............. pass
24. propmanyns............ pass
25. propget............... pass
26. propcleanup........... pass
27. finish................ pass
<- summary for `props': of 28 tests run: 26 passed, 2 failed. 92.9%
See debug.log for network/debug traces.

Next up I'll look into those additional issues.

@PVince81
Copy link
Contributor Author

oh... it seems that the "removeset" case is actually testing whether the proppatch operations were applied in order, it first sets a property and removes it directly within the same call...

I had added a FIXME for this in the PR but will now address this directly...

@PVince81 PVince81 marked this pull request as draft May 14, 2020 10:39
@PVince81
Copy link
Contributor Author

okay, now processing in correct order. it fixes the "propsetremove" issue.

only one remains:

docker run -e LITMUS_URL="http://172.17.0.1:9140/remote.php/webdav" -e LITMUS_USERNAME="einstein" -e LITMUS_PASSWORD="relativity" -e TESTS="props" owncloud/litmus:latest
-> running `props':
 0. init.................. pass
 1. begin................. pass
 2. propfind_invalid...... pass
 3. propfind_invalid2..... pass
 4. propfind_d0........... pass
 5. propinit.............. pass
 6. propset............... pass
 7. propget............... pass
 8. propextended.......... pass
 9. propmove.............. pass
10. propget............... pass
11. propdeletes........... pass
12. propget............... pass
13. propreplace........... pass
14. propget............... pass
15. propnullns............ pass
16. propget............... pass
17. propremoveset......... pass
18. propget............... pass
19. propsetremove......... pass
20. propget............... pass
21. propvalnspace......... pass
22. propwformed........... FAIL (PROPFIND on `/remote.php/webdav/litmus/prop2': 207 Multi-Status)
23. propinit.............. pass
24. propmanyns............ pass
25. propget............... pass
26. propcleanup........... pass
27. finish................ pass
<- summary for `props': of 28 tests run: 27 passed, 1 failed. 96.4%
See debug.log for network/debug traces.

@PVince81
Copy link
Contributor Author

I suspect that the remaining issue might be because we don't copy properties when a Webdav COPY is done. This is another construction site to look at.

Let's get this merged first

@PVince81 PVince81 marked this pull request as ready for review May 14, 2020 11:09
@PVince81
Copy link
Contributor Author

@butonic FYI

@PVince81
Copy link
Contributor Author

the last litmus issue is unrelated to propstat, raised here to fix separately: owncloud/ocis-reva#203

@labkode
Copy link
Member

labkode commented May 15, 2020

@PVince81 please rebase and happy to merge

Vincent Petry added 2 commits May 15, 2020 15:14
Removed properties now appear in a propstat block with status 204.
The list of properties appearing in propstat blocks now depend on the
request and no more on the values returned by the Stat call.
Webdav PROPPATCH spec requires the instructions to be processed in the
correct order.
This adjusts the logic to now only set or remove a single arbitrary
metadata at a time, in the order given in the request.
@PVince81
Copy link
Contributor Author

I should have listened to the little voice in my head who was telling me to do both PROPPATCH PRs as one 😉

And now all the "props" litmus suites are passing 🎉

% docker run -e LITMUS_URL="http://172.17.0.1:9140/remote.php/webdav" -e LITMUS_USERNAME="einstein" -e LITMUS_PASSWORD="relativity" -e TESTS="props" owncloud/litmus:latest
-> running `props':
 0. init.................. pass
 1. begin................. pass
 2. propfind_invalid...... pass
 3. propfind_invalid2..... pass
 4. propfind_d0........... pass
 5. propinit.............. pass
 6. propset............... pass
 7. propget............... pass
 8. propextended.......... pass
 9. propmove.............. pass
10. propget............... pass
11. propdeletes........... pass
12. propget............... pass
13. propreplace........... pass
14. propget............... pass
15. propnullns............ pass
16. propget............... pass
17. propremoveset......... pass
18. propget............... pass
19. propsetremove......... pass
20. propget............... pass
21. propvalnspace......... pass
22. propwformed........... pass
23. propinit.............. pass
24. propmanyns............ pass
25. propget............... pass
26. propcleanup........... pass
27. finish................ pass
<- summary for `props': of 28 tests run: 28 passed, 0 failed. 100.0%

Rebased.

@labkode
Copy link
Member

labkode commented May 15, 2020

Very nice job @PVince81

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.

2 participants