Don't actually follow redirects

This commit is contained in:
Markus Unterwaditzer 2014-12-23 22:41:57 +01:00
parent b04638246a
commit 2a3b56c179

View file

@ -120,8 +120,9 @@ class Discover(object):
@_catch_generator_exceptions
def _find_dav(self):
response = self.session.request('GET', self._well_known_uri)
yield response.url
response = self.session.request('GET', self._well_known_uri,
allow_redirects=False)
yield response.headers['Location']
def discover(self):
"""discover all the user's CalDAV or CardDAV collections on the server