I've analysed what curl is doing while retrieving https://ftp.netbsd.org/, then https://ftp.netbsd.org/pub/, https://ftp.netbsd.org/pub/NetBSD-daily/:
First step: https://ftp.netbsd.org/:
$ curl -v https://ftp.netbsd.org/
* Host ftp.netbsd.org:443 was resolved.
* IPv6: 2001:470:a085:999::21
* IPv4: 199.233.217.201
* Trying [2001:470:a085:999::21]:443...
[…]
* Connected to ftp.netbsd.org (2001:470:a085:999::21) port 443
* using HTTP/1.x
> GET / HTTP/1.1
> Host: ftp.netbsd.org
> User-Agent: curl/8.14.1
> Accept: */*
>
* Request completely sent off
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
< HTTP/1.1 200 OK
< Date: Sat, 13 Dec 2025 22:18:56 GMT
< Server: bozohttpd/20240428
< Accept-Ranges: bytes
< Content-Type: text/html
< Connection: close
<
<!DOCTYPE html>
<html><head><meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
table {
border-top: 1px solid black;
border-bottom: 1px solid black;
}
th { background: aquamarine; }
tr:nth-child(even) { background: lavender; }
</style>
<title>Index of /</title></head>
<body><h1>Index of /</h1>
<table cols=3>
<thead>
<tr><th>Name<th>Last modified<th align=right>Size
<tbody>
<tr><td><a href="../">Parent Directory</a><td>04-Aug-2025 16:12<td align=right>1kB
<tr><td><a href=".bzremap.old">.bzremap.old</a><td>12-Dec-2025 04:16<td align=right>140kB
<tr><td><a href=".message">.message</a><td>10-Feb-2016 06:22<td align=right>1kB
<tr><td><a href="cgi-bin/">cgi-bin/</a><td>05-Jan-2025 19:24<td align=right>1kB
<tr><td><a href="etc/">etc/</a><td>16-Aug-2009 11:21<td align=right>1kB
<tr><td><a href="ls-lRA.gz">ls-lRA.gz</a><td>13-Dec-2025 03:46<td align=right>40241kB
<tr><td><a href="pub/">pub/</a><td>30-Sep-2017 22:31<td align=right>1kB
<tr><td><a href="robots.txt">robots.txt</a><td>05-Jan-2024 19:19<td align=right>1kB
</table>
</body></html>
* TLSv1.3 (IN), TLS alert, close notify (256):
* shutting down connection #0
Second step https://ftp.netbsd.org/pub/:
$ curl -v https://ftp.netbsd.org/pub/
* Host ftp.netbsd.org:443 was resolved.
* IPv6: 2001:470:a085:999::21
* IPv4: 199.233.217.201
* Trying [2001:470:a085:999::21]:443...
[...]
* Connected to ftp.netbsd.org (2001:470:a085:999::21) port 443
* using HTTP/1.x
> GET /pub/ HTTP/1.1
> Host: ftp.netbsd.org
> User-Agent: curl/8.14.1
> Accept: */*
>
* Request completely sent off
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
< HTTP/1.1 200 OK
< Date: Sat, 13 Dec 2025 22:20:36 GMT
< Server: bozohttpd/20240428
< Accept-Ranges: bytes
< Content-Type: text/html
< Connection: close
<
<!DOCTYPE html>
<html><head><meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
table {
border-top: 1px solid black;
border-bottom: 1px solid black;
}
th { background: aquamarine; }
tr:nth-child(even) { background: lavender; }
</style>
<title>Index of pub/</title></head>
<body><h1>Index of pub/</h1>
<table cols=3>
<thead>
<tr><th>Name<th>Last modified<th align=right>Size
<tbody>
<tr><td><a href="../">Parent Directory</a><td>13-Dec-2025 04:16<td align=right>1kB
<tr><td><a href="NetBSD/">NetBSD/</a><td>31-Jul-2025 17:03<td align=right>1kB
<tr><td><a href="NetBSD-archive/">NetBSD-archive/</a><td>12-Jul-2020 06:17<td align=right>1kB
<tr><td><a href="NetBSD-daily/">NetBSD-daily/</a><td>06-Oct-2016 17:25<td align=right>1kB
<tr><td><a href="pkgsrc/">pkgsrc/</a><td>22-Sep-2025 04:54<td align=right>1kB
</table>
</body></html>
* TLSv1.3 (IN), TLS alert, close notify (256):
* shutting down connection #0
Third step https://ftp.netbsd.org/pub/NetBSD-daily/
$ curl -v https://ftp.netbsd.org/pub/NetBSD-daily/
* Host ftp.netbsd.org:443 was resolved.
* IPv6: 2001:470:a085:999::21
* IPv4: 199.233.217.201
* Trying [2001:470:a085:999::21]:443...
[...]
* Connected to ftp.netbsd.org (2001:470:a085:999::21) port 443
* using HTTP/1.x
> GET /pub/NetBSD-daily/ HTTP/1.1
> Host: ftp.netbsd.org
> User-Agent: curl/8.14.1
> Accept: */*
>
* Request completely sent off
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
< HTTP/1.1 301 Document Moved
< Date: Sat, 13 Dec 2025 22:25:56 GMT
< Server: bozohttpd/20240428
< Accept-Ranges: bytes
< Content-Type: text/html
< Connection: close
< Location: https://nycdn.netbsd.org/pub/NetBSD-daily/
<
<html><head><title>Document Moved</title></head>
<body><h1>Document Moved</h1>
This document had moved <a href="https://nycdn.netbsd.org/pub/NetBSD-daily/">here</a>
</body></html>
* TLSv1.3 (OUT), TLS alert, decode error (562):
* OpenSSL SSL_read: OpenSSL/3.5.3: error:0A000126:SSL routines::unexpected eof while reading, errno 0
* closing connection #0
curl: (56) OpenSSL SSL_read: OpenSSL/3.5.3: error:0A000126:SSL routines::unexpected eof while reading, errno 0
Now here is a difference: Location: https://nycdn.netbsd.org/pub/NetBSD-daily/. This tells the browser to change to url https://nycdn.netbsd.org/pub/NetBSD-daily/. rclone respects this, but does not tell me about it. The directory listing retrieved and displayed is not from ftp.netbsd.org but from nycdn.netbsd.org:
$ rclone lsf --http-url https://ftp.netbsd.org :http:/pub/NetBSD-daily/
HEAD/
HEAD-lint/
HEAD-llvm/
netbsd-10/
netbsd-10-llvm/
netbsd-11/
netbsd-11-llvm/
netbsd-9/
Step four https://ftp.netbsd.org/pub/NetBSD-daily/HEAD/:
$ curl -v https://ftp.netbsd.org/pub/NetBSD-daily/HEAD
* Host ftp.netbsd.org:443 was resolved.
* IPv6: 2001:470:a085:999::21
* IPv4: 199.233.217.201
* Trying [2001:470:a085:999::21]:443...
[...]
* Connected to ftp.netbsd.org (2001:470:a085:999::21) port 443
* using HTTP/1.x
> GET /pub/NetBSD-daily/HEAD HTTP/1.1
> Host: ftp.netbsd.org
> User-Agent: curl/8.14.1
> Accept: */*
>
* Request completely sent off
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
< HTTP/1.1 301 Document Moved
< Date: Sat, 13 Dec 2025 22:38:33 GMT
< Server: bozohttpd/20240428
< Accept-Ranges: bytes
< Content-Type: text/html
< Connection: close
< Location: https://nycdn.netbsd.org/pub/NetBSD-daily/
<
<html><head><title>Document Moved</title></head>
<body><h1>Document Moved</h1>
This document had moved <a href="https://nycdn.netbsd.org/pub/NetBSD-daily/">here</a>
</body></html>
* TLSv1.3 (OUT), TLS alert, decode error (562):
* OpenSSL SSL_read: OpenSSL/3.5.3: error:0A000126:SSL routines::unexpected eof while reading, errno 0
* closing connection #0
curl: (56) OpenSSL SSL_read: OpenSSL/3.5.3: error:0A000126:SSL routines::unexpected eof while reading, errno 0
curl fails to retrieve https://ftp.netbsd.org/pub/NetBSD-daily/HEAD/ telling me about the new location, while rclone just fails:
$ rclone lsf -vv --http-url https://ftp.netbsd.org :http:/pub/NetBSD-daily/HEAD/
2025/12/13 23:42:43 DEBUG : rclone: Version "v1.72.1" starting with parameters ["rclone" "lsf" "-vv" "--http-url" "https://ftp.netbsd.org" ":http:/pub/NetBSD-daily/HEAD/"]
2025/12/13 23:42:43 DEBUG : Creating backend with remote ":http:/pub/NetBSD-daily/HEAD/"
2025/12/13 23:42:43 DEBUG : Using config file from "/home/tps/.config/rclone/rclone.conf"
2025/12/13 23:42:43 DEBUG : :http: detected overridden config - adding "{ei14f}" suffix to name
2025/12/13 23:42:43 DEBUG : Root: https://ftp.netbsd.org/pub/NetBSD-daily/HEAD/
2025/12/13 23:42:43 DEBUG : fs cache: renaming cache item ":http:/pub/NetBSD-daily/HEAD/" to be canonical ":http{ei14f}:/pub/NetBSD-daily/HEAD/"
2025/12/13 23:42:44 ERROR : error listing: error listing "": directory not found
2025/12/13 23:42:44 DEBUG : 4 go routines active
2025/12/13 23:42:44 NOTICE: Failed to lsf with 2 errors: last error was: error in ListJSON: error listing "": directory not found
I see two possible solutions to this problem:
- make rclone descend the given path and follow any redirect it finds. Or
- make rclone report redirects as
curl does. curl fails, but reports the location where the file it tried to retrieve would have been found and then leaves it up to the user to take action.
With browsers it depends: some automatically change the location and try again, but all of them display at least what the server gives back: the link the file could be found at:
<html><head><title>Document Moved</title></head>
<body><h1>Document Moved</h1>
This document had moved <a href="https://nycdn.netbsd.org/pub/NetBSD-daily/">here</a>
</body></html>