Re: 4.2.4.6 LDP servers may choose to allow the creation of new resources using HTTP PUT.

Yes. I think it is important to prevent any accidental overwriting of data.
This is addressed by the spec if the server requires conditional requests
for existing resources as suggested by 4.2.4.5 [1], In that case, these
accidencial overwrite is prevented because any new resource representation
without an etag will result in a 428 (Precondition Required). However, if
the server doesn't require precondition, I guess the only way for the
client to know this would be to do a HEAD in advance but it is not safe
because it could always happen that some other client creates the resource
at a point between the HEAD and the PUT.

Another point related to using PUT for creation.

Based on the resolution of ISSUE-91 [2], the interaction is driven by
the rel='type' Link header. IMHO, it implies that when creating resources
using PUT clients should do the same by specifying the link header. 5.2.3.4
[3] in the spec does not make any references to the POST method and but as
it is under the section LDPC/POST it might be seen as it is only applicable
to LDPC POST. May be we can refer to 5.2.3.4 from 4.2.4.6 where it says PUT
can also be used to create resources.

Best Regards,
Nandana

[1] - http://www.w3.org/TR/ldp/#ldpr-put-precond
[2] - http://www.w3.org/2012/ldp/track/issues/91
[3] - http://www.w3.org/TR/ldp/#h5_ldpc-post-createrdf

On Fri, Oct 10, 2014 at 10:06 AM, henry.story@bblfish.net <
henry.story@bblfish.net> wrote:

> How does a client specify that it only wants the creation of a resource,
> i.e.. that
> it only wants the PUT to succeed if there was not a previously existing
> resource there?
> Should that not be in the spec?
>
> Henry

Received on Friday, 10 October 2014 09:31:49 UTC