From 2747bee9a653a9e0a01962a0438028c2f52cee8b Mon Sep 17 00:00:00 2001 From: Anton Yuzhaninov Date: Mon, 19 Sep 2016 18:53:12 +0000 Subject: [PATCH 1/2] Strip trailing slash from .well-known-URIs to fix autodiscovery According to RFC6764 URLs should be "/.well-known/caldav" and "/.well-known/caldav". --- vdirsyncer/storage/dav.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vdirsyncer/storage/dav.py b/vdirsyncer/storage/dav.py index 125fa53..a8cf32b 100644 --- a/vdirsyncer/storage/dav.py +++ b/vdirsyncer/storage/dav.py @@ -281,7 +281,7 @@ class CalDiscover(Discover): """ _homeset_tag = '{%s}calendar-home-set' % _namespace - _well_known_uri = '/.well-known/caldav/' + _well_known_uri = '/.well-known/caldav' class CardDiscover(Discover): @@ -295,7 +295,7 @@ class CardDiscover(Discover): """ _homeset_tag = '{%s}addressbook-home-set' % _namespace - _well_known_uri = '/.well-known/carddav/' + _well_known_uri = '/.well-known/carddav' class DavSession(object): From d60132cbc009689a9bf5c3955ed396a0377d65e3 Mon Sep 17 00:00:00 2001 From: Anton Yuzhaninov Date: Mon, 19 Sep 2016 21:50:30 +0000 Subject: [PATCH 2/2] Strip slash from well-known URL for Google According to https://developers.google.com/google-apps/carddav/ URL should be https://www.googleapis.com/.well-known/carddav --- vdirsyncer/storage/google.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vdirsyncer/storage/google.py b/vdirsyncer/storage/google.py index 47d8809..2b53e16 100644 --- a/vdirsyncer/storage/google.py +++ b/vdirsyncer/storage/google.py @@ -154,7 +154,7 @@ class GoogleContactsStorage(dav.CarddavStorage): class session_class(GoogleSession): # Apparently Google wants us to submit a PROPFIND to the well-known # URL, instead of looking for a redirect. - url = 'https://www.googleapis.com/.well-known/carddav/' + url = 'https://www.googleapis.com/.well-known/carddav' scope = ['https://www.googleapis.com/auth/carddav'] storage_name = 'google_contacts'