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

fix: Rewrite getPodBase to always get correct podBase #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smessie
Copy link
Member

@smessie smessie commented Nov 7, 2022

The new algorithm uses a combination of looking at the response headers to see if the current resource is the podBase, as defined by Clients can determine the storage of a resource by moving up the URI path hierarchy until the response includes a Link header with rel="type" targeting http://www.w3.org/ns/pim/space#Storage., and at the same time also looking if there is a pim:Storage (as object) triple in the resource stating that this resource is the podBase; as some server implementations use this technique. Lastly, it also checks if there is a pim:storage (as predicate) triple in the resource, defining where the podBase is stored, used e.g. in the WebID resource on ESS.

This now works on ESS 2.0 (where the WebID is on the id.inrupt.com domain and the storage root is on the storage.inrupt.com domain), CSS with the POD as root (lik mypod.com/profile/card#me) as CSS with multiple accounts (like mypod.com/myuser/profile/card#me)

The new algorithm uses a combination of looking at the response headers to see if the current resource is the podBase, as defined by [`Clients can determine the storage of a resource by moving up the URI path hierarchy until the response includes a Link header with rel="type" targeting http://www.w3.org/ns/pim/space#Storage.`](https://solidproject.org/TR/protocol#storage), and at the same time also looking if there is a pim:Storage (as object) triple in the resource stating that this resource is the podBase; as some server implementations use this technique. Lastly, it also checks if there is a pim:storage (as predicate) triple in the resource, defining where the podBase is stored, used e.g. in the WebID resource on ESS.
@smessie smessie requested a review from elpoelma November 7, 2022 13:40
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.

1 participant