Re: ldp-ISSUE-12 (HTTP PATCH for creation): Can HTTP PATCH be used for resource creation? [Linked Data Platform core]

On 19/10/12 10:07, Raúl García Castro wrote:
> El 18/10/12 17:17, Steve Battle escribió:
>>
>>
>>> -----Original Message-----
>>> From: Linked Data Platform (LDP) Working Group Issue Tracker
>>> [mailto:sysbot+tracker@w3.org]
>>> Sent: 02 October 2012 15:15
>>> To: public-ldp-wg@w3.org
>>> Subject: ldp-ISSUE-12 (HTTP PATCH for creation): Can HTTP PATCH be used
>>> for resource creation? [Linked Data Platform core]
>>>
>>> ldp-ISSUE-12 (HTTP PATCH for creation): Can HTTP PATCH be used for
>>> resource creation? [Linked Data Platform core]
>>>
>>> http://www.w3.org/2012/ldp/track/issues/12
>>>
>>> Raised by: Raúl García Castro
>>> On product: Linked Data Platform core
>>>
>>> 4.7 + 5.8 (HTTP PATCH)
>>>
>>> HTTP PATCH MAY be used to create a new resource if the URI does not
>>> point
>>> to an existing resource.
>>>
>>> Are we interested in restricting the usage of PATCH only for updates?
>>> Or do
>>> we allow this behaviour?
>>>
>>>
>>
>> According to RFC 5789 : PATCH Method for HTTP
>>
>> 2.  The PATCH Method
>>
>>     The PATCH method requests that a set of changes described in the
>>     request entity be applied to the resource identified by the Request-
>>     URI.  The set of changes is represented in a format called a "patch
>>     document" identified by a media type.  If the Request-URI does not
>>     point to an existing resource, the server MAY create a new resource,
>>     depending on the patch document type (whether it can logically modify
>>     a null resource) and permissions, etc.
>>
>> So it looks like - YES - the patch method may create a new resource.
>> The ChangeSet representation, for example seems to support this
>> scenario (assuming we're not trying to delete non-existing existing
>> triples with that subject) <http://www.w3.org/2009/12/rdf-ws/papers/ws07>
>> In addition, even if the patched resource already exists, the RDF
>> description may include additional resources that don't yet exist
>> which would have to be created.
>
> Then, I suggest to update the specification to clarify this, similarly
> to what is done for using PATCH for updates:
>
> "4.7.1 LDPR servers may implement HTTP PATCH to allow modifications,
> especially partial replacement, of their resources. [RFC5789]"

noting that PATCH can also change other resources:

RFC 5789 =>
[[
The PATCH
    method affects the resource identified by the Request-URI, and it
    also MAY have side effects on other resources; i.e., new resources
    may be created, or existing ones modified, by the application of a
    PATCH.
]]

>
> Kind regards,
>

Received on Friday, 19 October 2012 14:17:25 UTC