Re: Some comments on the PATCH draft

It would make sense to advise against PATCH support for resources  
where the representation to be patched is not determined by the URI  
alone.

I think this is less of an issue than it sounds. In my experience,  
resources with content negotiation often have URIs for the different  
negotiated resources. Like apache which serves different languages on  
"/" but each language representation has its own URI.

Cheers,

Stefan

Am 03.07.2007 um 14:32 schrieb Andreas Sewe:

>
> James Snell, the author of the recently revived PATH draft, has  
> asked me
> to resend my comments for further discussion to this list.  
> (Originially
> I send my comments to James only.)
>
> So here they are:
>> What bothers me currently about the PATCH draft is that it refers
>> to resources throughout even though what is actually patched is a
>> *representation* of a resource.
>>
>> Besides being an issue of terminology this also has some
>> implications when content negotiation is used. Granted, content
>> negotiation complicates things quite a bit and might not be
>> needed in most cases, but since PUT works fine even for
>> negotiated resources I have the feeling that PATCH should work,
>> too.
>>
>> The problem with the draft is, however, that the content type of
>> the entity send cannot be determined, since the Content-Type
>> header contains (rightly so!) application/diff or some such type.
>> But the assumption that the base media type is that of the
>> resource is false as soon as that resource has many different
>> representations. Which representation should the diff be applied
>> to?
>>
>> Representations might differ by Content-Type, Content-Language,
>> etc., information which can be found in the Vary header. But
>> besides Content-Type the other headers can be provided directly;
>> only Content-Type carries the diff format's media type.
>>
>> Unfortunately, I can't think of a clean solution of the top of my
>> head; both adding a header like Patched-Type and requiring a
>> media type parameter like application/diff;type="text/plain" seem
>> clumsy to me. But if PUT works with content negotiation, so
>> should PATCH!
>>
>> Regards,
>>
>> Andreas
>

--
Stefan Eissing

<green/>bytes GmbH
Hafenweg 16
D-48155 Münster
Germany
Amtsgericht Münster: HRB5782

Received on Tuesday, 3 July 2007 13:06:26 UTC