mirror of
https://github.com/rclone/rclone.git
synced 2026-03-26 11:22:38 -04:00
This PR optimizes the PROPFIND requests in the webdav backend to only ask for the specific properties rclone actually needs. Currently, the generic webdav backend sends an empty XML body during directory listing (listAll), which causes the server to fall back to allprops by default. This forces the server to return properties we never use, such as getcontenttype. Fetching getcontenttype can be a very expensive operation on the server side. For instance, in the official golang.org/x/net/webdav library, determining the content type requires the server to open the file and read the first 500 bytes. For a directory with 1,300 files in my environment, rclone ls time dropped from ~30s to ~4s (as fast as native ls). This only applies to the other vendor for backwards compatibility which could be expanded.