-
Notifications
You must be signed in to change notification settings - Fork 112
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: use reference instead of path in PROPFIND #778
ocdav: use reference instead of path in PROPFIND #778
Conversation
fixed using a07b579 |
seems I failed committing 🤕 |
PROPFIND recursion needs to use the reference object instead of the path to make sure cross-storage exploration works correctly. Co-authored-by: A.Unger <zyxancf@gmail.com>
seems this implementation is still not correct, it returns some results twice:
|
even worse, the returned path seems to be the internal path! |
it looks like when we query using the Resource_Id instead of the path, the path embedded into the result is absolute according to the doc in owncloud.go the path returned by |
I added some logging locally: Resolved by path:
Resolve by id
so when resolving by id in the OC storage the path is "/einstein/test" instead of "/test" |
oh, apparently the internal path passed in |
more logging:
it looks like for the "by path" resolution, the why would the config change based on how the request is done ?! |
so this is the config for the "resolve by path":
and with "resolve by id":
so it seems only EnableHome has the wrong value. I haven't yet found and understood where that value should be set. |
ok, it looks like it's connecting to different services. when we want to resolve by path, it connects to "reva-storage-home" but by id it connects to "reva-storage-oc", so it's normal that the response contains different paths... I don't think we can easily rewrite the paths in the ocdav layer as we'd need to know about the prefix to remove |
I added logging in the gateway's "FindProvider" but apparently it never gets called for the "by path" case. It only gets call when using id:
|
in any case I suspect that the storage id that is stored in the response is always pointing at "/oc:localhost:9162" but the resolution by path would contain "/home" so would resolve to the other service. now I wonder why the home service would return results with storage ids pointing at another storage... Maybe it's the cross-storage scenario. Somehow we'd need a way to resolve by resource id but still transform the path to be in the view of a different storage instead of the path from the original storage. |
I'm abandoning this attempt for now as I need a better understanding of the framework. I've raised https://github.com/owncloud/ocis-reva/issues/231 to look into a proper solution for cross-storage recursion, which likely also affects the COPY operation additionally to PROPFIND. Here is an alternative workaround to unblock the public share work: #779 |
PROPFIND recursion needs to use the reference object instead of the path
to make sure cross-storage exploration works correctly.
Co-authored-by: A.Unger zyxancf@gmail.com
Fix for #681 (comment)