- Notifications
You must be signed in to change notification settings - Fork 305
Description
Looking into implementing Solid PREP in dokieli. Cool stuff! Some bugs with the response data but they seem relatively minor.
Request (snippet):
$ curl -ki -H'Accept-Events: "prep"; accept="application/ld+json"' https://csarven.localhost:8443/dokieli/inbox/ Response (snippet):
HTTP/1.1 200 OK X-Powered-By: solid-server/5.7.11 Accept-Events: "prep";accept=("message/rfc822" "application/ld+json" "text/turtle") Events: protocol="prep", status=200, expires="Thu, 07 Nov 2024 15:13:48 GMT" Content-Type: multipart/mixed; boundary="MAJ8bCuGxmcu9HkCOzUi" --MAJ8bCuGxmcu9HkCOzUi Content-Type: text/turtle @prefix : <#>. @prefix dct: <http://purl.org/dc/terms/>. @prefix ldp: <http://www.w3.org/ns/ldp#>. @prefix stat: <http://www.w3.org/ns/posix/stat#>. @prefix xsd: <http://www.w3.org/2001/XMLSchema#>. @prefix inbox: <>. @prefix tur: <http://www.w3.org/ns/iana/media-types/text/turtle#>. inbox: a ldp:BasicContainer, ldp:Container; dct:modified "2024-11-07T14:02:25Z"^^xsd:dateTime; ldp:contains <c86da0c8-087b-4d56-8c52-5cb682c07fe6.ttl>, <eb60ab84-80a5-4cd2-adf3-acc7a15180b4.ttl>, <eca044ed-c8b7-46fd-a469-c895df0ecd84.ttl> stat:mtime 1730988145.945; stat:size 4096 . --A+1x55W+mvT60TuzH1n5 Content-Type: application/ld+json{"published": "Thu, 07 Nov 2024 14:15:58 GMT", "type": "Add", "object": "https://csarven.localhost/dokieli/inbox/", "target": "/dokieli/inbox/fa6ec1e0-dd3f-4b1f-b915-6dc3311351af.ttl", "state": "W/\"7-rM9AyJuqT6iOan/xHh+AW+7K/T8\"", "@context": [ "https://www.w3.org/ns/activitystreams", "https://www.w3.org/ns/solid/notification/v1" ] } Note that the initial response is in text/turtle. Should that be application/ld+json?
Note the date format for as:published should have range in xsd:dateTime. Issue: NSS should convert the date format.
Another request (snippet):
$ curl -ki -H'Accept-Events: "prep"; accept="text/turtle"' https://csarven.localhost:8443/dokieli/inbox/ Response Headers
HTTP/1.1 200 OK X-Powered-By: solid-server/5.7.11 Accept-Events: "prep";accept=("message/rfc822" "application/ld+json" "text/turtle") Events: protocol="prep", status=200, expires="Thu, 07 Nov 2024 14:57:57 GMT" Content-Type: multipart/mixed; boundary="KQman1p0csYxoyFdjhR2" Notification
--chmdPhxmuTFKwWBW6gL2 Content-Type: text/turtle @prefix as: <https://www.w3.org/ns/activitystreams#> . @prefix notify: <https://www.w3.org/ns/solid/notification/v1#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . <undefined> a as:Add ; notify:state "W/"7-rM9AyJuqT6iOan/xHh+AW+7K/T8"" ; as:object https://csarven.localhost/dokieli/inbox/ ; as:published "Thu, 07 Nov 2024 14:02:25 GMT"^^xsd:dateTime . Note also data format here. Note undefined in subject IRI. Should probably be an http UUID if they can be eventually dereference but bnode with a UUID would do as well. The data also seems to be incomplete compared to response in application/ld+json.
I think the description of Add also needs a minor fix; swap object and target values. Taking the JSON-LD example from above, it should be like this:
{"id": "http://example.com/.well-known/genid/0798c962-1879-448f-af44-f83162a029be", "published": "2024-11-07T14:15:58Z", "type": "Add", "object": "/dokieli/inbox/fa6ec1e0-dd3f-4b1f-b915-6dc3311351af.ttl", "target": "https://csarven.localhost/dokieli/inbox/", "state": "W/\"7-rM9AyJuqT6iOan/xHh+AW+7K/T8\"", "@context": [ "https://www.w3.org/ns/activitystreams", "https://www.w3.org/ns/solid/notification/v1" ] }