-
Notifications
You must be signed in to change notification settings - Fork 103
Is PUT a standard? #198
Comments
yeah, PUT and POST are definitely both supported, and Server implementers should be careful that they don't allow POST if PUT is not allowed or vice versa, so basically both should require permissions on both the container and the resulting resource, see https://github.com/michielbdejong/web-access-control-spec/blob/verbs-modes-table/README.md#relation-between-http-verbs-and-modes-of-access |
From the perspective of LDP, servers may allow creation of resources via
LDP, however, does not specify the exact behaviors of Create-on-PUT, for example:
IMO, these behaviors (if Create-on-PUT is to be supported at all) would be helpful to clarify at the level of the Solid specification, because a server implementation will need to make decisions on these sorts of issues. The role of the specification, here, is to make sure that all implementations make the same (or at least not incompatible) decisions in such cases. That way clients will have a consistent interface on which to operate. The simplest option is to disallow Create-on-PUT, stating that creation happens only with |
Ok thanks for your answers. I've created a PR to make it more clear which of these two interpretations is meant. |
Great points @acoburn, indeed those things are all defined at the Solid level and not at the LDP level:
After a PUT to
yes (see rest-api.md, section about
Indeed not clarified at the LDP level, but at the Solid level it is: "Resources are grouped in directory-like Containers (currently conforming to the LDP Basic Container spec)"
That's a conflict error (although I think you're right that that's not explicitly documented!) Created #201 about this.
Now that I think about that, I don't think I understand how you could ever implement Solid on top of an eventually consistent backend-store. But specifically about the comparison between POST and PUT, you could copy the trick that POST uses, and PUT to a URL that ends in a long random string. That way it becomes astronomically unlikely that two concurrent PUTs would result in a network split.
You would use |
Thanks @michielbdejong
In LDP (section 4.2.4.5), If-Match on
In Trellis, I have a configuration setting that can be turned on to enforce this or not (enforcing it is great in theory but not very practical for many general use cases). By default, this is not enforced. |
The spec currently states:
I am not sure how we should interpret this statement: Does it (1) mean that it is not part of the api standard yet, or (2) that it is not usual to use it but it's part of the standard?
I think this description is a bit ambiguous, so from my point of view it would make sense to rephrase it to (1) "An alternative (though currently not part of the solid-spec) way of creating new resources is to use HTTP PUT." or (2) "An alternative (though not usual) way of creating new resources is to use HTTP PUT."
The text was updated successfully, but these errors were encountered: