diff --git a/addressbook/inc/class.addressbook_groupdav.inc.php b/addressbook/inc/class.addressbook_groupdav.inc.php index 93bb39db69..8b7caaaf46 100644 --- a/addressbook/inc/class.addressbook_groupdav.inc.php +++ b/addressbook/inc/class.addressbook_groupdav.inc.php @@ -248,6 +248,12 @@ class addressbook_groupdav extends Api\CalDAV\Handler { if (!is_array($filter[self::$path_attr])) $filter[self::$path_attr] = (array)$filter[self::$path_attr]; $requested_multiget_ids =& $filter[self::$path_attr]; + + // stop output buffering switched on to log the response, if we should return more than 200 entries + if (ob_get_level() && count($requested_multiget_ids) > 200) + { + ob_end_flush(); + } } $files = array(); @@ -1325,4 +1331,4 @@ class addressbook_groupdav extends Api\CalDAV\Handler ); return $settings; } -} +} \ No newline at end of file diff --git a/api/src/CalDAV/PropfindIterator.php b/api/src/CalDAV/PropfindIterator.php index 5126cbe556..a0917f6d0c 100644 --- a/api/src/CalDAV/PropfindIterator.php +++ b/api/src/CalDAV/PropfindIterator.php @@ -139,8 +139,8 @@ class PropfindIterator implements \Iterator if ($this->debug) error_log(__METHOD__."() returning TRUE"); return true; } - // check if previous query gave less then CHUNK_SIZE entries --> we're done - if ($this->start && count($this->files) < self::CHUNK_SIZE) + // check if previous query gave not equal CHUNK_SIZE entries (or the last one is a not-found entry with just path / count()===1) --> we're done + if ($this->start && (count($this->files) != self::CHUNK_SIZE || count($this->files[self::CHUNK_SIZE-1]) === 1)) { if ($this->debug) error_log(__METHOD__."() returning FALSE (no more entries)"); return false; @@ -183,4 +183,4 @@ class PropfindIterator implements \Iterator if ($this->debug) error_log(__METHOD__."() returning ".array2string(current($this->files) !== false)); return current($this->files) !== false; } -} +} \ No newline at end of file