-
Notifications
You must be signed in to change notification settings - Fork 4
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
Should FCR API Guarantee Slug Behavior on POST? #6
Comments
cc: @azaroth42. Is this behavior worth trying to standardize in LDP, via RFC, or ...? I can imagine e.g. an HTTP header to control how slug conflicts are handled. |
👍 to using Slug to create a resource with a client-assigned URI rather than PUT, and to failing a request with a Slug that can't be honored. If you care enough to include the slug, then you probably care that it works. Standardization ... we can bring it up on the LDP Next CG. I would prefer a best practice here, rather than another header that affects the Slug header. If we need another header, it could just as easily be MandatorySlug. |
I think at the LDP level, it's probably best to simply follow RFC 5023, keeping I think my proposal would be to specify handling of that hint within Fedora implementations, ideally defining behavior well enough that clients can safely predict the resulting resource's URI before sending the request. |
If it's useful to us, then it's probably useful to others. If we rely on Fedora specific implementation details, then we can't swap out Fedora for other LDP implementations. |
Both Derby and FCRepo4 currently respect
Slug:
headers on HTTP POST requests, failing the request if the requested slug can't be applied.This behavior provides a safe mechanism for clients to request a new resource with a known URI within a given container. PUT can provide a similar mechanism, but only with a more complex set of assumptions about the containment of resources created with PUT requests. The slug approach feels more general.
@tpendragon, @cbeer and I ran into this while testing ActiveFedora with Derby, and had the sense that POST was the best approach for clients aiming for generalized LDP support.
The text was updated successfully, but these errors were encountered: