Subject: Re: [VCARDDAV] Performing an initial sync with the server?

From: Jong Yoon Lee <[email-masked]>
Date: Wed, 18 Nov 2009 15:50:00 -0800 (PST)

I think you would want to do PROPFIND with depth 1 instead of addressbook-query REPORT, something like.

<D:propfind xmlns:D="DAV:">
  <D:prop>
    <D:getetag/>
    <C:address-data xmlns:C="urn:ietf:params:xml:ns:carddav"/>
  </D:prop>
</D:propfind>

However in general, the client would want to request address-data of only the vCards that it's interested in, instead of requesting them for all vCards all the time.

We also have CardDAV server being developed, so if you are interested in testing against other server please let me know and I'll provide you with access info.

Jong

----- "Nick Zitzmann" <[email-masked]> wrote:

> I'm making a CardDAV client. I tried searching around, and reading the
> latest draft, and I don't understand one very basic thing: How do I
> perform an initial sync with the server, downloading every vCard in an
> address book?
> 
> I was able to successfully get the addressbook-home-set property from
> the server's principal URL for the server. But when I try to send it a
> report like this:
> 
> REPORT /addressbooks/__uids__/ABEB6FF7-E708-4387-A2D5-053F9A9DBA2E/
> HTTP/1.1
> Authorization: (yes, we authorize okay)
> Host: example.org:8843
> Accept: */*
> Depth: 1
> Content-Type: text/xml
> Content-Length: 221
> 
> <?xml version="1.0" encoding="utf-8"?><r1:addressbook-query
> xmlns:r0="DAV:"
> xmlns:r1="urn:ietf:params:xml:ns:carddav"><r0:prop><r0:getetag/><r1:address-data><r1:allprop/></r1:address-data></r0:prop></r1:addressbook-query>
> 
> I'd expect it to return a multi-status containing the contents of
> every card in the address book, plus each of their etags, but instead
> I get an error 400 in return. The server on port 8843 is Mac OS X's
> CardDAV server.
> 
> I already tried changing the
> "<r1:address-data><r1:allprop/></r1:address-data>" to
> "<r1:address-data/>" and it didn't make a difference. The CalDAV
> equivalent query, calendar-query, works just fine on the CalDAV server
> running on the same system...
> 
> Nick Zitzmann
> <http://www.chronosnet.com/>
> 
> _______________________________________________
> VCARDDAV mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/vcarddav