From b49a967cf14a120180377c21073bf0745ec4d22f Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 28 Sep 2015 13:15:36 +0000 Subject: [PATCH] we can NOT use 204 No content (forbidds a body) with return=representation, therefore we need to use 200 Ok instead --- phpgwapi/inc/class.groupdav.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.groupdav.inc.php b/phpgwapi/inc/class.groupdav.inc.php index 2678458fc9..519535a117 100644 --- a/phpgwapi/inc/class.groupdav.inc.php +++ b/phpgwapi/inc/class.groupdav.inc.php @@ -1659,9 +1659,13 @@ class groupdav extends HTTP_WebDAV_Server if (is_bool($status)) $status = $status ? '204 No Content' : '400 Something went wrong'; // check/handle Prefer: return-representation - if ($status[0] === '2') + if ($status[0] === '2' || $status === true) { - $handler->check_return_representation($options, $id, $user); + // we can NOT use 204 No content (forbidds a body) with return=representation, therefore we need to use 200 Ok instead! + if ($handler->check_return_representation($options, $id, $user) && (int)$status == 204) + { + $status = '200 Ok'; + } } return $status; }