From 77cc96a0709560540a2487a1701801f9c0266832 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 21 Jul 2008 16:15:57 +0000 Subject: [PATCH] Monotone-Parent: c67c4c1e3289a8f67e6b76552865f8579612090b Monotone-Revision: 314258a347f9d34b19270de4e4ee70dbd2489cb7 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-07-21T16:15:57 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ SoObjects/SOGo/SOGoContentObject.m | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e8b090503..3e1dd012a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-07-21 Wolfgang Sourdeau + + * SoObjects/SOGo/SOGoContentObject.m ([SOGoContentObject + -PUTAction:_ctx]): when the object is new, return 201. Otherwise, + return 204 as success code. + 2008-07-18 Wolfgang Sourdeau * UI/Scheduler/UIxCalWeekView.m ([UIxCalWeekView -startDate]): diff --git a/SoObjects/SOGo/SOGoContentObject.m b/SoObjects/SOGo/SOGoContentObject.m index 002cb7d40..f0ab4f9ba 100644 --- a/SoObjects/SOGo/SOGoContentObject.m +++ b/SoObjects/SOGo/SOGoContentObject.m @@ -315,9 +315,13 @@ response = [_ctx response]; /* setup response */ - // TODO: this should be automatic in the SoDispatcher if we return nil? - [response setStatus: 201 /* Created */]; - + // TODO: this should be automatic in the SoDispatcher if we return + // nil? + if (isNew) + [response setStatus: 201 /* Created */]; + else + [response setStatus: 204 /* No Content */]; + etag = [self davEntityTag]; if (etag) {