caldav: make caldav use our requests in order to log DAV request (#88089)
gitea/passerelle/pipeline/head This commit looks good Details

This commit is contained in:
Yann Weber 2024-03-13 11:08:42 +01:00
parent 8986d35915
commit 7b58db7ea7
1 changed files with 5 additions and 1 deletions

View File

@ -128,7 +128,11 @@ class CalDAV(BaseResource):
@functools.cached_property
def dav_client(self):
'''Instanciate a caldav.DAVCLient and return the instance'''
return caldav.DAVClient(self.dav_url, username=self.dav_login, password=self.dav_password)
client = caldav.DAVClient(self.dav_url, username=self.dav_login, password=self.dav_password)
# Replace DAVClient.session requests.Session instance by our
# own requests session in order to log DAV interactions
client.session = self.requests
return client
def check_status(self):
'''Attempt a propfind on DAV root URL'''