zsync doesn't prevent timestamp of downloaded file

Bug #538710 reported by psl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zsync (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: zsync

Ubuntu 9.10 i386, zsync 0.6

ISSUE:
When file is downloaded with zsync, timestamp is set to the time when download was finished, timestamp at HTTP server is ignored. I can compare with WGET that keeps timestamp as reported by HTTP server.

EXAMPLE:

FILE http://cdimage.ubuntu.com/daily/current/lucid-alternate-i386.iso at HTTP server:

lucid-alternate-i386.iso 14-Mar-2010 07:36 642M Alternate install CD for PC (Intel x86) computers (standard download)
lucid-alternate-i386.iso.zsync 14-Mar-2010 07:39 1.3M Alternate install CD for PC (Intel x86) computers (standard download)

$ zsync -V
zsync v0.6 (compiled Nov 8 2009 23:19:49)
By Colin Phipps <email address hidden>
Published under the Artistic License v2, see the COPYING file for details.

1) File downloaded with ZSYNC:
$ zsync http://cdimage.ubuntu.com/daily/current/lucid-alternate-i386.iso.zsync
...
$ ls -l lucid-alternate-i386.iso
-rw------- 1 psl psl 673048576 2010-03-14 13:33 lucid-alternate-i386.iso

2) File downloaded with WGET:
$ wget http://cdimage.ubuntu.com/daily/current/lucid-alternate-i386.iso
...
$ ls -l lucid-alternate-i386.iso
-rw-r--r-- 1 psl psl 673048576 2010-03-14 08:36 lucid-alternate-i386.iso

SUMARY:
ZSYNC set timestamp to 2010-03-14 13:33 (CET); download was finished at this time...
WGET set timestamp to 2010-03-14 08:36 (CET); download finished later than ZSYNC but timestamp is correct...
HTTP server reports 2010-03-14 07:36 (GMT)

I noticed that ZSYNC file (lucid-alternate-i386.iso.zsync) doesn't list information about file timestamp. Maybe this information should be added to future version of ZSYNC meta file, it can be useful and more reliable than timestemp reported by HTTP server.

ZSYNC header, no timestamp information is there:

zsync: 0.5
Filename: lucid-alternate-i386.iso
Blocksize: 4096
Length: 673048576
Hash-Lengths: 2,3,5
URL: lucid-alternate-i386.iso
SHA-1: 9fd2e7fa32bdfcf3aebcb5e642db34cc99a825cd

Revision history for this message
psl (slansky) wrote :

I noticed that this report could be extended from timestamps to file rights, to umask.

$ umask
0022

WGET set file rights to 0644:

$ umask; ls -l lucid-alternate-i386.iso
0022
-rw-r--r-- 1 psl psl 673048576 2010-03-14 08:36 lucid-alternate-i386.iso

ZSYNC set file rights to 0600:

$ umask; ls -l lucid-alternate-i386.iso
0022
-rw------- 1 psl psl 673048576 2010-03-14 13:33 lucid-alternate-i386.iso

Revision history for this message
Colin Phipps (cph-moria) wrote :

zsync 0.6 and above does include the mtime in the .zsync file, and the client will use that to set the mtime of the download.

Revision history for this message
Matt Zimmerman (mdz) wrote :

The .zsync files you downloaded were generated using an older version of zsync which did not support this feature. Current versions do support it, and newer .zsync files for Ubuntu ISOs contain the mtime.

Changed in zsync (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.