wget exits with exit code 0 even though server responded with 416

Bug #1273648 reported by Alexander List
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
wget (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Trying to continue a partial download. Server denies range request with 416, but wget a) thinks the file is already fully downloaded, b) exits with 0 instead of a nonzero exit code.

$ wget -c http://download.java.net/jdk8/archive/b124/binaries/jdk-8-ea-bin-b124-linux-x64-19_jan_2014.tar.gz?q=download/jdk8/archive/b124/binaries/jdk-8-ea-bin-b124-linux-x64-19_jan_2014.tar.gz -O jdk-8-ea-bin-b124-linux-x64-19_jan_2014.tar.gz ; echo $?
--2014-01-28 12:14:13-- http://download.java.net/jdk8/archive/b124/binaries/jdk-8-ea-bin-b124-linux-x64-19_jan_2014.tar.gz?q=download/jdk8/archive/b124/binaries/jdk-8-ea-bin-b124-linux-x64-19_jan_2014.tar.gz
Resolving download.java.net (download.java.net)... 137.254.120.26
Connecting to download.java.net (download.java.net)|137.254.120.26|:80... connected.
HTTP request sent, awaiting response... 416 Requested range not satisfiable

    The file is already fully retrieved; nothing to do.

0

wget cannot do anything about the rejected range request, but it should inform the caller both verbosely and with a nonzero exit code that the download failed.

In this particular corner case, the downloaded file was larger than the file on the web server for a reason unclear to me.

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: wget 1.14-2ubuntu1
ProcVersionSignature: Ubuntu 3.11.0-15.23-generic 3.11.10
Uname: Linux 3.11.0-15-generic x86_64
ApportVersion: 2.12.5-0ubuntu2.2
Architecture: amd64
Date: Tue Jan 28 12:13:20 2014
InstallationDate: Installed on 2013-03-19 (315 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Alpha amd64 (20130318)
MarkForUpload: True
SourcePackage: wget
UpgradeStatus: Upgraded to saucy on 2013-09-23 (126 days ago)

Revision history for this message
Alexander List (alexlist) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in wget (Ubuntu):
status: New → Confirmed
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.