W3C home > Mailing lists > Public > ietf-http-wg@w3.org > July to September 2007

Re: Some comments on the PATCH draft

From: Roy T. Fielding <fielding@gbiv.com>
Date: Tue, 3 Jul 2007 15:47:21 -0700
Message-Id: <1536CC83-AA03-4628-83BB-C074C1EB1144@gbiv.com>
Cc: ietf-http-wg@w3.org
To: Andreas Sewe <sewe@rbg.informatik.tu-darmstadt.de>

On Jul 3, 2007, at 5:32 AM, Andreas Sewe wrote:
>> 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?

Negotiable content URIs don't normally support PUT either, for
good reasons.  Authoring should be done on source resources, not
resources that are derived from other sources.

>> 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!

PUT doesn't work with content negotiation.

The answer to your issue, though, is to use a diff format that
includes metadata about the target representation and the resulting
representation in the first chunk of the diff.  There are many
reasons to do that beyond the negotiation issue.

....Roy
Received on Tuesday, 3 July 2007 22:46:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 06:50:15 GMT