Merge pull request #507 from citrin/master

Strip trailing slash from .well-known-URIs to fix autodiscovery
This commit is contained in:
Markus Unterwaditzer 2016-09-19 23:52:34 +02:00 committed by GitHub
commit fbaac88776
2 changed files with 3 additions and 3 deletions

View file

@ -281,7 +281,7 @@ class CalDiscover(Discover):
</d:propfind> </d:propfind>
""" """
_homeset_tag = '{%s}calendar-home-set' % _namespace _homeset_tag = '{%s}calendar-home-set' % _namespace
_well_known_uri = '/.well-known/caldav/' _well_known_uri = '/.well-known/caldav'
class CardDiscover(Discover): class CardDiscover(Discover):
@ -295,7 +295,7 @@ class CardDiscover(Discover):
</d:propfind> </d:propfind>
""" """
_homeset_tag = '{%s}addressbook-home-set' % _namespace _homeset_tag = '{%s}addressbook-home-set' % _namespace
_well_known_uri = '/.well-known/carddav/' _well_known_uri = '/.well-known/carddav'
class DavSession(object): class DavSession(object):

View file

@ -154,7 +154,7 @@ class GoogleContactsStorage(dav.CarddavStorage):
class session_class(GoogleSession): class session_class(GoogleSession):
# Apparently Google wants us to submit a PROPFIND to the well-known # Apparently Google wants us to submit a PROPFIND to the well-known
# URL, instead of looking for a redirect. # 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'] scope = ['https://www.googleapis.com/auth/carddav']
storage_name = 'google_contacts' storage_name = 'google_contacts'