From ceb629666900f0ef36341ad4a433e760e0553805 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Tue, 14 Mar 2017 11:12:44 +0100 Subject: [PATCH] Add trailing slash on discovery (#600) --- 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 73b9636..aaea996 100644 --- a/vdirsyncer/storage/dav.py +++ b/vdirsyncer/storage/dav.py @@ -165,7 +165,7 @@ class Discover(object): 'No current-user-principal returned, re-using URL {}' .format(response.url)) return response.url - return urlparse.urljoin(response.url, rv.text) + return urlparse.urljoin(response.url, rv.text).rstrip('/') + '/' def find_home(self): url = self.find_principal() @@ -180,7 +180,7 @@ class Discover(object): rv = root.find('.//' + self._homeset_tag + '/{DAV:}href') if rv is None: raise InvalidXMLResponse('Couldn\'t find home-set.') - return urlparse.urljoin(response.url, rv.text) + return urlparse.urljoin(response.url, rv.text).rstrip('/') + '/' def find_collections(self): rv = None