From 6fe4085a11706fdb4bf5738be593157526c1e1ee Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 2 Aug 2013 19:28:38 +0000 Subject: [PATCH] fixed wrong condition only giving a location header if requests fails, not if it succeeds --- phpgwapi/inc/class.groupdav_handler.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.groupdav_handler.inc.php b/phpgwapi/inc/class.groupdav_handler.inc.php index 947457458b..d6198ed059 100644 --- a/phpgwapi/inc/class.groupdav_handler.inc.php +++ b/phpgwapi/inc/class.groupdav_handler.inc.php @@ -489,6 +489,7 @@ abstract class groupdav_handler */ function put_response_headers($entry, $path, $retval, $path_attr_is_name=true, $etag=null) { + //error_log(__METHOD__."(".array2string($entry).", '$path', ".array2string($retval).", path_attr_is_name=$path_attr_is_name, etag=".array2string($etag).")"); // we should not return an etag here, as EGroupware never stores ical/vcard byte-by-byte // as SOGO Connector requires ETag header to recognice as successful PUT, we are sending them again for it // --> as all clients dislike not getting an ETag for a PUT, we sending it again even not storing byte-by-byte @@ -498,7 +499,7 @@ abstract class groupdav_handler header('ETag: "'.$etag.'"'); } // send Location header only on success AND if we dont use caldav_name as path-attribute or - if (!(is_bool($retval) ? $retval : $retval[0] === '2') && (!$path_attr_is_name || + if ((is_bool($retval) ? $retval : $retval[0] === '2') && (!$path_attr_is_name || // POST with add-member query parameter $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_GET['add-member']))) {