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 incorrect and incomplete activity data in Solid PREP responses #1800

Merged
merged 6 commits into from
Nov 23, 2024

Conversation

CxRes
Copy link
Collaborator

@CxRes CxRes commented Nov 10, 2024

Fixes #1799

CxRes added 4 commits November 8, 2024 06:31
Using XML Date format instead of Internet Date format for Solid-PREP Notifications.
Swapped the `object` and `target`/`origin` properties in case of `Add`/`Delete` notifications respectively.
+ Notifications are identified by UUIDs.
+ Turtle notification template has the same fields as JSON-LD.
+ `notify:state` transmits Event-ID (which uniquely identifies a resource's state) and not E-Tag (which identify representations of the resource).
+ Parent reuses the generated Event-ID.
+ Event-ID is generated in PREP notification middleware itself.
+ No longer setting `Event-ID` response header upon resource mutation, thus reverting the middlewares for unsafe methods to their original state, before PREP was introduced.
@CxRes CxRes changed the title Basic prep fix 1 Fix incorrect and incomplete activity data in Solid PREP responses Nov 10, 2024
@CxRes CxRes requested review from csarven and bourgeoa November 10, 2024 06:53
Change the CI node-version to use caret range to ensure that tests are run on Node.js v20.
Copy link
Member

@csarven csarven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested POST to container, PUT to non-container, and PATCH to ACL resource. The activities that are emitted seems right with the exception of some Turtle syntax corrections that are needed. See the suggestions.

I didn't run the tests.

lib/handlers/notify.js Show resolved Hide resolved
lib/rdf-notification-template.js Outdated Show resolved Hide resolved
lib/rdf-notification-template.js Outdated Show resolved Hide resolved
lib/rdf-notification-template.js Outdated Show resolved Hide resolved
Values for `as:object`, `as:target` and `as:origin` predicates in the Turtle PREP-Notification template are IRI's, so they must be wrapped in angle brackets.

Co-authored-by: Sarven Capadisli <[email protected]>
@CxRes CxRes requested a review from csarven November 11, 2024 20:57
@csarven csarven mentioned this pull request Nov 12, 2024
@bourgeoa bourgeoa merged commit 96ce2f0 into nodeSolidServer:main Nov 23, 2024
4 checks passed
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.

Incorrect and incomplete Add activity data in Solid PREP responses
3 participants