mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-29 09:35:50 +00:00
Obey useragent setting for DAV discovery
This commit is contained in:
parent
eec503b7d7
commit
55be28c12b
2 changed files with 6 additions and 2 deletions
|
|
@ -21,6 +21,8 @@ Version 0.5.0
|
|||
- Use only one worker if debug mode is activated.
|
||||
- ``verify=false`` is now disallowed in vdirsyncer, please use
|
||||
``verify_fingerprint`` instead.
|
||||
- Fixed a bug where vdirsyncer's DAV storage was not using the configured
|
||||
useragent for collection discovery.
|
||||
|
||||
Version 0.4.4
|
||||
=============
|
||||
|
|
|
|||
|
|
@ -94,8 +94,10 @@ class Discover(object):
|
|||
|
||||
def find_dav(self):
|
||||
try:
|
||||
response = self.session.request('GET', self._well_known_uri,
|
||||
allow_redirects=False)
|
||||
response = self.session.request(
|
||||
'GET', self._well_known_uri, allow_redirects=False,
|
||||
headers=self.session.get_default_headers()
|
||||
)
|
||||
return response.headers.get('Location', '')
|
||||
except (HTTPError, exceptions.Error):
|
||||
# The user might not have well-known URLs set up and instead points
|
||||
|
|
|
|||
Loading…
Reference in a new issue