I tend to officially sunset DAV-4-TbSync, and the only remaining
"feature" it supports which is not yet supported by Thunderbird is the
detection of iCloud calendars and address books.
Fixing iCloud CalDAV discovery is handled in D206253.
The reason CardDAV discovery currently fails is: iCloud returns a 207
response for `${url.origin}/.well-known/carddav`, but it does not
contain any useful information. The returned multi-response only
includes one entry, which has a 404 status. The actual good response is
retrievable from `${url.origin}`, but since we have a response already,
it is skipped.
This patch clears the response, if it has no useful information, and
that seems to be enough. One could of course also check for the 404 status
inside the multi-response. But I see no need for it. The code used in
this patch is already used a few lines earlier, probably to work around
a similar issue.
This patch has two unresolved issues (when it comes to iCloud):
- iCloud does not send a displayname and "card" is used. It should
fall back to "contacts" or a similar name, if no displayname is found
- the original request was made to `https://icloud.com`, and the code
is currently not smart enough to use the same provided password for
the follow-up request to `https://p119-contacts.icloud.com` (in my
case) and a second password prompt is shown.
I can provide iCloud access credentials.
With this patch, I can enter my Apple-ID as username using a dedicated
app password created for Thunderbird, and the server `icloud.com`, to
get my address book discovered and added.
Differential Revision: https://phabricator.services.mozilla.com/D206267
--HG--
extra : moz-landing-system : lando