mirror of
https://github.com/rclone/rclone.git
synced 2026-02-27 09:53:24 +00:00
The WebDAV implementation already permits redirects on PROPFIND for listing paths in the `listAll` method but does not permit this for metadata in `readMetaDataForPath`. This results in a strange experience for endpoints that heavily use redirects - ``` rclone lsl endpoint: ``` functions and lists `hello_world.txt` in its output but ``` rclone lsl endpoint:hello_world.txt ``` Fails with a HTTP 307. The git history for this setting indicates this was done to avoid an issue where redirects cause a verb change to GET in the Go HTTP client; it does not appear to be problematic with HTTP 307. To fix, a new `CheckRedirect` function is added in the `rest` library to force the client to use the same verb across redirects, forcing this for the PROPFIND case.