-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
client.exists()
returns True
even if resource does not exists
#55
Comments
If the resource does not exist, the server should be returning 404 status, which is being checked here: Lines 353 to 354 in 45f9e42
207 response means it exists. Could you please share the details about the server that you are using? We use a test WebDAV server which you can play with, or else use a real servers like Nextcloud/ownCloud/Apache. Please check the Contributing Guide. |
I am using this docker image: https://hub.docker.com/r/ionelmc/webdav/. I am using as a test environment a (local) Kubernetes deployment with two containers, one of the being the one running the webdav docker image above. |
@Zigur, thanks I am able to reproduce. This issue happens because This is an issue with webdav4 that I'd like to fix at some point in time (see #3), but for now, I'll just patch |
@Zigur, I fixed the I'd argue that this is a bug on the WebDAV server that you are using, as all the HTTP stuff still applies to the WebDAV. I created #59 that supports Nginx dav extension, but this might affect other sane WebDAV servers, so I will probably not be releasing soon without further testing. You can try it out by using: pip install git+https://github.com/skshetry/webdav4.git@nginx-compat#egg=webdav4[fsspec] Let me know if you get any issues. |
Hi, I'm using your library to write some tests around a WebDav server. Thanks for making it open source. I am new to WebDav so if I am mistaken in understanding what's going on please let me know.
If I call
client.exists()
on a resource that does not exist inside an existing collection I always getTrue
back.This seems to be due to the fact that
.propfind()
always returns a result even if targeting a non-existing resource (in that case you can tell the resource does not exist because all the properties inresult.responses["resource-name"].properties
areNone
).The text was updated successfully, but these errors were encountered: