[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Wget 1 is not preserving server-side modification times via FTP
From: |
Tim Rühsen |
Subject: |
Re: Wget 1 is not preserving server-side modification times via FTP |
Date: |
Sat, 1 Jun 2024 18:57:00 +0200 |
User-agent: |
Mozilla Thunderbird |
Hey Thomas,
thanks for your report.
Wget sets the remote time when using the -N / --timestamping option.
> Is a fix in wget 1.x something to be considered at this point in time?
Yes, if we find a volunteer to make up a patch.
> FTP support seems to be dropped altogether from Wget 2 (correct?)
Not dropped, but it is not implemented. The number of FTP users is
relatively small and there are plenty of FTP clients (e.g. wget for
recursive mode). Also, FTP seems to be dying, so why implement another
FTP client at all!?
Regards, Tim
On 5/29/24 11:02, Thomas Orgis wrote:
Hi all,
I noticed that while wget does nicely preserve Last-Modified times from
HTTP downloads, it does not do so for FTP, apparently. The example I see
is the upstream archive of the file tool:
ftp://ftp.astron.com/pub/file/file-4.26.tar.gz
Wget correctly parses the time information:
$ wget -q -O- ftp://ftp.astron.com/pub/file/ | grep file-4.26
2008 Aug 30 File <a
href="ftp://ftp.astron.com:21/pub/file/file-4.26.tar.gz">file-4.26.tar.gz</a>
(584803 bytes)
But on download, the file gets the current time as mtime:
$ wget -q ftp://ftp.astron.com/pub/file/file-4.26.tar.gz && LC_ALL=C ls -l
file-4.26.tar.gz
-rw-r--r-- 1 thomas thomas 584803 May 29 08:32 file-4.26.tar.gz
I tried several versions of wget 1.x I could find/build. Wget-1.9.1
gets in an endless loop with this URL, wget-1.10.2 works, but also
already sets the wrong time. I wonder why I this comment
https://bugzilla.mozilla.org/show_bug.cgi?id=178506#c7
in the wonderful bug discussion about Firefox' refusal to use server
mtimes claims that
GNU's wget does this very nicely for ftp and http downloads.
Maybe wget 22 years ago had different FTP code. I'm not easily able to
run wget that old to try. So it may be a regression before 1.10.2, even
(which is already over 18 years ago!)
FTP support seems to be dropped altogether from Wget 2 (correct?).
There still are some FTP sites (like the rather prominent upstream of
file and libmagic above) and maybe this is another reason why I will
have to resort to curl for good, which does not preserve the time by
default, but offers --remote-time that works for both http and ftp
downloads.
Is a fix in wget 1.x something to be considered at this point in time?
Alrighty then,
Thomas
OpenPGP_signature.asc
Description: OpenPGP digital signature
- Re: Wget 1 is not preserving server-side modification times via FTP,
Tim Rühsen <=