mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +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)
|
||||
rv = root.find('.//{DAV:}current-user-principal/{DAV:}href')
|
||||
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)
|
||||
|
||||
def find_home(self, url=None):
|
||||
|
|
|
|||
Loading…
Reference in a new issue