mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
parent
1846b392fa
commit
b0c498f70a
1 changed files with 7 additions and 1 deletions
|
|
@ -164,7 +164,13 @@ class Discover(object):
|
||||||
root = _parse_xml(response.content)
|
root = _parse_xml(response.content)
|
||||||
rv = root.find('.//{DAV:}current-user-principal/{DAV:}href')
|
rv = root.find('.//{DAV:}current-user-principal/{DAV:}href')
|
||||||
if rv is None:
|
if rv is None:
|
||||||
raise InvalidXMLResponse()
|
# This is for servers that don't support current-user-principal
|
||||||
|
# E.g. Synology NAS
|
||||||
|
# See https://github.com/pimutils/vdirsyncer/issues/498
|
||||||
|
dav_logger.debug(
|
||||||
|
'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)
|
||||||
|
|
||||||
def find_home(self, url=None):
|
def find_home(self, url=None):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue