W3C home > Mailing lists > Public > ietf-http-wg@w3.org > April to June 2006

Re: PUT, side effects and 201 Created?

From: Stefan Eissing <stefan.eissing@greenbytes.de>
Date: Tue, 4 Apr 2006 10:41:32 +0200
Message-Id: <9DA5652C-D0A5-4671-A098-43852BD4B1CE@greenbytes.de>
Cc: "Mark Nottingham" <mnot@yahoo-inc.com>, ietf-http-wg@w3.org
To: "Mark Baker" <distobj@acm.org>

Am 04.04.2006 um 03:01 schrieb Mark Baker:

>
> On 4/3/06, Mark Nottingham <mnot@yahoo-inc.com> wrote:
>>> If a new resource is created, the origin server MUST inform the
>>> user agent via the 201 (Created) response.
>> So, if I PUT something to /foo, and it has the side effect if
>> creating /foo;2006-04-03, is the response required to be a 201  
>> Created?
>
> Seems so.

Hmm, "side effect" is too general. Look at the two side effects:

Example A: WebDAV DeltaV uses 201 and Location header to indicate the  
upon checking a new version was created and where it lives.

Example B: A general server failure, normally answered with 500, is  
logging the failure reason in a new resource which can be retrieved  
via GET. It makes no sense to answer a 201 instead of 500 in such a  
case.

Clearly we would like to say that A is following the intention of the  
spec, while returning 201 in case B is not required.

Regards, Stefan
Received on Tuesday, 4 April 2006 08:42:22 GMT

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