Store during Collection account setup the DAV:current-user-principal as Url=
Following the RFC 6764 (Locating Services for Calendaring Extensions to WebDAV (CalDAV) and vCard Extensions to WebDAV (CardDAV)) procedure, Evolution obtains a stub URL for CalDAV and CardDAV and stores the stub URL in .config/evolution/*.source as:
[Collection] BackendName=webdav CalendarEnabled=true ContactsEnabled=true Identityemail@example.com MailEnabled=true CalendarUrl=stub-url-1 ContactsUrl=stub-url-2
Later on, during a triggered refresh, Evolution asks the stub urls for DAV:current-user-principal, DAV:resourcetype, DAV:principal-URL, CalDAV:calendar-home-set, CalDAV:calendar-user-address-set and CardDAV:addressbook-home-set. The server answers only on DAV:current-user-principal, so the same queries are repeated against the returned current-user-principal-URL.
The CardDAV:addressbook-home-set and CalDAV:calendar-home-set results are used by Evolution to update the list of collections offered by the server.
Per RFC 6764 the WebDAV client is supposed to use the stub URL to obtain the DAV:current-user-principal property. Asking towards the DAV:current-user-principal for the calendar-home-set and addressbook-home-set is supposed to work, but the stub URL is not supposed to know anything about the home-sets.
Finding on every refresh the DAV:current-user-principal is not necessary, as this value is not supposed to change. Only the results of the home-sets and CalDAV:calendar-user-address-set are supposed to change.
- To save some PROPFIND calls on each refresh, store in CalendarUrl and ContacsUrl not the stub URL retrieved using the RFC 6764 procedure, but the DAV:current-user-principal HREF.