Mailing List Archive

Multiple prop-filter not supported (?)
Hi all,

I was working on a CardDAV client, and I have a problem with a
"complex" filter like this:

<C:filter test="anyof">
<C:prop-filter name="FN">
<C:text-match collation="i;unicode-casemap"
match-type="contains">Fabio</C:text-match>
</C:prop-filter>
<C:prop-filter name="FN">
<C:text-match collation="i;unicode-casemap"
match-type="contains">Michele</C:text-match>
</C:prop-filter>
</C:filter>

This is a modified example on RFC 6352 section 8.6.4. When I do a
REPORT request with this filter, Davical sends me all vcards.

I tracked down the HTTP request and then I found this (on line 46 and
next):

/**
* There can only be *one* FILTER element.
*/
$qry_filters =
$xmltree->GetPath('/urn:ietf:params:xml:ns:carddav:addressbook-query/urn:ietf:params:xml:ns:carddav:filter/*');
if ( count($qry_filters) != 1 ) {
/* $qry_filters = $qry_filters[0]; // There can only be one FILTER
element
}
else { */
$qry_filters = false;
}

If I understand correctly, this code resets the query filter when
multiple prop-filter are found. I tried to delete the whole if
statement, and it's appear to work partially (basically it's generating
many conditions joined with ANDs, and it's the correct behavior when
"test" parameter of "filter" tag is "allof").

Is this a bug? Or I'm looking to a wrong RFC?

Enrico
_______________________________________________
DAViCal-dev mailing list
DAViCal-dev@lists.davical.org
http://lists.davical.org/listinfo/davical-dev