Re: Wget 1 is not preserving server-side modification times via FTP
Tim Rühsen <[email protected]> Sat, 1 Jun 2024 18:57:00 +0200
| Newsgroups | gmane.comp.web.wget.general |
|---|---|
| Message-ID | <[email protected]> |
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
(application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEEHLJ9vJhhSy1YQWRtCDAttqJnBCgFAmZbUt0FAwAAAAAACgkQCDAttqJnBCis gBAAm72JYdSl/L8p/SI3o2nlObYXKEIKQOhElSE28/O8nFcUCkdI6qO93PqhX6exS5ViDac2Shuz erC2PNylA5S1asHhVE4IgKKf6nuVXuxDZWVGHh+7ixxNS0wDu3Y/nXeF752NhSS0Nt0CFosmagpB zWDBT+yor8PrkchLBDj8EOWD6mXwvMfxFU5dB0KS7Re7VQn0nufS60Q8o2GuHSPpbIh6Q0qLOf5j zI1EvZi7KWNC/SZIKO5lW+CNc6p9WaQGMyON0/xUy5iOfbGl7SzBMNdnAoyuDrQtCFE9ZW+EWutT iJsVNDjifKLFS7DgXRyQGmhlfJGdo+Tac7wIQIErohTM/h8EIonH02qnOopjq+Zfoi3L859KSkyz xbwpHO9ddRk6RD0eq+4eI81A/tPGoPXNCcg0gEA8/znad12yXH+7bnF95ItzZVb6Zg0DuexP9wFC tp1ZWS8XF7gzCzLS9SnYxNzB2b4kfI8XGHILCKHu6XFQk2h2aP/46+ZjX527GAoYmfN/JpL7BHCH uIrEfQGMO7BcAhxk/PRB+q+ndu+PzFoSoOCEMGyKyhgLYJk/f5FfNA/vZhAJvNd5QJ/BKo1DQ5yx dmPlFkNSyQxNvjV//WuIiBh4ECyC22Zp1+4OLd9XZcCzkSOQLLs1fZdEOqLSkkB11llXKJKyfBuT MPw= =uAAY -----END PGP SIGNATURE-----