mirror of
https://github.com/rclone/rclone.git
synced 2026-07-10 07:45:09 -04:00
Per RFC 4918 section 10.6, when the Overwrite header is omitted from a COPY or MOVE request the resource MUST treat the request as if Overwrite: T had been sent. The upstream golang.org/x/net/webdav library mishandles this for MOVE by checking == "T" instead of != "F", so an absent header is treated as Overwrite: F and the request fails with 412 Precondition Failed. Normalise the header to T in the rclone WebDAV server before delegating to the upstream handler when the client did not send one. This restores RFC-compliant default behaviour and can be removed once the upstream fix in golang/go#66059 lands and the golang.org/x/net dependency is bumped. Fixes #9496