nodeSolidServer / node-solid-server

Solid server on top of the file-system in NodeJS
https://solidproject.org/for-developers/pod-server
Other
1.78k stars 299 forks source link

Content Negotiation Problem re JSON-LD #847

Open kidehen opened 5 years ago

kidehen commented 5 years ago

Currently, we have the following returned for an "application/ld+json" document content-type request

curl -IH "Accept: application/ld+json" https://metahari.solid.community/profile/card
HTTP/1.1 200 OK
X-Powered-By: solid-server
Vary: Accept, Authorization, Origin
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Authorization, User, Location, Link, Vary, Last-Modified, ETag, Accept-Patch, Accept-Post, Updates-Via, Allow, WAC-Allow, Content-Length, WWW-Authenticate
Allow: OPTIONS, HEAD, GET, PATCH, POST, PUT, DELETE
Link: <card.acl>; rel="acl", <card.meta>; rel="describedBy", <http://www.w3.org/ns/ldp#Resource>; rel="type"
WAC-Allow: user="read",public="read"
MS-Author-Via: SPARQL
Updates-Via: wss://metahari.solid.community
Content-Type: text/plain; charset=utf-8
Content-Length: 2
ETag: W/"2-nOO9QiTIwXgNtWtBJezz8kv3SLc"
Date: Fri, 05 Oct 2018 23:43:31 GMT
Connection: keep-alive

Where the content-type is incorrect i.e., it should be "application/ld+json" .

elf-pavlik commented 5 years ago

831 should fix the HEAD vs. GET issue

Doing GET curl -i https://metahari.solid.community/profile/card gives Content-Type: text/turtle and turtle body. I don't know if currently server will parse RDFSource stored in filesystem and serialize according to Accept header. I think an issue already exist that currently it does NOT conform to LDP spec. I believe maintainers will have more insights into all that.