-
Notifications
You must be signed in to change notification settings - Fork 305
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
Allow creating containers using PATCH #1703
Comments
Workaround for an NSS bug nodeSolidServer/node-solid-server#1703
Workaround for an NSS bug nodeSolidServer/node-solid-server#1703
Workaround for an NSS bug nodeSolidServer/node-solid-server#1703
PUT should work. Could you try PUT without content-type content-type for container should not be needed ?
This error code do not exist anymore |
Thanks @bourgeoa! Turns out I was using an old version of NSS locally and I didn't realize 😅, sorry about that. I tried using
I was using that header to create containers using
Where is that specified? Reading the current spec I didn't find anything about it. This is not a problem for my app anymore, because |
PATCH can only use N3 patch for the time being |
@bourgeoa Just to clarify though, is that a limitation of node-solid-server or is that part of the Solid Protocol? |
I understand that PATCH in Solid his limited to RDF documents. It can create a new document Resource if not exist and all intermediate container Resources. As such it cannot create a Container only. Container representation is not directly writable. @csarven is this correct. |
This issue is a duplicate of #1465 with the main difference being the HTTP method. Servers are expected to support PATCH to create resources (including containers and non-containers). See also https://solidproject.org/ED/protocol#server-put-patch-uri-assignment |
@csarven The link to the #server-put-patch-uri-assignment is broken. Is there another place to find that link, or has it been removed from the spec? |
Should be closed. |
The requirement https://solidproject.org/ED/protocol#server-put-patch-uri-assignment is dropped. See the ED changelog ( https://solidproject.org/ED/protocol#changelog ). @prefix spec: <http://www.w3.org/ns/spec#> .
@prefix ed: <https://solidproject.org/ED/protocol#> .
ed:changelog
spec:change ed:a91960b6-0543-4acc-8153-689c435c7659 .
ed:afd2402a-3174-4f27-af9d-f80461538e95
a spec:Change ;
spec:changeClass spec:ChangeClass2 ;
spec:changeSubject ed:server-put-patch-uri-assignment ;
spec:statement "Remove the requirement for implicit and inherited URI assignment after HTTP PUT, PATCH requests that is already defined in referenced specifications."@en .
|
Up until recently, I had been using
POST
requests to create new containers in my apps and it was working as expected. This sufficed so far because I was hard-coding the path of containers into my apps, and they were always root-level containers. But for a new app I'm working on I let users decide the path of the new container, and this creates a new situation where intermediate containers may not exist.In order to solve this, I looked at the Solid spec and saw this:
So I refactored my code to use
PATCH
instead. But I found out that it does not work as expected with NSS. Here's the result I've been getting:Response: Index file needs to have text/html as content type
The text was updated successfully, but these errors were encountered: