mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-29 18:26:05 +00:00
When sync-collection is asked for data, only return it if < 50 rows.
The resource data element is not *actually* allowed, per the spec, but some clients do use it, and some servers do support it. In the case of an initial sync which requests it we don't want to send down a huge response to an ill-considered client.
This commit is contained in:
parent
54bc63e90f
commit
b301a36aca
@ -1597,6 +1597,7 @@ EOQRY;
|
||||
case 'urn:ietf:params:xml:ns:carddav:address-data':
|
||||
case 'urn:ietf:params:xml:ns:caldav:calendar-data':
|
||||
if ( $this->_is_collection ) return false;
|
||||
if ( !isset($c->sync_resource_data_ok) || $c->sync_resource_data_ok == false ) return false;
|
||||
if ( !isset($this->resource) ) $this->FetchResource();
|
||||
$reply->NSElement($prop, $tag, $this->resource->caldav_data );
|
||||
break;
|
||||
|
||||
@ -91,6 +91,10 @@ EOSQL;
|
||||
$first_status = 0;
|
||||
|
||||
if ( $qry->Exec("REPORT",__LINE__,__FILE__) ) {
|
||||
if ( $qry->rows() > 50 ) {
|
||||
// If there are more than 50 rows to send we should not send full data in response ...
|
||||
$c->sync_resource_data_ok = false;
|
||||
}
|
||||
while( $object = $qry->Fetch() ) {
|
||||
if ( $object->dav_name == $last_dav_name ) {
|
||||
/** The complex case: this is the second or subsequent for this dav_id */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user