wget -N ignores file size differences

Bug #1715481 reported by A
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
wget (Ubuntu)
New
Undecided
Unassigned

Bug Description

The man page states:

"The time-stamping in GNU Wget is turned on using ‘--timestamping’ (‘-N’) option, or through timestamping = on directive in .wgetrc. With this option, for each file it intends to download, Wget will check whether a local file of the same name exists. If it does, and the remote file is not newer, Wget will not download it.

If the local file does not exist, or the sizes of the files do not match, Wget will download the remote file no matter what the time-stamps say. "

Note the last sentence carefully: "...the sizes of the files do not match... no matter what the timestamps say."

To duplicate:
wget -N <remote file>
cp /dev/null <remote file that is now local>
wget -N <remote file>
~~~~~~~~~~~~~~~~~~~~~~~~
Note, it will state "HTTP request sent, awaiting response... 304 Not Modified
File ‘<remote file>’ not modified on server. Omitting download.

Obviously the sizes of the files do not match and it should download the file. You can also edit the file and manually delete (or add I suppose) a few lines.

Not related, however I would like to also point out that if I change the string "$1000" to "$4000" in a document on the remote, the size of the file does not change, however the files and data are clearly different. This case usage would break anything depending on actual changes. Such as automatically getting a vendor's price lists, not just changes to what is essentially the outer envelope of the file. Kind of important, no?

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: wget 1.17.1-1ubuntu1.2
ProcVersionSignature: Ubuntu 4.4.0-93.116-generic 4.4.79
Uname: Linux 4.4.0-93-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.10
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Sep 6 12:42:20 2017
InstallationDate: Installed on 2016-09-11 (359 days ago)
InstallationMedia: Ubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
SourcePackage: wget
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
A (publicface) wrote :
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.