mirror of
https://github.com/rclone/rclone.git
synced 2026-10-09 14:39:28 -04:00
downloads.rclone.org is about to be served from static listings written by rclone index instead of by Caddy's file server. Released versions of rclone selfupdate find the latest patch release of a minor version by searching that listing for href="./vX.Y.Z/", as written by Caddy. rclone's listings linked to "vX.Y.Z/" without the ./ so `rclone selfupdate --version X.Y` would have failed with "could not find the minor release" for every rclone already installed. Caddy prefixes every link with ./ so that a name with a colon in its first path segment is not read as an absolute URL with a scheme (RFC 3986 section 4.2). rclone was already safe from that as url.URL.String adds the ./ but only to names which need it, so links to plain names had no prefix. This prefixes all the links with ./ as Caddy does. It changes the output of serve http, serve webdav and the rc server as well as rclone index, since they share the code. The links resolve identically, and it keeps the listings consistent with each other. Now every URL has the prefix, the caddy.json template no longer needs to add it.