The check() function is called before uploading file. The RFC quoted is meant to get index.html in that folder with GET or HEAD or return 404. In webdav, you check the existence of the folder with PROPFIND not GET or HEAD. This causes the upload failed with some webdav servers that have no idea what you want with GET/HEAD on a folder.
@wrap_connection_error
def check(self, remote_path=root):
"""Checks an existence of remote resource on WebDAV server by remote path.
More information you can find by link http://webdav.org/specs/rfc4918.html#rfc.section.9.4
:param remote_path: (optional) path to resource on WebDAV server. Defaults is root directory of WebDAV.
:return: True if resource is exist or False otherwise
"""
if self.webdav.disable_check:
return True
The check() function is called before uploading file. The RFC quoted is meant to get index.html in that folder with GET or HEAD or return 404. In webdav, you check the existence of the folder with PROPFIND not GET or HEAD. This causes the upload failed with some webdav servers that have no idea what you want with GET/HEAD on a folder.