skshetry / webdav4

WebDAV client library with a fsspec based filesystem and a CLI.
https://skshetry.github.io/webdav4
MIT License
61 stars 17 forks source link

Option to add trailing slashes #173

Open fleimgruber opened 8 months ago

fleimgruber commented 8 months ago

As a user, I want to add trailing slashes to requests. I found https://github.com/skshetry/webdav4/blob/4c2046e2250f001bdad76541c0e877e4b40c332e/src/webdav4/client.py#L358 but no way to set this kwarg.

Related #136 talks about follow_redirects but that did not work for me.

skshetry commented 7 months ago

Does a link without trailing slash redirect to a url with a slash? iirc if it does, it should work (I see we do follow_redirects=True on propfind).

We strip trailing slashes in many places, so that's what causes the problem in many places. Unfortunately, I don't have time anytime soon to work on this. PRs are welcome. (We also need to look into WebDAV standard for compliance with what the link format should be (canonical or not, etc).